ref: 1d93f58b1ffddaf4d436dd45b0fd2034199d62a7
parent: dd1411624d4581bf3082e6a40f7fd9570ab638ad
author: Marco Paniconi <[email protected]>
date: Wed May 2 14:04:35 EDT 2018
vp9-svc: On key frame update all reference slots for SVC. Key frame updates the slots corresponding to the 3 references last/golden/altref, but for SVC where more references buffers may be in use, especialy for dynamically swithing up/down in layers, make sure we should update all 8 slots on key frame. Change-Id: Ifcca12608f420d5bae32b92794a3afe9b6369f77
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3023,9 +3023,17 @@
// Keep track of frame index for each reference frame.
SVC *const svc = &cpi->svc;
if (cm->frame_type == KEY_FRAME) {
+ int i;
svc->ref_frame_index[cpi->lst_fb_idx] = svc->current_superframe;
svc->ref_frame_index[cpi->gld_fb_idx] = svc->current_superframe;
svc->ref_frame_index[cpi->alt_fb_idx] = svc->current_superframe;
+ // On key frame update all reference frame slots.
+ for (i = 0; i < REF_FRAMES; i++) {
+ // LAST/GOLDEN/ALTREF is already updated above.
+ if (i != cpi->lst_fb_idx && i != cpi->gld_fb_idx &&
+ i != cpi->alt_fb_idx)
+ ref_cnt_fb(pool->frame_bufs, &cm->ref_frame_map[i], cm->new_fb_idx);
+ }
} else {
if (cpi->refresh_last_frame)
svc->ref_frame_index[cpi->lst_fb_idx] = svc->current_superframe;