shithub: libvpx

Download patch

ref: 539230a07587bbc2aeac0ce6ae52d20ffb56cc9b
parent: 2d403737b88f76ce8410237a8eb682cc556ac302
author: Marco Paniconi <marpan@google.com>
date: Wed Feb 27 06:56:53 EST 2019

vp9-rtc: Add cyclic_refresh condition to segment reset

In non-rd pickmode for screen content:
this logic to reset segment should only be for cyclic_refresh
mode on, so add that condition explicitly.

There may be other uses of segments, like ROI, so we
should condition this reset logic on cyclic_refresh,
as it was intended for that mode only.

Change-Id: I954e6cee968fbca35b34286c4a7ca2531c8e9823

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1812,7 +1812,8 @@
       x->source_variance =
           vp9_get_sby_perpixel_variance(cpi, &x->plane[0].src, bsize);
 
-    if (cpi->oxcf.content == VP9E_CONTENT_SCREEN && mi->segment_id > 0 &&
+    if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
+        cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && mi->segment_id > 0 &&
         x->zero_temp_sad_source && x->source_variance == 0) {
       mi->segment_id = 0;
       vp9_init_plane_quantizers(cpi, x);