clarify *_offsets.asm differences
[libvpx.git] / vp8 / common / loopfilter.h
blob2e5997c733feb21be93597427df0703ce579c309
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 #ifndef loopfilter_h
13 #define loopfilter_h
15 #include "vpx_ports/mem.h"
17 #define MAX_LOOP_FILTER 63
19 typedef enum
21 NORMAL_LOOPFILTER = 0,
22 SIMPLE_LOOPFILTER = 1
23 } LOOPFILTERTYPE;
25 /* FRK
26 * Need to align this structure so when it is declared and
27 * passed it can be loaded into vector registers.
29 typedef struct
31 DECLARE_ALIGNED(16, signed char, lim[16]);
32 DECLARE_ALIGNED(16, signed char, flim[16]);
33 DECLARE_ALIGNED(16, signed char, thr[16]);
34 DECLARE_ALIGNED(16, signed char, mbflim[16]);
35 } loop_filter_info;
38 #define prototype_loopfilter(sym) \
39 void sym(unsigned char *src, int pitch, const signed char *flimit,\
40 const signed char *limit, const signed char *thresh, int count)
42 #define prototype_loopfilter_block(sym) \
43 void sym(unsigned char *y, unsigned char *u, unsigned char *v,\
44 int ystride, int uv_stride, loop_filter_info *lfi, int simpler)
46 #if ARCH_X86 || ARCH_X86_64
47 #include "x86/loopfilter_x86.h"
48 #endif
50 #if ARCH_ARM
51 #include "arm/loopfilter_arm.h"
52 #endif
54 #ifndef vp8_lf_normal_mb_v
55 #define vp8_lf_normal_mb_v vp8_loop_filter_mbv_c
56 #endif
57 extern prototype_loopfilter_block(vp8_lf_normal_mb_v);
59 #ifndef vp8_lf_normal_b_v
60 #define vp8_lf_normal_b_v vp8_loop_filter_bv_c
61 #endif
62 extern prototype_loopfilter_block(vp8_lf_normal_b_v);
64 #ifndef vp8_lf_normal_mb_h
65 #define vp8_lf_normal_mb_h vp8_loop_filter_mbh_c
66 #endif
67 extern prototype_loopfilter_block(vp8_lf_normal_mb_h);
69 #ifndef vp8_lf_normal_b_h
70 #define vp8_lf_normal_b_h vp8_loop_filter_bh_c
71 #endif
72 extern prototype_loopfilter_block(vp8_lf_normal_b_h);
75 #ifndef vp8_lf_simple_mb_v
76 #define vp8_lf_simple_mb_v vp8_loop_filter_mbvs_c
77 #endif
78 extern prototype_loopfilter_block(vp8_lf_simple_mb_v);
80 #ifndef vp8_lf_simple_b_v
81 #define vp8_lf_simple_b_v vp8_loop_filter_bvs_c
82 #endif
83 extern prototype_loopfilter_block(vp8_lf_simple_b_v);
85 #ifndef vp8_lf_simple_mb_h
86 #define vp8_lf_simple_mb_h vp8_loop_filter_mbhs_c
87 #endif
88 extern prototype_loopfilter_block(vp8_lf_simple_mb_h);
90 #ifndef vp8_lf_simple_b_h
91 #define vp8_lf_simple_b_h vp8_loop_filter_bhs_c
92 #endif
93 extern prototype_loopfilter_block(vp8_lf_simple_b_h);
95 typedef prototype_loopfilter_block((*vp8_lf_block_fn_t));
96 typedef struct
98 vp8_lf_block_fn_t normal_mb_v;
99 vp8_lf_block_fn_t normal_b_v;
100 vp8_lf_block_fn_t normal_mb_h;
101 vp8_lf_block_fn_t normal_b_h;
102 vp8_lf_block_fn_t simple_mb_v;
103 vp8_lf_block_fn_t simple_b_v;
104 vp8_lf_block_fn_t simple_mb_h;
105 vp8_lf_block_fn_t simple_b_h;
106 } vp8_loopfilter_rtcd_vtable_t;
108 #if CONFIG_RUNTIME_CPU_DETECT
109 #define LF_INVOKE(ctx,fn) (ctx)->fn
110 #else
111 #define LF_INVOKE(ctx,fn) vp8_lf_##fn
112 #endif
114 typedef void loop_filter_uvfunction
116 unsigned char *u, /* source pointer */
117 int p, /* pitch */
118 const signed char *flimit,
119 const signed char *limit,
120 const signed char *thresh,
121 unsigned char *v
124 #endif