]> granicus.if.org Git - libvpx/commitdiff
Fix a bug in tune-content film mode
authorsdeng <sdeng@google.com>
Tue, 22 Jan 2019 22:05:50 +0000 (14:05 -0800)
committerSai Deng <sdeng@google.com>
Thu, 24 Jan 2019 04:43:38 +0000 (04:43 +0000)
Avoid recursively decreasing 'strength'.

       avg_psnr ovr_psnr ssim
midres -0.224   -0.195   -0.115

Change-Id: Ie74c069cda76873ac38e9c1a9162b1ddfb9b103d

vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_temporal_filter.c

index c1a079ff080b1edf8d8ea4bd9c06a845d96cf23a..c73b0ed8725da8e4663e18b85a449930ee6f8aa3 100644 (file)
@@ -3034,7 +3034,7 @@ static void rd_variance_adjustment(VP9_COMP *cpi, MACROBLOCK *x,
   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;
     }
   }
 }
index 23943bb18acc46dde70175ec2ff452c88bf1a5f7..2a5caf90e9afe69b019e34c1fd9632a8319eb2ca 100644 (file)
@@ -671,7 +671,9 @@ void vp9_temporal_filter_iterate_row_c(VP9_COMP *cpi, ThreadData *td,
       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++) {