63 #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL 
   67 extern const int8_t ff_filters_ssse3[3][15][4][32];
 
   68 extern const int16_t ff_filters_sse2[3][15][8][8];
 
   74 #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL 
   85 #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL 
   92 #define itxfm_func(typea, typeb, size, opt) \ 
   93 void ff_vp9_##typea##_##typeb##_##size##x##size##_add_##opt(uint8_t *dst, ptrdiff_t stride, \ 
   94                                                             int16_t *block, int eob) 
   95 #define itxfm_funcs(size, opt) \ 
   96 itxfm_func(idct,  idct,  size, opt); \ 
   97 itxfm_func(iadst, idct,  size, opt); \ 
   98 itxfm_func(idct,  iadst, size, opt); \ 
   99 itxfm_func(iadst, iadst, size, opt) 
  102 itxfm_func(
idct,  iadst, 4, sse2);
 
  103 itxfm_func(iadst, 
idct,  4, sse2);
 
  104 itxfm_func(iadst, iadst, 4, sse2);
 
  105 itxfm_funcs(4, ssse3);
 
  106 itxfm_funcs(8, sse2);
 
  107 itxfm_funcs(8, ssse3);
 
  109 itxfm_funcs(16, sse2);
 
  110 itxfm_funcs(16, ssse3);
 
  111 itxfm_funcs(16, avx);
 
  115 itxfm_func(iwht, iwht, 4, mmx);
 
  116 itxfm_funcs(16, avx2);
 
  122 #define lpf_funcs(size1, size2, opt) \ 
  123 void ff_vp9_loop_filter_v_##size1##_##size2##_##opt(uint8_t *dst, ptrdiff_t stride, \ 
  124                                                     int E, int I, int H); \ 
  125 void ff_vp9_loop_filter_h_##size1##_##size2##_##opt(uint8_t *dst, ptrdiff_t stride, \ 
  128 lpf_funcs(4, 8, mmxext);
 
  129 lpf_funcs(8, 8, mmxext);
 
  130 lpf_funcs(16, 16, sse2);
 
  131 lpf_funcs(16, 16, ssse3);
 
  132 lpf_funcs(16, 16, avx);
 
  133 lpf_funcs(44, 16, sse2);
 
  134 lpf_funcs(44, 16, ssse3);
 
  135 lpf_funcs(44, 16, avx);
 
  136 lpf_funcs(84, 16, sse2);
 
  137 lpf_funcs(84, 16, ssse3);
 
  138 lpf_funcs(84, 16, avx);
 
  139 lpf_funcs(48, 16, sse2);
 
  140 lpf_funcs(48, 16, ssse3);
 
  141 lpf_funcs(48, 16, avx);
 
  142 lpf_funcs(88, 16, sse2);
 
  143 lpf_funcs(88, 16, ssse3);
 
  144 lpf_funcs(88, 16, avx);
 
  148 #define ipred_func(size, type, opt) \ 
  149 void ff_vp9_ipred_##type##_##size##x##size##_##opt(uint8_t *dst, ptrdiff_t stride, \ 
  150                                                    const uint8_t *l, const uint8_t *a) 
  152 ipred_func(8, v, mmx);
 
  154 #define ipred_dc_funcs(size, opt) \ 
  155 ipred_func(size, dc, opt); \ 
  156 ipred_func(size, dc_left, opt); \ 
  157 ipred_func(size, dc_top, opt) 
  159 ipred_dc_funcs(4, mmxext);
 
  160 ipred_dc_funcs(8, mmxext);
 
  162 #define ipred_dir_tm_funcs(size, opt) \ 
  163 ipred_func(size, tm, opt); \ 
  164 ipred_func(size, dl, opt); \ 
  165 ipred_func(size, dr, opt); \ 
  166 ipred_func(size, hd, opt); \ 
  167 ipred_func(size, hu, opt); \ 
  168 ipred_func(size, vl, opt); \ 
  169 ipred_func(size, vr, opt) 
  171 ipred_dir_tm_funcs(4, mmxext);
 
  173 ipred_func(16, v, 
sse);
 
  174 ipred_func(32, v, 
sse);
 
  176 ipred_dc_funcs(16, sse2);
 
  177 ipred_dc_funcs(32, sse2);
 
  179 #define ipred_dir_tm_h_funcs(size, opt) \ 
  180 ipred_dir_tm_funcs(size, opt); \ 
  181 ipred_func(size, h, opt) 
  183 ipred_dir_tm_h_funcs(8, sse2);
 
  184 ipred_dir_tm_h_funcs(16, sse2);
 
  185 ipred_dir_tm_h_funcs(32, sse2);
 
  187 ipred_func(4, 
h, sse2);
 
  189 #define ipred_all_funcs(size, opt) \ 
  190 ipred_dc_funcs(size, opt); \ 
  191 ipred_dir_tm_h_funcs(size, opt) 
  194 ipred_all_funcs(4, ssse3);
 
  195 ipred_all_funcs(8, ssse3);
 
  196 ipred_all_funcs(16, ssse3);
 
  197 ipred_all_funcs(32, ssse3);
 
  199 ipred_dir_tm_h_funcs(8, avx);
 
  200 ipred_dir_tm_h_funcs(16, avx);
 
  201 ipred_dir_tm_h_funcs(32, avx);
 
  203 ipred_func(32, v, avx);
 
  205 ipred_dc_funcs(32, avx2);
 
  206 ipred_func(32, 
h, avx2);
 
  207 ipred_func(32, tm, avx2);
 
  210 #undef ipred_dir_tm_h_funcs 
  211 #undef ipred_dir_tm_funcs 
  212 #undef ipred_dc_funcs 
  224     } 
else if (bpp == 12) {
 
  231 #define init_lpf(opt) do { \ 
  232     dsp->loop_filter_16[0] = ff_vp9_loop_filter_h_16_16_##opt; \ 
  233     dsp->loop_filter_16[1] = ff_vp9_loop_filter_v_16_16_##opt; \ 
  234     dsp->loop_filter_mix2[0][0][0] = ff_vp9_loop_filter_h_44_16_##opt; \ 
  235     dsp->loop_filter_mix2[0][0][1] = ff_vp9_loop_filter_v_44_16_##opt; \ 
  236     dsp->loop_filter_mix2[0][1][0] = ff_vp9_loop_filter_h_48_16_##opt; \ 
  237     dsp->loop_filter_mix2[0][1][1] = ff_vp9_loop_filter_v_48_16_##opt; \ 
  238     dsp->loop_filter_mix2[1][0][0] = ff_vp9_loop_filter_h_84_16_##opt; \ 
  239     dsp->loop_filter_mix2[1][0][1] = ff_vp9_loop_filter_v_84_16_##opt; \ 
  240     dsp->loop_filter_mix2[1][1][0] = ff_vp9_loop_filter_h_88_16_##opt; \ 
  241     dsp->loop_filter_mix2[1][1][1] = ff_vp9_loop_filter_v_88_16_##opt; \ 
  244 #define init_ipred(sz, opt, t, e) \ 
  245     dsp->intra_pred[TX_##sz##X##sz][e##_PRED] = ff_vp9_ipred_##t##_##sz##x##sz##_##opt 
  247 #define ff_vp9_ipred_hd_4x4_ssse3 ff_vp9_ipred_hd_4x4_mmxext 
  248 #define ff_vp9_ipred_vl_4x4_ssse3 ff_vp9_ipred_vl_4x4_mmxext 
  249 #define init_dir_tm_ipred(sz, opt) do { \ 
  250     init_ipred(sz, opt, dl, DIAG_DOWN_LEFT); \ 
  251     init_ipred(sz, opt, dr, DIAG_DOWN_RIGHT); \ 
  252     init_ipred(sz, opt, hd, HOR_DOWN); \ 
  253     init_ipred(sz, opt, vl, VERT_LEFT); \ 
  254     init_ipred(sz, opt, hu, HOR_UP); \ 
  255     init_ipred(sz, opt, tm, TM_VP8); \ 
  256     init_ipred(sz, opt, vr, VERT_RIGHT); \ 
  258 #define init_dir_tm_h_ipred(sz, opt) do { \ 
  259     init_dir_tm_ipred(sz, opt); \ 
  260     init_ipred(sz, opt, h,  HOR); \ 
  262 #define init_dc_ipred(sz, opt) do { \ 
  263     init_ipred(sz, opt, dc,      DC); \ 
  264     init_ipred(sz, opt, dc_left, LEFT_DC); \ 
  265     init_ipred(sz, opt, dc_top,  TOP_DC); \ 
  267 #define init_all_ipred(sz, opt) do { \ 
  268     init_dc_ipred(sz, opt); \ 
  269     init_dir_tm_h_ipred(sz, opt); \ 
  281         init_ipred(8, mmx, v, VERT);
 
  294         init_dc_ipred(4, mmxext);
 
  295         init_dc_ipred(8, mmxext);
 
  296         init_dir_tm_ipred(4, mmxext);
 
  303         init_ipred(16, 
sse, v, VERT);
 
  304         init_ipred(32, 
sse, v, VERT);
 
  329         init_dc_ipred(16, sse2);
 
  330         init_dc_ipred(32, sse2);
 
  331         init_dir_tm_h_ipred(8, sse2);
 
  332         init_dir_tm_h_ipred(16, sse2);
 
  333         init_dir_tm_h_ipred(32, sse2);
 
  334         init_ipred(4, sse2, 
h, HOR);
 
  357         init_all_ipred(4, ssse3);
 
  358         init_all_ipred(8, ssse3);
 
  359         init_all_ipred(16, ssse3);
 
  360         init_all_ipred(32, ssse3);
 
  377         init_dir_tm_h_ipred(8, avx);
 
  378         init_dir_tm_h_ipred(16, avx);
 
  379         init_dir_tm_h_ipred(32, avx);
 
  384         init_ipred(32, avx, v, VERT);
 
  391 #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL 
  404         init_dc_ipred(32, avx2);
 
  405         init_ipred(32, avx2, 
h,  HOR);
 
  406         init_ipred(32, avx2, tm, TM_VP8);