summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2018-05-03 19:42:08 -0700
committerMarco Paniconi <marpan@google.com>2018-05-03 19:44:56 -0700
commit04d8700862851885ae5c164dac82d3e0c44965ab (patch)
tree8a7a4368e7fbea84630db730cd724a0706790fba /vp9/encoder
parent1d93f58b1ffddaf4d436dd45b0fd2034199d62a7 (diff)
downloadlibvpx-04d8700862851885ae5c164dac82d3e0c44965ab.tar
libvpx-04d8700862851885ae5c164dac82d3e0c44965ab.tar.gz
libvpx-04d8700862851885ae5c164dac82d3e0c44965ab.tar.bz2
libvpx-04d8700862851885ae5c164dac82d3e0c44965ab.zip
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
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index 1f4351c16..cfe0c84a3 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -668,8 +668,13 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
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);