shithub: libvpx

Download patch

ref: 04d8700862851885ae5c164dac82d3e0c44965ab
parent: 1d93f58b1ffddaf4d436dd45b0fd2034199d62a7
author: Marco Paniconi <marpan@google.com>
date: Thu May 3 15:42:08 EDT 2018

vp9-svc: Add memset on the svc fb_idx.

The memset is added to better handle frame drops
with the GET_SVC_REF_FRAME_CONFIG contro

There is an issue with some tests in bypass mode,
so condition it on that for now.

Change-Id: I2635037143f14ff62a36be7c22b2b604a0c1efc2

--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -668,8 +668,13 @@
     vp9_zero(cpi->svc.drop_spatial_layer);
     // TODO(jianj/marpan): Investigate why setting cpi->svc.lst/gld/alt_fb_idx
     // causes an issue with frame dropping and temporal layers, when the frame
-    // flags are passed via the encode call. Issue is that we're resetting
-    // ext_refresh_frame_flags_pending to 0 on frame drops.
+    // flags are passed via the encode call (bypass mode). Issue is that we're
+    // resetting ext_refresh_frame_flags_pending to 0 on frame drops.
+    if (cpi->svc.temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
+      memset(&cpi->svc.lst_fb_idx, -1, sizeof(cpi->svc.lst_fb_idx));
+      memset(&cpi->svc.gld_fb_idx, -1, sizeof(cpi->svc.lst_fb_idx));
+      memset(&cpi->svc.alt_fb_idx, -1, sizeof(cpi->svc.lst_fb_idx));
+    }
     vp9_zero(cpi->svc.update_last);
     vp9_zero(cpi->svc.update_golden);
     vp9_zero(cpi->svc.update_altref);