]> granicus.if.org Git - libvpx/commitdiff
vp9: Fix to the segment weight for cyclic refresh.
authorMarco Paniconi <marpan@google.com>
Mon, 9 Jul 2018 16:53:00 +0000 (09:53 -0700)
committerMarco Paniconi <marpan@google.com>
Mon, 9 Jul 2018 17:28:31 +0000 (10:28 -0700)
For screen-content mode with aq-mode=3: use the proper
segment weight (remove division by 2).

Change-Id: I747575062c644df7ead3fa41525fb6d6bac04f4d

vp9/encoder/vp9_aq_cyclicrefresh.c

index fb8ce12a1e298f785f829dc7ad3fc552811d0b71..7eb7aac5180c11b46e621294fc588cf61726c660 100644 (file)
@@ -503,13 +503,12 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) {
                    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;
 }