From afeb24049e5dc3c88dc9aceb18be4ec3897476f7 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Mon, 15 Aug 2011 12:22:18 +0400 Subject: [PATCH] Don't override flat SSE2 dequant functions with non-flat AVX ones Slightly faster. --- common/quant.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/quant.c b/common/quant.c index 40ac1f12..3f46d414 100644 --- a/common/quant.c +++ b/common/quant.c @@ -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; } -- 2.47.3