shithub: libvpx

Download patch

ref: c3ceb45aae2d858264df1b7af6d12e6ad663ee1b
parent: 77c1b9d259149fb53d1c1852786568c4367ae85d
author: sdeng <sdeng@google.com>
date: Tue Jan 22 09:05:50 EST 2019

Fix a bug in tune-content film mode

Avoid recursively decreasing 'strength'.

       avg_psnr ovr_psnr ssim
midres -0.224   -0.195   -0.115

Change-Id: Ie74c069cda76873ac38e9c1a9162b1ddfb9b103d

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3034,7 +3034,7 @@
   if (content_type == VP9E_CONTENT_FILM) {
     if (src_rec_min <= VERY_LOW_VAR_THRESH) {
       if (ref_frame == INTRA_FRAME) *this_rd *= 2;
-      if (bsize > 6) *this_rd *= 2;
+      if (bsize > BLOCK_16X16) *this_rd *= 2;
     }
   }
 }
--- a/vp9/encoder/vp9_temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -671,7 +671,9 @@
       src_variance = vp9_get_sby_perpixel_variance(cpi, &src, TF_BLOCK);
 #endif  // CONFIG_VP9_HIGHBITDEPTH
 
-      if (src_variance <= 2) strength = VPXMAX(0, (int)strength - 2);
+      if (src_variance <= 2) {
+        strength = VPXMAX(0, arnr_filter_data->strength - 2);
+      }
     }
 
     for (frame = 0; frame < frame_count; frame++) {