+ pf->idct_dequant_2x4_dc = idct_dequant_2x4_dc;
+ pf->idct_dequant_2x4_dconly = idct_dequant_2x4_dconly;
+
+ pf->optimize_chroma_2x2_dc = optimize_chroma_2x2_dc;
+ pf->optimize_chroma_2x4_dc = optimize_chroma_2x4_dc;
+
+ pf->denoise_dct = x264_denoise_dct;
+ pf->decimate_score15 = x264_decimate_score15;
+ pf->decimate_score16 = x264_decimate_score16;
+ pf->decimate_score64 = x264_decimate_score64;
+
+ pf->coeff_last4 = x264_coeff_last4;
+ pf->coeff_last8 = x264_coeff_last8;
+ pf->coeff_last[ DCT_LUMA_AC] = x264_coeff_last15;
+ pf->coeff_last[ DCT_LUMA_4x4] = x264_coeff_last16;
+ pf->coeff_last[ DCT_LUMA_8x8] = x264_coeff_last64;
+ pf->coeff_level_run4 = x264_coeff_level_run4;
+ pf->coeff_level_run8 = x264_coeff_level_run8;
+ pf->coeff_level_run[ DCT_LUMA_AC] = x264_coeff_level_run15;
+ pf->coeff_level_run[ DCT_LUMA_4x4] = x264_coeff_level_run16;
+
+#if HIGH_BIT_DEPTH
+#if HAVE_MMX
+ INIT_TRELLIS( sse2 );
+ if( cpu&X264_CPU_MMX2 )
+ {
+#if ARCH_X86
+ pf->denoise_dct = x264_denoise_dct_mmx;
+ pf->decimate_score15 = x264_decimate_score15_mmx2;
+ pf->decimate_score16 = x264_decimate_score16_mmx2;
+ pf->decimate_score64 = x264_decimate_score64_mmx2;
+ pf->coeff_last8 = x264_coeff_last8_mmx2;
+ pf->coeff_last[ DCT_LUMA_AC] = x264_coeff_last15_mmx2;
+ pf->coeff_last[ DCT_LUMA_4x4] = x264_coeff_last16_mmx2;
+ pf->coeff_last[ DCT_LUMA_8x8] = x264_coeff_last64_mmx2;
+ pf->coeff_level_run8 = x264_coeff_level_run8_mmx2;
+ pf->coeff_level_run[ DCT_LUMA_AC] = x264_coeff_level_run15_mmx2;
+ pf->coeff_level_run[ DCT_LUMA_4x4] = x264_coeff_level_run16_mmx2;
+#endif
+ pf->coeff_last4 = x264_coeff_last4_mmx2;
+ pf->coeff_level_run4 = x264_coeff_level_run4_mmx2;
+ if( cpu&X264_CPU_LZCNT )
+ pf->coeff_level_run4 = x264_coeff_level_run4_mmx2_lzcnt;
+ }
+ if( cpu&X264_CPU_SSE2 )
+ {
+ pf->quant_4x4 = x264_quant_4x4_sse2;
+ pf->quant_4x4x4 = x264_quant_4x4x4_sse2;
+ pf->quant_8x8 = x264_quant_8x8_sse2;
+ pf->quant_2x2_dc = x264_quant_2x2_dc_sse2;
+ pf->quant_4x4_dc = x264_quant_4x4_dc_sse2;
+ pf->dequant_4x4 = x264_dequant_4x4_sse2;
+ pf->dequant_8x8 = x264_dequant_8x8_sse2;
+ pf->dequant_4x4_dc = x264_dequant_4x4dc_sse2;
+ pf->idct_dequant_2x4_dc = x264_idct_dequant_2x4_dc_sse2;
+ pf->idct_dequant_2x4_dconly = x264_idct_dequant_2x4_dconly_sse2;
+ pf->denoise_dct = x264_denoise_dct_sse2;
+ pf->decimate_score15 = x264_decimate_score15_sse2;
+ pf->decimate_score16 = x264_decimate_score16_sse2;
+ pf->decimate_score64 = x264_decimate_score64_sse2;
+ pf->coeff_last8 = x264_coeff_last8_sse2;
+ pf->coeff_last[ DCT_LUMA_AC] = x264_coeff_last15_sse2;
+ pf->coeff_last[DCT_LUMA_4x4] = x264_coeff_last16_sse2;
+ pf->coeff_last[DCT_LUMA_8x8] = x264_coeff_last64_sse2;
+ pf->coeff_level_run8 = x264_coeff_level_run8_sse2;
+ pf->coeff_level_run[ DCT_LUMA_AC] = x264_coeff_level_run15_sse2;
+ pf->coeff_level_run[DCT_LUMA_4x4] = x264_coeff_level_run16_sse2;
+ if( cpu&X264_CPU_LZCNT )
+ {
+ pf->coeff_last4 = x264_coeff_last4_mmx2_lzcnt;
+ pf->coeff_last8 = x264_coeff_last8_sse2_lzcnt;
+ pf->coeff_last[ DCT_LUMA_AC] = x264_coeff_last15_sse2_lzcnt;
+ pf->coeff_last[DCT_LUMA_4x4] = x264_coeff_last16_sse2_lzcnt;
+ pf->coeff_last[DCT_LUMA_8x8] = x264_coeff_last64_sse2_lzcnt;
+ pf->coeff_level_run8 = x264_coeff_level_run8_sse2_lzcnt;
+ pf->coeff_level_run[ DCT_LUMA_AC] = x264_coeff_level_run15_sse2_lzcnt;
+ pf->coeff_level_run[DCT_LUMA_4x4] = x264_coeff_level_run16_sse2_lzcnt;
+ }
+ }
+ if( cpu&X264_CPU_SSSE3 )
+ {
+ pf->quant_4x4 = x264_quant_4x4_ssse3;
+ pf->quant_4x4x4 = x264_quant_4x4x4_ssse3;
+ pf->quant_8x8 = x264_quant_8x8_ssse3;
+ pf->quant_2x2_dc = x264_quant_2x2_dc_ssse3;
+ pf->quant_4x4_dc = x264_quant_4x4_dc_ssse3;
+ pf->denoise_dct = x264_denoise_dct_ssse3;
+ pf->decimate_score15 = x264_decimate_score15_ssse3;
+ pf->decimate_score16 = x264_decimate_score16_ssse3;
+ pf->decimate_score64 = x264_decimate_score64_ssse3;
+ INIT_TRELLIS( ssse3 );
+ }
+ if( cpu&X264_CPU_SSE4 )
+ {
+ pf->quant_2x2_dc = x264_quant_2x2_dc_sse4;
+ pf->quant_4x4_dc = x264_quant_4x4_dc_sse4;
+ pf->quant_4x4 = x264_quant_4x4_sse4;
+ pf->quant_4x4x4 = x264_quant_4x4x4_sse4;
+ pf->quant_8x8 = x264_quant_8x8_sse4;
+ }
+ if( cpu&X264_CPU_AVX )
+ {
+ pf->idct_dequant_2x4_dc = x264_idct_dequant_2x4_dc_avx;
+ pf->idct_dequant_2x4_dconly = x264_idct_dequant_2x4_dconly_avx;
+ pf->denoise_dct = x264_denoise_dct_avx;
+ }
+ if( cpu&X264_CPU_XOP )
+ {
+ pf->dequant_4x4_dc = x264_dequant_4x4dc_xop;
+ if( h->param.i_cqm_preset != X264_CQM_FLAT )
+ {
+ pf->dequant_4x4 = x264_dequant_4x4_xop;
+ pf->dequant_8x8 = x264_dequant_8x8_xop;
+ }
+ }
+ if( cpu&X264_CPU_AVX2 )
+ {
+ pf->quant_4x4 = x264_quant_4x4_avx2;
+ pf->quant_4x4_dc = x264_quant_4x4_dc_avx2;
+ pf->quant_8x8 = x264_quant_8x8_avx2;
+ pf->quant_4x4x4 = x264_quant_4x4x4_avx2;
+ pf->dequant_4x4 = x264_dequant_4x4_avx2;
+ pf->dequant_8x8 = x264_dequant_8x8_avx2;
+ pf->dequant_4x4_dc = x264_dequant_4x4dc_avx2;
+ pf->denoise_dct = x264_denoise_dct_avx2;
+ if( cpu&X264_CPU_LZCNT )
+ pf->coeff_last[DCT_LUMA_8x8] = x264_coeff_last64_avx2_lzcnt;
+ }
+#endif // HAVE_MMX
+#else // !HIGH_BIT_DEPTH
+#if HAVE_MMX
+ INIT_TRELLIS( sse2 );