34 #define LFC_FUNC(DIR, DEPTH, OPT) \
35 void ff_hevc_ ## DIR ## _loop_filter_chroma_ ## DEPTH ## _ ## OPT(uint8_t *pix, ptrdiff_t stride, const int *tc, const uint8_t *no_p, const uint8_t *no_q);
37 #define LFL_FUNC(DIR, DEPTH, OPT) \
38 void ff_hevc_ ## DIR ## _loop_filter_luma_ ## DEPTH ## _ ## OPT(uint8_t *pix, ptrdiff_t stride, int beta, const int *tc, const uint8_t *no_p, const uint8_t *no_q);
40 #define LFC_FUNCS(type, depth, opt) \
41 LFC_FUNC(h, depth, opt) \
42 LFC_FUNC(v, depth, opt)
44 #define LFL_FUNCS(type, depth, opt) \
45 LFL_FUNC(h, depth, opt) \
46 LFL_FUNC(v, depth, opt)
64 #define IDCT_DC_FUNCS(W, opt) \
65 void ff_hevc_idct_ ## W ## _dc_8_ ## opt(int16_t *coeffs); \
66 void ff_hevc_idct_ ## W ## _dc_10_ ## opt(int16_t *coeffs); \
67 void ff_hevc_idct_ ## W ## _dc_12_ ## opt(int16_t *coeffs)
76 #define IDCT_FUNCS(opt) \
77 void ff_hevc_idct_4x4_8_ ## opt(int16_t *coeffs, int col_limit); \
78 void ff_hevc_idct_4x4_10_ ## opt(int16_t *coeffs, int col_limit); \
79 void ff_hevc_idct_8x8_8_ ## opt(int16_t *coeffs, int col_limit); \
80 void ff_hevc_idct_8x8_10_ ## opt(int16_t *coeffs, int col_limit); \
81 void ff_hevc_idct_16x16_8_ ## opt(int16_t *coeffs, int col_limit); \
82 void ff_hevc_idct_16x16_10_ ## opt(int16_t *coeffs, int col_limit); \
83 void ff_hevc_idct_32x32_8_ ## opt(int16_t *coeffs, int col_limit); \
84 void ff_hevc_idct_32x32_10_ ## opt(int16_t *coeffs, int col_limit);
89 #define TRANSFORM_LUMA_FUNCS(opt) \
90 void ff_hevc_transform_4x4_luma_8_ ## opt(int16_t *coeffs); \
91 void ff_hevc_transform_4x4_luma_10_ ## opt(int16_t *coeffs)
96 #define ff_hevc_pel_filters ff_hevc_qpel_filters
97 #define DECL_HV_FILTER(f) \
98 const uint8_t *hf = ff_hevc_ ## f ## _filters[mx]; \
99 const uint8_t *vf = ff_hevc_ ## f ## _filters[my];
101 #define FW_PUT(p, a, b, depth, opt) \
102 static void hevc_put_ ## a ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \
103 int height, intptr_t mx, intptr_t my,int width) \
106 ff_h2656_put_ ## b ## _ ## depth ## _##opt(dst, 2 * MAX_PB_SIZE, src, srcstride, height, hf, vf, width); \
109 #define FW_PUT_UNI(p, a, b, depth, opt) \
110 static void hevc_put_uni_ ## a ## _ ## depth ## _##opt(uint8_t *dst, ptrdiff_t dststride, \
111 const uint8_t *src, ptrdiff_t srcstride, \
112 int height, intptr_t mx, intptr_t my, int width) \
115 ff_h2656_put_uni_ ## b ## _ ## depth ## _##opt(dst, dststride, src, srcstride, height, hf, vf, width); \
118 #if ARCH_X86_64 && HAVE_SSE4_EXTERNAL
120 #define FW_PUT_FUNCS(p, a, b, depth, opt) \
121 FW_PUT(p, a, b, depth, opt) \
122 FW_PUT_UNI(p, a, b, depth, opt)
124 #define FW_PEL(w, depth, opt) FW_PUT_FUNCS(pel, pel_pixels##w, pixels##w, depth, opt)
126 #define FW_DIR(npel, n, w, depth, opt) \
127 FW_PUT_FUNCS(npel, npel ## _h##w, n ## tap_h##w, depth, opt) \
128 FW_PUT_FUNCS(npel, npel ## _v##w, n ## tap_v##w, depth, opt)
130 #define FW_DIR_HV(npel, n, w, depth, opt) \
131 FW_PUT_FUNCS(npel, npel ## _hv##w, n ## tap_hv##w, depth, opt)
145 #define FW_EPEL(w, depth, opt) FW_DIR(epel, 4, w, depth, opt)
146 #define FW_EPEL_HV(w, depth, opt) FW_DIR_HV(epel, 4, w, depth, opt)
147 #define FW_EPEL_FUNCS(w, depth, opt) \
148 FW_EPEL(w, depth, opt) \
149 FW_EPEL_HV(w, depth, opt)
153 FW_EPEL_FUNCS(4, 8, sse4)
154 FW_EPEL_FUNCS(6, 8, sse4)
155 FW_EPEL_FUNCS(8, 8, sse4)
156 FW_EPEL_FUNCS(16, 8, sse4)
157 FW_EPEL_FUNCS(4, 10, sse4)
158 FW_EPEL_FUNCS(6, 10, sse4)
159 FW_EPEL_FUNCS(8, 10, sse4)
160 FW_EPEL_FUNCS(4, 12, sse4)
161 FW_EPEL_FUNCS(6, 12, sse4)
162 FW_EPEL_FUNCS(8, 12, sse4)
164 #define FW_QPEL(w, depth, opt) FW_DIR(qpel, 8, w, depth, opt)
165 #define FW_QPEL_HV(w, depth, opt) FW_DIR_HV(qpel, 8, w, depth, opt)
166 #define FW_QPEL_FUNCS(w, depth, opt) \
167 FW_QPEL(w, depth, opt) \
168 FW_QPEL_HV(w, depth, opt)
173 FW_QPEL_FUNCS(4, 8, sse4)
174 FW_QPEL_FUNCS(8, 8, sse4)
175 FW_QPEL_FUNCS(4, 10, sse4)
176 FW_QPEL_FUNCS(8, 10, sse4)
177 FW_QPEL_FUNCS(4, 12, sse4)
178 FW_QPEL_FUNCS(8, 12, sse4)
180 #if HAVE_AVX2_EXTERNAL
183 FW_PUT(pel, pel_pixels16, pixels16, 10, avx2)
186 FW_EPEL(16, 10, avx2)
188 FW_EPEL_HV(32, 8, avx2)
189 FW_EPEL_HV(16, 10, avx2)
192 FW_QPEL(16, 10, avx2)
194 FW_QPEL_HV(16, 10, avx2)
199 #define mc_rep_func(name, bitd, step, W, opt) \
200 static void hevc_put_##name##W##_##bitd##_##opt(int16_t *_dst, \
201 const uint8_t *_src, ptrdiff_t _srcstride, int height, \
202 intptr_t mx, intptr_t my, int width) \
206 for (i = 0; i < W; i += step) { \
207 const uint8_t *src = _src + (i * ((bitd + 7) / 8)); \
209 hevc_put_##name##step##_##bitd##_##opt(dst, src, _srcstride, height, mx, my, width); \
212 #define mc_rep_uni_func(name, bitd, step, W, opt) \
213 static void hevc_put_uni_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, \
214 const uint8_t *_src, ptrdiff_t _srcstride, int height, \
215 intptr_t mx, intptr_t my, int width) \
219 for (i = 0; i < W; i += step) { \
220 const uint8_t *src = _src + (i * ((bitd + 7) / 8)); \
221 dst = _dst + (i * ((bitd + 7) / 8)); \
222 hevc_put_uni_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride, \
223 height, mx, my, width); \
226 #define mc_rep_bi_func(name, bitd, step, W, opt) \
227 static void ff_hevc_put_bi_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, const uint8_t *_src, \
228 ptrdiff_t _srcstride, const int16_t *_src2, \
229 int height, intptr_t mx, intptr_t my, int width) \
233 for (i = 0; i < W ; i += step) { \
234 const uint8_t *src = _src + (i * ((bitd + 7) / 8)); \
235 const int16_t *src2 = _src2 + i; \
236 dst = _dst + (i * ((bitd + 7) / 8)); \
237 ff_hevc_put_bi_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride, src2, \
238 height, mx, my, width); \
242 #define mc_rep_funcs(name, bitd, step, W, opt) \
243 mc_rep_func(name, bitd, step, W, opt) \
244 mc_rep_uni_func(name, bitd, step, W, opt) \
245 mc_rep_bi_func(name, bitd, step, W, opt)
247 #define mc_rep_func2(name, bitd, step1, step2, W, opt) \
248 static void hevc_put_##name##W##_##bitd##_##opt(int16_t *dst, \
249 const uint8_t *src, ptrdiff_t _srcstride, int height, \
250 intptr_t mx, intptr_t my, int width) \
252 hevc_put_##name##step1##_##bitd##_##opt(dst, src, _srcstride, height, mx, my, width); \
253 hevc_put_##name##step2##_##bitd##_##opt(dst + step1, src + (step1 * ((bitd + 7) / 8)), \
254 _srcstride, height, mx, my, width); \
256 #define mc_rep_uni_func2(name, bitd, step1, step2, W, opt) \
257 static void hevc_put_uni_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, \
258 const uint8_t *src, ptrdiff_t _srcstride, int height, \
259 intptr_t mx, intptr_t my, int width) \
261 hevc_put_uni_##name##step1##_##bitd##_##opt(dst, dststride, src, _srcstride, height, mx, my, width); \
262 hevc_put_uni_##name##step2##_##bitd##_##opt(dst + (step1 * ((bitd + 7) / 8)), dststride, \
263 src + (step1 * ((bitd + 7) / 8)), _srcstride, \
264 height, mx, my, width); \
266 #define mc_rep_bi_func2(name, bitd, step1, step2, W, opt) \
267 static void ff_hevc_put_bi_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \
268 ptrdiff_t _srcstride, const int16_t *src2, \
269 int height, intptr_t mx, intptr_t my, int width) \
271 ff_hevc_put_bi_##name##step1##_##bitd##_##opt(dst, dststride, src, _srcstride, src2, height, mx, my, width);\
272 ff_hevc_put_bi_##name##step2##_##bitd##_##opt(dst + (step1 * ((bitd + 7) / 8)), dststride, \
273 src + (step1 * ((bitd + 7) / 8)), _srcstride, \
274 src2 + step1, height, mx, my, width); \
277 #define mc_rep_funcs2(name, bitd, step1, step2, W, opt) \
278 mc_rep_func2(name, bitd, step1, step2, W, opt) \
279 mc_rep_uni_func2(name, bitd, step1, step2, W, opt) \
280 mc_rep_bi_func2(name, bitd, step1, step2, W, opt)
282 #if ARCH_X86_64 && HAVE_SSE4_EXTERNAL
284 #define mc_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4) \
285 static void hevc_put_##name##width1##_10_##opt1(int16_t *dst, const uint8_t *src, ptrdiff_t _srcstride, \
286 int height, intptr_t mx, intptr_t my, int width) \
289 hevc_put_##name##width2##_10_##opt1(dst, src, _srcstride, height, mx, my, width); \
290 hevc_put_##name##width3##_10_##opt2(dst+ width2, src+ width4, _srcstride, height, mx, my, width); \
293 #define mc_bi_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4) \
294 static void ff_hevc_put_bi_##name##width1##_10_##opt1(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \
295 ptrdiff_t _srcstride, const int16_t *src2, \
296 int height, intptr_t mx, intptr_t my, int width) \
298 ff_hevc_put_bi_##name##width2##_10_##opt1(dst, dststride, src, _srcstride, src2, \
299 height, mx, my, width); \
300 ff_hevc_put_bi_##name##width3##_10_##opt2(dst+width4, dststride, src+width4, _srcstride, src2+width2, \
301 height, mx, my, width); \
304 #define mc_uni_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4) \
305 static void hevc_put_uni_##name##width1##_10_##opt1(uint8_t *dst, ptrdiff_t dststride, \
306 const uint8_t *src, ptrdiff_t _srcstride, int height, \
307 intptr_t mx, intptr_t my, int width) \
309 hevc_put_uni_##name##width2##_10_##opt1(dst, dststride, src, _srcstride, \
310 height, mx, my, width); \
311 hevc_put_uni_##name##width3##_10_##opt2(dst+width4, dststride, src+width4, _srcstride, \
312 height, mx, my, width); \
315 #define mc_rep_mixs_10(name, width1, width2, width3, opt1, opt2, width4) \
316 mc_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4) \
317 mc_bi_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4) \
318 mc_uni_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4)
320 #define mc_rep_mix_8(name, width1, width2, width3, opt1, opt2) \
321 static void hevc_put_##name##width1##_8_##opt1(int16_t *dst, const uint8_t *src, ptrdiff_t _srcstride, \
322 int height, intptr_t mx, intptr_t my, int width) \
325 hevc_put_##name##width2##_8_##opt1(dst, src, _srcstride, height, mx, my, width); \
326 hevc_put_##name##width3##_8_##opt2(dst+ width2, src+ width2, _srcstride, height, mx, my, width); \
329 #define mc_bi_rep_mix_8(name, width1, width2, width3, opt1, opt2) \
330 static void ff_hevc_put_bi_##name##width1##_8_##opt1(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \
331 ptrdiff_t _srcstride, const int16_t *src2, \
332 int height, intptr_t mx, intptr_t my, int width) \
334 ff_hevc_put_bi_##name##width2##_8_##opt1(dst, dststride, src, _srcstride, \
335 src2, height, mx, my, width); \
336 ff_hevc_put_bi_##name##width3##_8_##opt2(dst+width2, dststride, src+width2, _srcstride, \
337 src2+width2, height, mx, my, width); \
340 #define mc_uni_rep_mix_8(name, width1, width2, width3, opt1, opt2) \
341 static void hevc_put_uni_##name##width1##_8_##opt1(uint8_t *dst, ptrdiff_t dststride, \
342 const uint8_t *src, ptrdiff_t _srcstride, int height, \
343 intptr_t mx, intptr_t my, int width) \
345 hevc_put_uni_##name##width2##_8_##opt1(dst, dststride, src, _srcstride, \
346 height, mx, my, width); \
347 hevc_put_uni_##name##width3##_8_##opt2(dst+width2, dststride, src+width2, _srcstride, \
348 height, mx, my, width); \
351 #define mc_rep_mixs_8(name, width1, width2, width3, opt1, opt2) \
352 mc_rep_mix_8(name, width1, width2, width3, opt1, opt2) \
353 mc_bi_rep_mix_8(name, width1, width2, width3, opt1, opt2) \
354 mc_uni_rep_mix_8(name, width1, width2, width3, opt1, opt2)
356 #if HAVE_AVX2_EXTERNAL
358 mc_rep_mixs_8(pel_pixels, 48, 32, 16, avx2, sse4)
359 mc_rep_mixs_8(epel_hv, 48, 32, 16, avx2, sse4)
360 mc_rep_mixs_8(epel_h , 48, 32, 16, avx2, sse4)
361 mc_rep_mixs_8(epel_v , 48, 32, 16, avx2, sse4)
363 mc_rep_mix_10(pel_pixels, 24, 16, 8, avx2, sse4, 32)
364 mc_bi_rep_mix_10(pel_pixels,24, 16, 8, avx2, sse4, 32)
365 mc_rep_mixs_10(epel_hv, 24, 16, 8, avx2, sse4, 32)
366 mc_rep_mixs_10(epel_h , 24, 16, 8, avx2, sse4, 32)
367 mc_rep_mixs_10(epel_v , 24, 16, 8, avx2, sse4, 32)
370 mc_rep_mixs_10(qpel_h , 24, 16, 8, avx2, sse4, 32)
371 mc_rep_mixs_10(qpel_v , 24, 16, 8, avx2, sse4, 32)
372 mc_rep_mixs_10(qpel_hv, 24, 16, 8, avx2, sse4, 32)
408 mc_rep_mixs_8(qpel_h , 48, 32, 16, avx2, sse4)
411 mc_rep_mixs_8(qpel_v, 48, 32, 16, avx2, sse4)
545 #define mc_rep_uni_w(bitd, step, W, opt) \
546 void ff_hevc_put_uni_w##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, const int16_t *_src, \
547 int height, int denom, int _wx, int _ox) \
551 for (i = 0; i < W; i += step) { \
552 const int16_t *src = _src + i; \
553 dst= _dst + (i * ((bitd + 7) / 8)); \
554 ff_hevc_put_uni_w##step##_##bitd##_##opt(dst, dststride, src, \
555 height, denom, _wx, _ox); \
559 mc_rep_uni_w(8, 6, 12, sse4)
560 mc_rep_uni_w(8, 8, 16, sse4)
561 mc_rep_uni_w(8, 8, 24, sse4)
562 mc_rep_uni_w(8, 8, 32, sse4)
563 mc_rep_uni_w(8, 8, 48, sse4)
564 mc_rep_uni_w(8, 8, 64, sse4)
566 mc_rep_uni_w(10, 6, 12, sse4)
567 mc_rep_uni_w(10, 8, 16, sse4)
568 mc_rep_uni_w(10, 8, 24, sse4)
569 mc_rep_uni_w(10, 8, 32, sse4)
570 mc_rep_uni_w(10, 8, 48, sse4)
571 mc_rep_uni_w(10, 8, 64, sse4)
573 mc_rep_uni_w(12, 6, 12, sse4)
574 mc_rep_uni_w(12, 8, 16, sse4)
575 mc_rep_uni_w(12, 8, 24, sse4)
576 mc_rep_uni_w(12, 8, 32, sse4)
577 mc_rep_uni_w(12, 8, 48, sse4)
578 mc_rep_uni_w(12, 8, 64, sse4)
580 #define mc_rep_bi_w(bitd, step, W, opt) \
581 void ff_hevc_put_bi_w##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, const int16_t *_src, \
582 const int16_t *_src2, int height, \
583 int denom, int wx0, int wx1, int ox) \
587 for (i = 0; i < W; i += step) { \
588 const int16_t *src = _src + i; \
589 const int16_t *src2 = _src2 + i; \
590 dst = _dst + (i * ((bitd + 7) / 8)); \
591 ff_hevc_put_bi_w##step##_##bitd##_##opt(dst, dststride, src, src2, \
592 height, denom, wx0, wx1, ox); \
596 mc_rep_bi_w(8, 6, 12, sse4)
597 mc_rep_bi_w(8, 8, 16, sse4)
598 mc_rep_bi_w(8, 8, 24, sse4)
599 mc_rep_bi_w(8, 8, 32, sse4)
600 mc_rep_bi_w(8, 8, 48, sse4)
601 mc_rep_bi_w(8, 8, 64, sse4)
603 mc_rep_bi_w(10, 6, 12, sse4)
604 mc_rep_bi_w(10, 8, 16, sse4)
605 mc_rep_bi_w(10, 8, 24, sse4)
606 mc_rep_bi_w(10, 8, 32, sse4)
607 mc_rep_bi_w(10, 8, 48, sse4)
608 mc_rep_bi_w(10, 8, 64, sse4)
610 mc_rep_bi_w(12, 6, 12, sse4)
611 mc_rep_bi_w(12, 8, 16, sse4)
612 mc_rep_bi_w(12, 8, 24, sse4)
613 mc_rep_bi_w(12, 8, 32, sse4)
614 mc_rep_bi_w(12, 8, 48, sse4)
615 mc_rep_bi_w(12, 8, 64, sse4)
617 #define mc_uni_w_func(name, bitd, W, opt) \
618 static void hevc_put_uni_w_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t _dststride, \
619 const uint8_t *_src, ptrdiff_t _srcstride, \
620 int height, int denom, \
622 intptr_t mx, intptr_t my, int width) \
624 LOCAL_ALIGNED_16(int16_t, temp, [71 * MAX_PB_SIZE]); \
625 hevc_put_##name##W##_##bitd##_##opt(temp, _src, _srcstride, height, mx, my, width); \
626 ff_hevc_put_uni_w##W##_##bitd##_##opt(_dst, _dststride, temp, height, denom, _wx, _ox); \
629 #define mc_uni_w_funcs(name, bitd, opt) \
630 mc_uni_w_func(name, bitd, 4, opt) \
631 mc_uni_w_func(name, bitd, 8, opt) \
632 mc_uni_w_func(name, bitd, 12, opt) \
633 mc_uni_w_func(name, bitd, 16, opt) \
634 mc_uni_w_func(name, bitd, 24, opt) \
635 mc_uni_w_func(name, bitd, 32, opt) \
636 mc_uni_w_func(name, bitd, 48, opt) \
637 mc_uni_w_func(name, bitd, 64, opt)
639 mc_uni_w_funcs(pel_pixels, 8, sse4)
640 mc_uni_w_func(pel_pixels, 8, 6, sse4)
641 mc_uni_w_funcs(epel_h, 8, sse4)
642 mc_uni_w_func(epel_h, 8, 6, sse4)
643 mc_uni_w_funcs(epel_v, 8, sse4)
644 mc_uni_w_func(epel_v, 8, 6, sse4)
645 mc_uni_w_funcs(epel_hv, 8, sse4)
646 mc_uni_w_func(epel_hv, 8, 6, sse4)
647 mc_uni_w_funcs(qpel_h, 8, sse4)
648 mc_uni_w_funcs(qpel_v, 8, sse4)
649 mc_uni_w_funcs(qpel_hv, 8, sse4)
651 mc_uni_w_funcs(pel_pixels, 10, sse4)
652 mc_uni_w_func(pel_pixels, 10, 6, sse4)
653 mc_uni_w_funcs(epel_h, 10, sse4)
654 mc_uni_w_func(epel_h, 10, 6, sse4)
655 mc_uni_w_funcs(epel_v, 10, sse4)
656 mc_uni_w_func(epel_v, 10, 6, sse4)
657 mc_uni_w_funcs(epel_hv, 10, sse4)
658 mc_uni_w_func(epel_hv, 10, 6, sse4)
659 mc_uni_w_funcs(qpel_h, 10, sse4)
660 mc_uni_w_funcs(qpel_v, 10, sse4)
661 mc_uni_w_funcs(qpel_hv, 10, sse4)
663 mc_uni_w_funcs(pel_pixels, 12, sse4)
664 mc_uni_w_func(pel_pixels, 12, 6, sse4)
665 mc_uni_w_funcs(epel_h, 12, sse4)
666 mc_uni_w_func(epel_h, 12, 6, sse4)
667 mc_uni_w_funcs(epel_v, 12, sse4)
668 mc_uni_w_func(epel_v, 12, 6, sse4)
669 mc_uni_w_funcs(epel_hv, 12, sse4)
670 mc_uni_w_func(epel_hv, 12, 6, sse4)
671 mc_uni_w_funcs(qpel_h, 12, sse4)
672 mc_uni_w_funcs(qpel_v, 12, sse4)
673 mc_uni_w_funcs(qpel_hv, 12, sse4)
675 #define mc_bi_w_func(name, bitd, W, opt) \
676 static void hevc_put_bi_w_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t _dststride, \
677 const uint8_t *_src, ptrdiff_t _srcstride, \
678 const int16_t *_src2, \
679 int height, int denom, \
680 int wx0, int wx1, int ox, \
681 intptr_t mx, intptr_t my, int width) \
683 LOCAL_ALIGNED_16(int16_t, temp, [71 * MAX_PB_SIZE]); \
684 hevc_put_##name##W##_##bitd##_##opt(temp, _src, _srcstride, height, mx, my, width); \
685 ff_hevc_put_bi_w##W##_##bitd##_##opt(_dst, _dststride, temp, _src2, \
686 height, denom, wx0, wx1, ox); \
689 #define mc_bi_w_funcs(name, bitd, opt) \
690 mc_bi_w_func(name, bitd, 4, opt) \
691 mc_bi_w_func(name, bitd, 8, opt) \
692 mc_bi_w_func(name, bitd, 12, opt) \
693 mc_bi_w_func(name, bitd, 16, opt) \
694 mc_bi_w_func(name, bitd, 24, opt) \
695 mc_bi_w_func(name, bitd, 32, opt) \
696 mc_bi_w_func(name, bitd, 48, opt) \
697 mc_bi_w_func(name, bitd, 64, opt)
699 mc_bi_w_funcs(pel_pixels, 8, sse4)
700 mc_bi_w_func(pel_pixels, 8, 6, sse4)
701 mc_bi_w_funcs(epel_h, 8, sse4)
702 mc_bi_w_func(epel_h, 8, 6, sse4)
703 mc_bi_w_funcs(epel_v, 8, sse4)
704 mc_bi_w_func(epel_v, 8, 6, sse4)
705 mc_bi_w_funcs(epel_hv, 8, sse4)
706 mc_bi_w_func(epel_hv, 8, 6, sse4)
707 mc_bi_w_funcs(qpel_h, 8, sse4)
708 mc_bi_w_funcs(qpel_v, 8, sse4)
709 mc_bi_w_funcs(qpel_hv, 8, sse4)
711 mc_bi_w_funcs(pel_pixels, 10, sse4)
712 mc_bi_w_func(pel_pixels, 10, 6, sse4)
713 mc_bi_w_funcs(epel_h, 10, sse4)
714 mc_bi_w_func(epel_h, 10, 6, sse4)
715 mc_bi_w_funcs(epel_v, 10, sse4)
716 mc_bi_w_func(epel_v, 10, 6, sse4)
717 mc_bi_w_funcs(epel_hv, 10, sse4)
718 mc_bi_w_func(epel_hv, 10, 6, sse4)
719 mc_bi_w_funcs(qpel_h, 10, sse4)
720 mc_bi_w_funcs(qpel_v, 10, sse4)
721 mc_bi_w_funcs(qpel_hv, 10, sse4)
723 mc_bi_w_funcs(pel_pixels, 12, sse4)
724 mc_bi_w_func(pel_pixels, 12, 6, sse4)
725 mc_bi_w_funcs(epel_h, 12, sse4)
726 mc_bi_w_func(epel_h, 12, 6, sse4)
727 mc_bi_w_funcs(epel_v, 12, sse4)
728 mc_bi_w_func(epel_v, 12, 6, sse4)
729 mc_bi_w_funcs(epel_hv, 12, sse4)
730 mc_bi_w_func(epel_hv, 12, 6, sse4)
731 mc_bi_w_funcs(qpel_h, 12, sse4)
732 mc_bi_w_funcs(qpel_v, 12, sse4)
733 mc_bi_w_funcs(qpel_hv, 12, sse4)
734 #endif //ARCH_X86_64 && HAVE_SSE4_EXTERNAL
736 #define SAO_BAND_FILTER_FUNCS(bitd, opt) \
737 void ff_hevc_sao_band_filter_8_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
738 const int16_t *sao_offset_val, int sao_left_class, int width, int height); \
739 void ff_hevc_sao_band_filter_16_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
740 const int16_t *sao_offset_val, int sao_left_class, int width, int height); \
741 void ff_hevc_sao_band_filter_32_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
742 const int16_t *sao_offset_val, int sao_left_class, int width, int height); \
743 void ff_hevc_sao_band_filter_48_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
744 const int16_t *sao_offset_val, int sao_left_class, int width, int height); \
745 void ff_hevc_sao_band_filter_64_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, \
746 const int16_t *sao_offset_val, int sao_left_class, int width, int height);
758 #define SAO_BAND_INIT(bitd, opt) do { \
759 c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_##bitd##_##opt; \
760 c->sao_band_filter[1] = ff_hevc_sao_band_filter_16_##bitd##_##opt; \
761 c->sao_band_filter[2] = ff_hevc_sao_band_filter_32_##bitd##_##opt; \
762 c->sao_band_filter[3] = ff_hevc_sao_band_filter_48_##bitd##_##opt; \
763 c->sao_band_filter[4] = ff_hevc_sao_band_filter_64_##bitd##_##opt; \
766 #define SAO_EDGE_FILTER_FUNCS(bitd, opt) \
767 void ff_hevc_sao_edge_filter_8_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, \
768 const int16_t *sao_offset_val, int eo, int width, int height); \
769 void ff_hevc_sao_edge_filter_16_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, \
770 const int16_t *sao_offset_val, int eo, int width, int height); \
771 void ff_hevc_sao_edge_filter_32_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, \
772 const int16_t *sao_offset_val, int eo, int width, int height); \
773 void ff_hevc_sao_edge_filter_48_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, \
774 const int16_t *sao_offset_val, int eo, int width, int height); \
775 void ff_hevc_sao_edge_filter_64_##bitd##_##opt(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst, \
776 const int16_t *sao_offset_val, int eo, int width, int height); \
785 #define SAO_EDGE_INIT(bitd, opt) do { \
786 c->sao_edge_filter[0] = ff_hevc_sao_edge_filter_8_##bitd##_##opt; \
787 c->sao_edge_filter[1] = ff_hevc_sao_edge_filter_16_##bitd##_##opt; \
788 c->sao_edge_filter[2] = ff_hevc_sao_edge_filter_32_##bitd##_##opt; \
789 c->sao_edge_filter[3] = ff_hevc_sao_edge_filter_48_##bitd##_##opt; \
790 c->sao_edge_filter[4] = ff_hevc_sao_edge_filter_64_##bitd##_##opt; \
793 #define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt) \
794 dst [idx1][idx2][idx3] = hevc_put_ ## name ## _ ## D ## _##opt; \
795 dst ## _bi [idx1][idx2][idx3] = ff_hevc_put_bi_ ## name ## _ ## D ## _##opt; \
796 dst ## _uni [idx1][idx2][idx3] = hevc_put_uni_ ## name ## _ ## D ## _##opt; \
797 dst ## _uni_w[idx1][idx2][idx3] = hevc_put_uni_w_ ## name ## _ ## D ## _##opt; \
798 dst ## _bi_w [idx1][idx2][idx3] = hevc_put_bi_w_ ## name ## _ ## D ## _##opt
800 #define EPEL_LINKS(pointer, my, mx, fname, bitd, opt ) \
801 PEL_LINK(pointer, 1, my , mx , fname##4 , bitd, opt ); \
802 PEL_LINK(pointer, 2, my , mx , fname##6 , bitd, opt ); \
803 PEL_LINK(pointer, 3, my , mx , fname##8 , bitd, opt ); \
804 PEL_LINK(pointer, 4, my , mx , fname##12, bitd, opt ); \
805 PEL_LINK(pointer, 5, my , mx , fname##16, bitd, opt ); \
806 PEL_LINK(pointer, 6, my , mx , fname##24, bitd, opt ); \
807 PEL_LINK(pointer, 7, my , mx , fname##32, bitd, opt ); \
808 PEL_LINK(pointer, 8, my , mx , fname##48, bitd, opt ); \
809 PEL_LINK(pointer, 9, my , mx , fname##64, bitd, opt )
810 #define QPEL_LINKS(pointer, my, mx, fname, bitd, opt) \
811 PEL_LINK(pointer, 1, my , mx , fname##4 , bitd, opt ); \
812 PEL_LINK(pointer, 3, my , mx , fname##8 , bitd, opt ); \
813 PEL_LINK(pointer, 4, my , mx , fname##12, bitd, opt ); \
814 PEL_LINK(pointer, 5, my , mx , fname##16, bitd, opt ); \
815 PEL_LINK(pointer, 6, my , mx , fname##24, bitd, opt ); \
816 PEL_LINK(pointer, 7, my , mx , fname##32, bitd, opt ); \
817 PEL_LINK(pointer, 8, my , mx , fname##48, bitd, opt ); \
818 PEL_LINK(pointer, 9, my , mx , fname##64, bitd, opt )
828 c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2;
829 c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2;
831 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2;
832 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2;
834 c->idct[2] = ff_hevc_idct_16x16_8_sse2;
835 c->idct[3] = ff_hevc_idct_32x32_8_sse2;
839 c->idct_dc[0] = ff_hevc_idct_4x4_dc_8_sse2;
840 c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_sse2;
841 c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_sse2;
842 c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_sse2;
844 c->idct[0] = ff_hevc_idct_4x4_8_sse2;
845 c->idct[1] = ff_hevc_idct_8x8_8_sse2;
846 c->transform_4x4_luma = ff_hevc_transform_4x4_luma_8_sse2;
854 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3;
855 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3;
860 #if HAVE_SSE4_EXTERNAL && ARCH_X86_64
863 EPEL_LINKS(
c->put_hevc_epel, 0, 0, pel_pixels, 8, sse4);
864 EPEL_LINKS(
c->put_hevc_epel, 0, 1, epel_h, 8, sse4);
865 EPEL_LINKS(
c->put_hevc_epel, 1, 0, epel_v, 8, sse4);
866 EPEL_LINKS(
c->put_hevc_epel, 1, 1, epel_hv, 8, sse4);
868 QPEL_LINKS(
c->put_hevc_qpel, 0, 0, pel_pixels, 8, sse4);
869 QPEL_LINKS(
c->put_hevc_qpel, 0, 1, qpel_h, 8, sse4);
870 QPEL_LINKS(
c->put_hevc_qpel, 1, 0, qpel_v, 8, sse4);
871 QPEL_LINKS(
c->put_hevc_qpel, 1, 1, qpel_hv, 8, sse4);
875 c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx;
876 c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx;
878 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx;
879 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx;
881 c->idct[2] = ff_hevc_idct_16x16_8_avx;
882 c->idct[3] = ff_hevc_idct_32x32_8_avx;
886 c->idct[0] = ff_hevc_idct_4x4_8_avx;
887 c->idct[1] = ff_hevc_idct_8x8_8_avx;
888 c->transform_4x4_luma = ff_hevc_transform_4x4_luma_8_avx;
891 c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_8_avx2;
892 c->sao_band_filter[1] = ff_hevc_sao_band_filter_16_8_avx2;
894 #if HAVE_AVX2_EXTERNAL
896 c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_avx2;
897 c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_avx2;
900 c->put_hevc_epel[7][0][0] = hevc_put_pel_pixels32_8_avx2;
901 c->put_hevc_epel[8][0][0] = hevc_put_pel_pixels48_8_avx2;
902 c->put_hevc_epel[9][0][0] = hevc_put_pel_pixels64_8_avx2;
904 c->put_hevc_qpel[7][0][0] = hevc_put_pel_pixels32_8_avx2;
905 c->put_hevc_qpel[8][0][0] = hevc_put_pel_pixels48_8_avx2;
906 c->put_hevc_qpel[9][0][0] = hevc_put_pel_pixels64_8_avx2;
908 c->put_hevc_epel_uni[7][0][0] = hevc_put_uni_pel_pixels32_8_avx2;
909 c->put_hevc_epel_uni[8][0][0] = hevc_put_uni_pel_pixels48_8_avx2;
910 c->put_hevc_epel_uni[9][0][0] = hevc_put_uni_pel_pixels64_8_avx2;
912 c->put_hevc_qpel_uni[7][0][0] = hevc_put_uni_pel_pixels32_8_avx2;
913 c->put_hevc_qpel_uni[8][0][0] = hevc_put_uni_pel_pixels48_8_avx2;
914 c->put_hevc_qpel_uni[9][0][0] = hevc_put_uni_pel_pixels64_8_avx2;
916 c->put_hevc_qpel_bi[7][0][0] = ff_hevc_put_bi_pel_pixels32_8_avx2;
917 c->put_hevc_qpel_bi[8][0][0] = ff_hevc_put_bi_pel_pixels48_8_avx2;
918 c->put_hevc_qpel_bi[9][0][0] = ff_hevc_put_bi_pel_pixels64_8_avx2;
920 c->put_hevc_epel_bi[7][0][0] = ff_hevc_put_bi_pel_pixels32_8_avx2;
921 c->put_hevc_epel_bi[8][0][0] = ff_hevc_put_bi_pel_pixels48_8_avx2;
922 c->put_hevc_epel_bi[9][0][0] = ff_hevc_put_bi_pel_pixels64_8_avx2;
924 c->put_hevc_epel[7][0][1] = hevc_put_epel_h32_8_avx2;
925 c->put_hevc_epel[8][0][1] = hevc_put_epel_h48_8_avx2;
926 c->put_hevc_epel[9][0][1] = hevc_put_epel_h64_8_avx2;
928 c->put_hevc_epel_uni[7][0][1] = hevc_put_uni_epel_h32_8_avx2;
929 c->put_hevc_epel_uni[8][0][1] = hevc_put_uni_epel_h48_8_avx2;
930 c->put_hevc_epel_uni[9][0][1] = hevc_put_uni_epel_h64_8_avx2;
932 c->put_hevc_epel_bi[7][0][1] = ff_hevc_put_bi_epel_h32_8_avx2;
933 c->put_hevc_epel_bi[8][0][1] = ff_hevc_put_bi_epel_h48_8_avx2;
934 c->put_hevc_epel_bi[9][0][1] = ff_hevc_put_bi_epel_h64_8_avx2;
936 c->put_hevc_epel[7][1][0] = hevc_put_epel_v32_8_avx2;
937 c->put_hevc_epel[8][1][0] = hevc_put_epel_v48_8_avx2;
938 c->put_hevc_epel[9][1][0] = hevc_put_epel_v64_8_avx2;
940 c->put_hevc_epel_uni[7][1][0] = hevc_put_uni_epel_v32_8_avx2;
941 c->put_hevc_epel_uni[8][1][0] = hevc_put_uni_epel_v48_8_avx2;
942 c->put_hevc_epel_uni[9][1][0] = hevc_put_uni_epel_v64_8_avx2;
944 c->put_hevc_epel_bi[7][1][0] = ff_hevc_put_bi_epel_v32_8_avx2;
945 c->put_hevc_epel_bi[8][1][0] = ff_hevc_put_bi_epel_v48_8_avx2;
946 c->put_hevc_epel_bi[9][1][0] = ff_hevc_put_bi_epel_v64_8_avx2;
948 c->put_hevc_epel[7][1][1] = hevc_put_epel_hv32_8_avx2;
949 c->put_hevc_epel[8][1][1] = hevc_put_epel_hv48_8_avx2;
950 c->put_hevc_epel[9][1][1] = hevc_put_epel_hv64_8_avx2;
952 c->put_hevc_epel_uni[7][1][1] = hevc_put_uni_epel_hv32_8_avx2;
953 c->put_hevc_epel_uni[8][1][1] = hevc_put_uni_epel_hv48_8_avx2;
954 c->put_hevc_epel_uni[9][1][1] = hevc_put_uni_epel_hv64_8_avx2;
956 c->put_hevc_epel_bi[7][1][1] = ff_hevc_put_bi_epel_hv32_8_avx2;
957 c->put_hevc_epel_bi[8][1][1] = ff_hevc_put_bi_epel_hv48_8_avx2;
958 c->put_hevc_epel_bi[9][1][1] = ff_hevc_put_bi_epel_hv64_8_avx2;
960 c->put_hevc_qpel[7][0][1] = hevc_put_qpel_h32_8_avx2;
961 c->put_hevc_qpel[8][0][1] = hevc_put_qpel_h48_8_avx2;
962 c->put_hevc_qpel[9][0][1] = hevc_put_qpel_h64_8_avx2;
964 c->put_hevc_qpel[7][1][0] = hevc_put_qpel_v32_8_avx2;
965 c->put_hevc_qpel[8][1][0] = hevc_put_qpel_v48_8_avx2;
966 c->put_hevc_qpel[9][1][0] = hevc_put_qpel_v64_8_avx2;
968 c->put_hevc_qpel_uni[7][0][1] = hevc_put_uni_qpel_h32_8_avx2;
969 c->put_hevc_qpel_uni[8][0][1] = hevc_put_uni_qpel_h48_8_avx2;
970 c->put_hevc_qpel_uni[9][0][1] = hevc_put_uni_qpel_h64_8_avx2;
972 c->put_hevc_qpel_uni[7][1][0] = hevc_put_uni_qpel_v32_8_avx2;
973 c->put_hevc_qpel_uni[8][1][0] = hevc_put_uni_qpel_v48_8_avx2;
974 c->put_hevc_qpel_uni[9][1][0] = hevc_put_uni_qpel_v64_8_avx2;
976 c->put_hevc_qpel_bi[7][0][1] = ff_hevc_put_bi_qpel_h32_8_avx2;
977 c->put_hevc_qpel_bi[8][0][1] = ff_hevc_put_bi_qpel_h48_8_avx2;
978 c->put_hevc_qpel_bi[9][0][1] = ff_hevc_put_bi_qpel_h64_8_avx2;
980 c->put_hevc_qpel_bi[7][1][0] = ff_hevc_put_bi_qpel_v32_8_avx2;
981 c->put_hevc_qpel_bi[8][1][0] = ff_hevc_put_bi_qpel_v48_8_avx2;
982 c->put_hevc_qpel_bi[9][1][0] = ff_hevc_put_bi_qpel_v64_8_avx2;
987 c->sao_edge_filter[2] = ff_hevc_sao_edge_filter_32_8_avx2;
988 c->sao_edge_filter[3] = ff_hevc_sao_edge_filter_48_8_avx2;
989 c->sao_edge_filter[4] = ff_hevc_sao_edge_filter_64_8_avx2;
1009 c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_10_sse2;
1010 c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_10_sse2;
1012 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_10_sse2;
1013 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_10_sse2;
1015 c->idct[2] = ff_hevc_idct_16x16_10_sse2;
1016 c->idct[3] = ff_hevc_idct_32x32_10_sse2;
1021 c->idct_dc[0] = ff_hevc_idct_4x4_dc_10_sse2;
1022 c->idct_dc[1] = ff_hevc_idct_8x8_dc_10_sse2;
1023 c->idct_dc[2] = ff_hevc_idct_16x16_dc_10_sse2;
1024 c->idct_dc[3] = ff_hevc_idct_32x32_dc_10_sse2;
1026 c->idct[0] = ff_hevc_idct_4x4_10_sse2;
1027 c->idct[1] = ff_hevc_idct_8x8_10_sse2;
1028 c->transform_4x4_luma = ff_hevc_transform_4x4_luma_10_sse2;
1036 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_10_ssse3;
1037 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_10_ssse3;
1040 #if HAVE_SSE4_EXTERNAL && ARCH_X86_64
1042 EPEL_LINKS(
c->put_hevc_epel, 0, 0, pel_pixels, 10, sse4);
1043 EPEL_LINKS(
c->put_hevc_epel, 0, 1, epel_h, 10, sse4);
1044 EPEL_LINKS(
c->put_hevc_epel, 1, 0, epel_v, 10, sse4);
1045 EPEL_LINKS(
c->put_hevc_epel, 1, 1, epel_hv, 10, sse4);
1047 QPEL_LINKS(
c->put_hevc_qpel, 0, 0, pel_pixels, 10, sse4);
1048 QPEL_LINKS(
c->put_hevc_qpel, 0, 1, qpel_h, 10, sse4);
1049 QPEL_LINKS(
c->put_hevc_qpel, 1, 0, qpel_v, 10, sse4);
1050 QPEL_LINKS(
c->put_hevc_qpel, 1, 1, qpel_hv, 10, sse4);
1054 c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_10_avx;
1055 c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_10_avx;
1057 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_10_avx;
1058 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_10_avx;
1060 c->idct[2] = ff_hevc_idct_16x16_10_avx;
1061 c->idct[3] = ff_hevc_idct_32x32_10_avx;
1064 c->idct[0] = ff_hevc_idct_4x4_10_avx;
1065 c->idct[1] = ff_hevc_idct_8x8_10_avx;
1066 c->transform_4x4_luma = ff_hevc_transform_4x4_luma_10_avx;
1071 c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_10_avx2;
1073 #if HAVE_AVX2_EXTERNAL
1075 c->idct_dc[2] = ff_hevc_idct_16x16_dc_10_avx2;
1076 c->idct_dc[3] = ff_hevc_idct_32x32_dc_10_avx2;
1079 c->put_hevc_epel[5][0][0] = hevc_put_pel_pixels16_10_avx2;
1080 c->put_hevc_epel[6][0][0] = hevc_put_pel_pixels24_10_avx2;
1081 c->put_hevc_epel[7][0][0] = hevc_put_pel_pixels32_10_avx2;
1082 c->put_hevc_epel[8][0][0] = hevc_put_pel_pixels48_10_avx2;
1083 c->put_hevc_epel[9][0][0] = hevc_put_pel_pixels64_10_avx2;
1085 c->put_hevc_qpel[5][0][0] = hevc_put_pel_pixels16_10_avx2;
1086 c->put_hevc_qpel[6][0][0] = hevc_put_pel_pixels24_10_avx2;
1087 c->put_hevc_qpel[7][0][0] = hevc_put_pel_pixels32_10_avx2;
1088 c->put_hevc_qpel[8][0][0] = hevc_put_pel_pixels48_10_avx2;
1089 c->put_hevc_qpel[9][0][0] = hevc_put_pel_pixels64_10_avx2;
1091 c->put_hevc_epel_uni[5][0][0] = hevc_put_uni_pel_pixels32_8_avx2;
1092 c->put_hevc_epel_uni[6][0][0] = hevc_put_uni_pel_pixels48_8_avx2;
1093 c->put_hevc_epel_uni[7][0][0] = hevc_put_uni_pel_pixels64_8_avx2;
1094 c->put_hevc_epel_uni[8][0][0] = hevc_put_uni_pel_pixels96_8_avx2;
1095 c->put_hevc_epel_uni[9][0][0] = hevc_put_uni_pel_pixels128_8_avx2;
1097 c->put_hevc_qpel_uni[5][0][0] = hevc_put_uni_pel_pixels32_8_avx2;
1098 c->put_hevc_qpel_uni[6][0][0] = hevc_put_uni_pel_pixels48_8_avx2;
1099 c->put_hevc_qpel_uni[7][0][0] = hevc_put_uni_pel_pixels64_8_avx2;
1100 c->put_hevc_qpel_uni[8][0][0] = hevc_put_uni_pel_pixels96_8_avx2;
1101 c->put_hevc_qpel_uni[9][0][0] = hevc_put_uni_pel_pixels128_8_avx2;
1103 c->put_hevc_epel_bi[5][0][0] = ff_hevc_put_bi_pel_pixels16_10_avx2;
1104 c->put_hevc_epel_bi[6][0][0] = ff_hevc_put_bi_pel_pixels24_10_avx2;
1105 c->put_hevc_epel_bi[7][0][0] = ff_hevc_put_bi_pel_pixels32_10_avx2;
1106 c->put_hevc_epel_bi[8][0][0] = ff_hevc_put_bi_pel_pixels48_10_avx2;
1107 c->put_hevc_epel_bi[9][0][0] = ff_hevc_put_bi_pel_pixels64_10_avx2;
1108 c->put_hevc_qpel_bi[5][0][0] = ff_hevc_put_bi_pel_pixels16_10_avx2;
1109 c->put_hevc_qpel_bi[6][0][0] = ff_hevc_put_bi_pel_pixels24_10_avx2;
1110 c->put_hevc_qpel_bi[7][0][0] = ff_hevc_put_bi_pel_pixels32_10_avx2;
1111 c->put_hevc_qpel_bi[8][0][0] = ff_hevc_put_bi_pel_pixels48_10_avx2;
1112 c->put_hevc_qpel_bi[9][0][0] = ff_hevc_put_bi_pel_pixels64_10_avx2;
1114 c->put_hevc_epel[5][0][1] = hevc_put_epel_h16_10_avx2;
1115 c->put_hevc_epel[6][0][1] = hevc_put_epel_h24_10_avx2;
1116 c->put_hevc_epel[7][0][1] = hevc_put_epel_h32_10_avx2;
1117 c->put_hevc_epel[8][0][1] = hevc_put_epel_h48_10_avx2;
1118 c->put_hevc_epel[9][0][1] = hevc_put_epel_h64_10_avx2;
1120 c->put_hevc_epel_uni[5][0][1] = hevc_put_uni_epel_h16_10_avx2;
1121 c->put_hevc_epel_uni[6][0][1] = hevc_put_uni_epel_h24_10_avx2;
1122 c->put_hevc_epel_uni[7][0][1] = hevc_put_uni_epel_h32_10_avx2;
1123 c->put_hevc_epel_uni[8][0][1] = hevc_put_uni_epel_h48_10_avx2;
1124 c->put_hevc_epel_uni[9][0][1] = hevc_put_uni_epel_h64_10_avx2;
1126 c->put_hevc_epel_bi[5][0][1] = ff_hevc_put_bi_epel_h16_10_avx2;
1127 c->put_hevc_epel_bi[6][0][1] = ff_hevc_put_bi_epel_h24_10_avx2;
1128 c->put_hevc_epel_bi[7][0][1] = ff_hevc_put_bi_epel_h32_10_avx2;
1129 c->put_hevc_epel_bi[8][0][1] = ff_hevc_put_bi_epel_h48_10_avx2;
1130 c->put_hevc_epel_bi[9][0][1] = ff_hevc_put_bi_epel_h64_10_avx2;
1132 c->put_hevc_epel[5][1][0] = hevc_put_epel_v16_10_avx2;
1133 c->put_hevc_epel[6][1][0] = hevc_put_epel_v24_10_avx2;
1134 c->put_hevc_epel[7][1][0] = hevc_put_epel_v32_10_avx2;
1135 c->put_hevc_epel[8][1][0] = hevc_put_epel_v48_10_avx2;
1136 c->put_hevc_epel[9][1][0] = hevc_put_epel_v64_10_avx2;
1138 c->put_hevc_epel_uni[5][1][0] = hevc_put_uni_epel_v16_10_avx2;
1139 c->put_hevc_epel_uni[6][1][0] = hevc_put_uni_epel_v24_10_avx2;
1140 c->put_hevc_epel_uni[7][1][0] = hevc_put_uni_epel_v32_10_avx2;
1141 c->put_hevc_epel_uni[8][1][0] = hevc_put_uni_epel_v48_10_avx2;
1142 c->put_hevc_epel_uni[9][1][0] = hevc_put_uni_epel_v64_10_avx2;
1144 c->put_hevc_epel_bi[5][1][0] = ff_hevc_put_bi_epel_v16_10_avx2;
1145 c->put_hevc_epel_bi[6][1][0] = ff_hevc_put_bi_epel_v24_10_avx2;
1146 c->put_hevc_epel_bi[7][1][0] = ff_hevc_put_bi_epel_v32_10_avx2;
1147 c->put_hevc_epel_bi[8][1][0] = ff_hevc_put_bi_epel_v48_10_avx2;
1148 c->put_hevc_epel_bi[9][1][0] = ff_hevc_put_bi_epel_v64_10_avx2;
1150 c->put_hevc_epel[5][1][1] = hevc_put_epel_hv16_10_avx2;
1151 c->put_hevc_epel[6][1][1] = hevc_put_epel_hv24_10_avx2;
1152 c->put_hevc_epel[7][1][1] = hevc_put_epel_hv32_10_avx2;
1153 c->put_hevc_epel[8][1][1] = hevc_put_epel_hv48_10_avx2;
1154 c->put_hevc_epel[9][1][1] = hevc_put_epel_hv64_10_avx2;
1156 c->put_hevc_epel_uni[5][1][1] = hevc_put_uni_epel_hv16_10_avx2;
1157 c->put_hevc_epel_uni[6][1][1] = hevc_put_uni_epel_hv24_10_avx2;
1158 c->put_hevc_epel_uni[7][1][1] = hevc_put_uni_epel_hv32_10_avx2;
1159 c->put_hevc_epel_uni[8][1][1] = hevc_put_uni_epel_hv48_10_avx2;
1160 c->put_hevc_epel_uni[9][1][1] = hevc_put_uni_epel_hv64_10_avx2;
1162 c->put_hevc_epel_bi[5][1][1] = ff_hevc_put_bi_epel_hv16_10_avx2;
1163 c->put_hevc_epel_bi[6][1][1] = ff_hevc_put_bi_epel_hv24_10_avx2;
1164 c->put_hevc_epel_bi[7][1][1] = ff_hevc_put_bi_epel_hv32_10_avx2;
1165 c->put_hevc_epel_bi[8][1][1] = ff_hevc_put_bi_epel_hv48_10_avx2;
1166 c->put_hevc_epel_bi[9][1][1] = ff_hevc_put_bi_epel_hv64_10_avx2;
1168 c->put_hevc_qpel[5][0][1] = hevc_put_qpel_h16_10_avx2;
1169 c->put_hevc_qpel[6][0][1] = hevc_put_qpel_h24_10_avx2;
1170 c->put_hevc_qpel[7][0][1] = hevc_put_qpel_h32_10_avx2;
1171 c->put_hevc_qpel[8][0][1] = hevc_put_qpel_h48_10_avx2;
1172 c->put_hevc_qpel[9][0][1] = hevc_put_qpel_h64_10_avx2;
1174 c->put_hevc_qpel_uni[5][0][1] = hevc_put_uni_qpel_h16_10_avx2;
1175 c->put_hevc_qpel_uni[6][0][1] = hevc_put_uni_qpel_h24_10_avx2;
1176 c->put_hevc_qpel_uni[7][0][1] = hevc_put_uni_qpel_h32_10_avx2;
1177 c->put_hevc_qpel_uni[8][0][1] = hevc_put_uni_qpel_h48_10_avx2;
1178 c->put_hevc_qpel_uni[9][0][1] = hevc_put_uni_qpel_h64_10_avx2;
1180 c->put_hevc_qpel_bi[5][0][1] = ff_hevc_put_bi_qpel_h16_10_avx2;
1181 c->put_hevc_qpel_bi[6][0][1] = ff_hevc_put_bi_qpel_h24_10_avx2;
1182 c->put_hevc_qpel_bi[7][0][1] = ff_hevc_put_bi_qpel_h32_10_avx2;
1183 c->put_hevc_qpel_bi[8][0][1] = ff_hevc_put_bi_qpel_h48_10_avx2;
1184 c->put_hevc_qpel_bi[9][0][1] = ff_hevc_put_bi_qpel_h64_10_avx2;
1186 c->put_hevc_qpel[5][1][0] = hevc_put_qpel_v16_10_avx2;
1187 c->put_hevc_qpel[6][1][0] = hevc_put_qpel_v24_10_avx2;
1188 c->put_hevc_qpel[7][1][0] = hevc_put_qpel_v32_10_avx2;
1189 c->put_hevc_qpel[8][1][0] = hevc_put_qpel_v48_10_avx2;
1190 c->put_hevc_qpel[9][1][0] = hevc_put_qpel_v64_10_avx2;
1192 c->put_hevc_qpel_uni[5][1][0] = hevc_put_uni_qpel_v16_10_avx2;
1193 c->put_hevc_qpel_uni[6][1][0] = hevc_put_uni_qpel_v24_10_avx2;
1194 c->put_hevc_qpel_uni[7][1][0] = hevc_put_uni_qpel_v32_10_avx2;
1195 c->put_hevc_qpel_uni[8][1][0] = hevc_put_uni_qpel_v48_10_avx2;
1196 c->put_hevc_qpel_uni[9][1][0] = hevc_put_uni_qpel_v64_10_avx2;
1198 c->put_hevc_qpel_bi[5][1][0] = ff_hevc_put_bi_qpel_v16_10_avx2;
1199 c->put_hevc_qpel_bi[6][1][0] = ff_hevc_put_bi_qpel_v24_10_avx2;
1200 c->put_hevc_qpel_bi[7][1][0] = ff_hevc_put_bi_qpel_v32_10_avx2;
1201 c->put_hevc_qpel_bi[8][1][0] = ff_hevc_put_bi_qpel_v48_10_avx2;
1202 c->put_hevc_qpel_bi[9][1][0] = ff_hevc_put_bi_qpel_v64_10_avx2;
1204 c->put_hevc_qpel[5][1][1] = hevc_put_qpel_hv16_10_avx2;
1205 c->put_hevc_qpel[6][1][1] = hevc_put_qpel_hv24_10_avx2;
1206 c->put_hevc_qpel[7][1][1] = hevc_put_qpel_hv32_10_avx2;
1207 c->put_hevc_qpel[8][1][1] = hevc_put_qpel_hv48_10_avx2;
1208 c->put_hevc_qpel[9][1][1] = hevc_put_qpel_hv64_10_avx2;
1210 c->put_hevc_qpel_uni[5][1][1] = hevc_put_uni_qpel_hv16_10_avx2;
1211 c->put_hevc_qpel_uni[6][1][1] = hevc_put_uni_qpel_hv24_10_avx2;
1212 c->put_hevc_qpel_uni[7][1][1] = hevc_put_uni_qpel_hv32_10_avx2;
1213 c->put_hevc_qpel_uni[8][1][1] = hevc_put_uni_qpel_hv48_10_avx2;
1214 c->put_hevc_qpel_uni[9][1][1] = hevc_put_uni_qpel_hv64_10_avx2;
1216 c->put_hevc_qpel_bi[5][1][1] = ff_hevc_put_bi_qpel_hv16_10_avx2;
1217 c->put_hevc_qpel_bi[6][1][1] = ff_hevc_put_bi_qpel_hv24_10_avx2;
1218 c->put_hevc_qpel_bi[7][1][1] = ff_hevc_put_bi_qpel_hv32_10_avx2;
1219 c->put_hevc_qpel_bi[8][1][1] = ff_hevc_put_bi_qpel_hv48_10_avx2;
1220 c->put_hevc_qpel_bi[9][1][1] = ff_hevc_put_bi_qpel_hv64_10_avx2;
1232 c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_12_sse2;
1233 c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_12_sse2;
1235 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_12_sse2;
1236 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_12_sse2;
1241 c->idct_dc[0] = ff_hevc_idct_4x4_dc_12_sse2;
1242 c->idct_dc[1] = ff_hevc_idct_8x8_dc_12_sse2;
1243 c->idct_dc[2] = ff_hevc_idct_16x16_dc_12_sse2;
1244 c->idct_dc[3] = ff_hevc_idct_32x32_dc_12_sse2;
1248 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_12_ssse3;
1249 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_12_ssse3;
1252 #if HAVE_SSE4_EXTERNAL && ARCH_X86_64
1254 EPEL_LINKS(
c->put_hevc_epel, 0, 0, pel_pixels, 12, sse4);
1255 EPEL_LINKS(
c->put_hevc_epel, 0, 1, epel_h, 12, sse4);
1256 EPEL_LINKS(
c->put_hevc_epel, 1, 0, epel_v, 12, sse4);
1257 EPEL_LINKS(
c->put_hevc_epel, 1, 1, epel_hv, 12, sse4);
1259 QPEL_LINKS(
c->put_hevc_qpel, 0, 0, pel_pixels, 12, sse4);
1260 QPEL_LINKS(
c->put_hevc_qpel, 0, 1, qpel_h, 12, sse4);
1261 QPEL_LINKS(
c->put_hevc_qpel, 1, 0, qpel_v, 12, sse4);
1262 QPEL_LINKS(
c->put_hevc_qpel, 1, 1, qpel_hv, 12, sse4);
1266 c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_12_avx;
1267 c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_12_avx;
1269 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_12_avx;
1270 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_12_avx;
1275 c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_12_avx2;
1278 c->idct_dc[2] = ff_hevc_idct_16x16_dc_12_avx2;
1279 c->idct_dc[3] = ff_hevc_idct_32x32_dc_12_avx2;