35 #define DEFINE_FN(op, size, insn) \ 36 static void op##_rv40_qpel##size##_mc33_##insn(uint8_t *dst, const uint8_t *src, \ 39 ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \ 44 ptrdiff_t
stride,
int h,
int x,
int y);
46 ptrdiff_t
stride,
int h,
int x,
int y);
48 ptrdiff_t
stride,
int h,
int x,
int y);
51 ptrdiff_t
stride,
int h,
int x,
int y);
53 ptrdiff_t
stride,
int h,
int x,
int y);
55 ptrdiff_t
stride,
int h,
int x,
int y);
57 #define DECLARE_WEIGHT(opt) \ 58 void ff_rv40_weight_func_rnd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \ 59 int w1, int w2, ptrdiff_t stride); \ 60 void ff_rv40_weight_func_rnd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \ 61 int w1, int w2, ptrdiff_t stride); \ 62 void ff_rv40_weight_func_nornd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \ 63 int w1, int w2, ptrdiff_t stride); \ 64 void ff_rv40_weight_func_nornd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \ 65 int w1, int w2, ptrdiff_t stride); 66 DECLARE_WEIGHT(mmxext)
78 #define QPEL_FUNC_DECL(OP, SIZE, PH, PV, OPT) \ 79 static void OP ## rv40_qpel ##SIZE ##_mc ##PH ##PV ##OPT(uint8_t *dst, \ 85 LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]); \ 86 uint8_t *tmpptr = tmp + SIZE * 2; \ 89 for (i = 0; i < SIZE; i += LOOPSIZE) \ 90 ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride, \ 91 SIZE + 5, HCOFF(PH)); \ 92 for (i = 0; i < SIZE; i += LOOPSIZE) \ 93 ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i, \ 94 SIZE, SIZE, VCOFF(PV)); \ 96 for (i = 0; i < SIZE; i += LOOPSIZE) \ 97 ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i, \ 98 stride, SIZE, VCOFF(PV)); \ 100 for (i = 0; i < SIZE; i += LOOPSIZE) \ 101 ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i, \ 102 stride, SIZE, HCOFF(PH)); \ 108 #define QPEL_FUNCS_DECL(OP, PH, PV, OPT) \ 109 QPEL_FUNC_DECL(OP, 8, PH, PV, OPT) \ 110 QPEL_FUNC_DECL(OP, 16, PH, PV, OPT) 113 #define QPEL_MC_DECL(OP, OPT) \ 114 void ff_ ##OP ##rv40_qpel_h ##OPT(uint8_t *dst, ptrdiff_t dstStride, \ 115 const uint8_t *src, \ 116 ptrdiff_t srcStride, \ 118 void ff_ ##OP ##rv40_qpel_v ##OPT(uint8_t *dst, ptrdiff_t dstStride, \ 119 const uint8_t *src, \ 120 ptrdiff_t srcStride, \ 122 QPEL_FUNCS_DECL(OP, 0, 1, OPT) \ 123 QPEL_FUNCS_DECL(OP, 0, 3, OPT) \ 124 QPEL_FUNCS_DECL(OP, 1, 0, OPT) \ 125 QPEL_FUNCS_DECL(OP, 1, 1, OPT) \ 126 QPEL_FUNCS_DECL(OP, 1, 2, OPT) \ 127 QPEL_FUNCS_DECL(OP, 1, 3, OPT) \ 128 QPEL_FUNCS_DECL(OP, 2, 1, OPT) \ 129 QPEL_FUNCS_DECL(OP, 2, 2, OPT) \ 130 QPEL_FUNCS_DECL(OP, 2, 3, OPT) \ 131 QPEL_FUNCS_DECL(OP, 3, 0, OPT) \ 132 QPEL_FUNCS_DECL(OP, 3, 1, OPT) \ 133 QPEL_FUNCS_DECL(OP, 3, 2, OPT) 137 #define HCOFF(x) (32 * ((x) - 1)) 138 #define VCOFF(x) (32 * ((x) - 1)) 139 QPEL_MC_DECL(put_, _ssse3)
140 QPEL_MC_DECL(avg_, _ssse3)
146 #define HCOFF(x) (64 * ((x) - 1)) 147 #define VCOFF(x) (64 * ((x) - 1)) 148 QPEL_MC_DECL(put_, _sse2)
149 QPEL_MC_DECL(avg_, _sse2)
156 #define HCOFF(x) (64 * ((x) - 1)) 157 #define VCOFF(x) (64 * ((x) - 1)) 159 QPEL_MC_DECL(put_, _mmx)
161 #define ff_put_rv40_qpel_h_mmxext ff_put_rv40_qpel_h_mmx 162 #define ff_put_rv40_qpel_v_mmxext ff_put_rv40_qpel_v_mmx 163 QPEL_MC_DECL(avg_, _mmxext)
165 #define ff_put_rv40_qpel_h_3dnow ff_put_rv40_qpel_h_mmx 166 #define ff_put_rv40_qpel_v_3dnow ff_put_rv40_qpel_v_mmx 167 QPEL_MC_DECL(avg_, _3dnow)
172 #define QPEL_FUNC_SET(OP, SIZE, PH, PV, OPT) \ 173 c-> OP ## pixels_tab[2 - SIZE / 8][4 * PV + PH] = OP ## rv40_qpel ##SIZE ## _mc ##PH ##PV ##OPT; 176 #define QPEL_FUNCS_SET(OP, PH, PV, OPT) \ 177 QPEL_FUNC_SET(OP, 8, PH, PV, OPT) \ 178 QPEL_FUNC_SET(OP, 16, PH, PV, OPT) 181 #define QPEL_MC_SET(OP, OPT) \ 182 QPEL_FUNCS_SET (OP, 0, 1, OPT) \ 183 QPEL_FUNCS_SET (OP, 0, 3, OPT) \ 184 QPEL_FUNCS_SET (OP, 1, 0, OPT) \ 185 QPEL_FUNCS_SET (OP, 1, 1, OPT) \ 186 QPEL_FUNCS_SET (OP, 1, 2, OPT) \ 187 QPEL_FUNCS_SET (OP, 1, 3, OPT) \ 188 QPEL_FUNCS_SET (OP, 2, 1, OPT) \ 189 QPEL_FUNCS_SET (OP, 2, 2, OPT) \ 190 QPEL_FUNCS_SET (OP, 2, 3, OPT) \ 191 QPEL_FUNCS_SET (OP, 3, 0, OPT) \ 192 QPEL_FUNCS_SET (OP, 3, 1, OPT) \ 193 QPEL_FUNCS_SET (OP, 3, 2, OPT) 233 QPEL_MC_SET(put_, _mmx)
240 QPEL_MC_SET(avg_, _3dnow)
252 QPEL_MC_SET(avg_, _mmxext)
262 QPEL_MC_SET(put_, _sse2)
263 QPEL_MC_SET(avg_, _sse2)
274 QPEL_MC_SET(put_, _ssse3)
275 QPEL_MC_SET(avg_, _ssse3)
qpel_mc_func put_pixels_tab[4][16]
#define EXTERNAL_MMX(flags)
Memory handling functions.
av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c)
static atomic_int cpu_flags
Macro definitions for various function/variable attributes.
rv40_weight_func rv40_weight_pixels_tab[2][2]
Biweight functions, first dimension is transform size (16/8), second is whether the weight is prescal...
#define EXTERNAL_SSE2(flags)
#define INLINE_MMX(flags)
qpel_mc_func avg_pixels_tab[4][16]
RV30/40 decoder motion compensation functions.
#define EXTERNAL_SSSE3(flags)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
#define EXTERNAL_MMXEXT(flags)
h264_chroma_mc_func avg_chroma_pixels_tab[3]
h264_chroma_mc_func put_chroma_pixels_tab[3]
#define EXTERNAL_AMD3DNOW(flags)
#define DEFINE_FN(op, size, insn)