From 737179f275cc4384f587af5f391de5968368c63a Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Fri, 17 Feb 2012 12:03:34 -0800 Subject: [PATCH] Reduced bias in picking loop filter level The bias in picklpf intended to bias toward less greedy in getting best frame level psnr while maximize overall quality for a clip. This commit reduced the bias for frames using 8x8 transform to achieve better compression overall. The change improve compression by ~.15% consistently on most of the HD clips tested. http://www.corp.google.com/~yaowu/no_crawl/LPFBias_FixSkip.html Change-Id: Ic30932d2b8eaebd52339b0195f569edc48eed7bc --- vp8/encoder/picklpf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vp8/encoder/picklpf.c b/vp8/encoder/picklpf.c index a856493..54a50fb 100644 --- a/vp8/encoder/picklpf.c +++ b/vp8/encoder/picklpf.c @@ -354,6 +354,12 @@ void vp8cx_pick_filter_level_sg(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi, int segme if (cpi->twopass.section_intra_rating < 20) Bias = Bias * cpi->twopass.section_intra_rating / 20; +#if CONFIG_T8X8 + // yx, bias less for large block size + if(cpi->common.txfm_mode == ALLOW_8X8) + Bias >>= 1; +#endif + filt_high = ((filt_mid + filter_step) > max_filter_level) ? max_filter_level : (filt_mid + filter_step); filt_low = ((filt_mid - filter_step) < min_filter_level) ? min_filter_level : (filt_mid - filter_step); @@ -572,6 +578,12 @@ void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) if (cpi->twopass.section_intra_rating < 20) Bias = Bias * cpi->twopass.section_intra_rating / 20; +#if CONFIG_T8X8 + // yx, bias less for large block size + if(cpi->common.txfm_mode == ALLOW_8X8) + Bias >>= 1; +#endif + filt_high = ((filt_mid + filter_step) > max_filter_level) ? max_filter_level : (filt_mid + filter_step); filt_low = ((filt_mid - filter_step) < min_filter_level) ? min_filter_level : (filt_mid - filter_step); -- 2.7.4