Reduced bias in picking loop filter level
authorYaowu Xu <yaowu@google.com>
Fri, 17 Feb 2012 20:03:34 +0000 (12:03 -0800)
committerYaowu Xu <yaowu@google.com>
Sat, 18 Feb 2012 00:44:08 +0000 (16:44 -0800)
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

index a856493..54a50fb 100644 (file)
@@ -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);