]> git.videolan.org Git - x264.git/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)
committerJason Garrett-Glaser <jason@x264.com>
Wed, 24 Aug 2011 17:23:19 +0000 (10:23 -0700)
Slightly faster.

common/quant.c

index 40ac1f12be136e1e41a56a97d8b7531bde77e65e..3f46d414f9533c55c147903874b491c38e2208bd 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;
     }