shithub: libvpx

Download patch

ref: fc47d1489251e03221aac229107b5eab612d919e
parent: 4745bc2ff30f5ab344202685e103a49aa56adf07
author: Marco Paniconi <marpan@google.com>
date: Mon Jul 9 05:53:00 EDT 2018

vp9: Fix to the segment weight for cyclic refresh.

For screen-content mode with aq-mode=3: use the proper
segment weight (remove division by 2).

Change-Id: I747575062c644df7ead3fa41525fb6d6bac04f4d

--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -503,13 +503,12 @@
                    num8x8bl;
   if (weight_segment_target < 7 * weight_segment / 8)
     weight_segment = weight_segment_target;
-  // For screen-content: don't include target for the weight segment, since
-  // all for all flat areas the segment is reset, so its more accurate to
-  // just use the previous actual number of seg blocks for the weight.
+  // For screen-content: don't include target for the weight segment,
+  // since for all flat areas the segment is reset, so its more accurate
+  // to just use the previous actual number of seg blocks for the weight.
   if (cpi->oxcf.content == VP9E_CONTENT_SCREEN)
     weight_segment =
-        (double)((cr->actual_num_seg1_blocks + cr->actual_num_seg2_blocks) >>
-                 1) /
+        (double)(cr->actual_num_seg1_blocks + cr->actual_num_seg2_blocks) /
         num8x8bl;
   cr->weight_segment = weight_segment;
 }
--