]> granicus.if.org Git - libvpx/commitdiff
vp9-rtc: Add cyclic_refresh condition to segment reset
authorMarco Paniconi <marpan@google.com>
Wed, 27 Feb 2019 19:56:53 +0000 (11:56 -0800)
committerMarco Paniconi <marpan@google.com>
Wed, 27 Feb 2019 20:03:22 +0000 (12:03 -0800)
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

vp9/encoder/vp9_pickmode.c

index 8cd1e6e31c67c98456eb0dbcc5dc1a1d10c78b91..20a8bf0ebb5da64f90571a4bcaccc7cae84eb2e2 100644 (file)
@@ -1812,7 +1812,8 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
       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);