]> git.sesse.net Git - x264/commitdiff
Don't override flat SSE2 dequant functions with non-flat AVX ones
authorAnton Mitrofanov <BugMaster@narod.ru>
Mon, 15 Aug 2011 08:22:18 +0000 (12:22 +0400)
committerFiona Glaser <fiona@x264.com>
Wed, 24 Aug 2011 17:23:19 +0000 (10:23 -0700)
Slightly faster.

common/quant.c

index d939a33f55d99fc7704ad5da34d5e316915d1932..5be7f57f68751b206f48f14fdd1038068c2ffd27 100644 (file)
@@ -546,9 +546,12 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
 
     if( cpu&X264_CPU_AVX )
     {
-        pf->dequant_4x4 = x264_dequant_4x4_avx;
-        pf->dequant_8x8 = x264_dequant_8x8_avx;
         pf->dequant_4x4_dc = x264_dequant_4x4dc_avx;
+        if( h->param.i_cqm_preset != X264_CQM_FLAT )
+        {
+            pf->dequant_4x4 = x264_dequant_4x4_avx;
+            pf->dequant_8x8 = x264_dequant_8x8_avx;
+        }
         pf->optimize_chroma_dc = x264_optimize_chroma_dc_avx;
         pf->denoise_dct = x264_denoise_dct_avx;
     }