ref: e5dfca02a9c15b26a97e58dbf7be37420f1d51b4
parent: b8c2a4eb0c47b633096f5c428b70607e7bf8d570
author: Marco <[email protected]>
date: Mon Jan 4 07:19:56 EST 2016
vp9-svc: Set initial values for ext_buffer/flag indices. Set initial values for these parameters in the vp9_init_layer_context(). This also fixes an issue in the svc-bypass mode when frame flags are passed via the vpx_codec_encode(). Change-Id: I0968f04672f8d3d2fe2cea6b8a23f79f80d7a8b1
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -36,6 +36,12 @@
svc->current_superframe = 0;
for (i = 0; i < REF_FRAMES; ++i)
svc->ref_frame_index[i] = -1;
+ for (sl = 0; sl < oxcf->ss_number_layers; ++sl) {
+ cpi->svc.ext_frame_flags[sl] = 0;
+ cpi->svc.ext_lst_fb_idx[sl] = 0;
+ cpi->svc.ext_gld_fb_idx[sl] = 1;
+ cpi->svc.ext_alt_fb_idx[sl] = 2;
+ }
if (cpi->oxcf.error_resilient_mode == 0 && cpi->oxcf.pass == 2) {
if (vpx_realloc_frame_buffer(&cpi->svc.empty_frame.img,
@@ -566,6 +572,8 @@
// Note that the check (cpi->ext_refresh_frame_flags_pending == 0) is
// needed to support the case where the frame flags may be passed in via
// vpx_codec_encode(), which can be used for the temporal-only svc case.
+ // TODO(marpan): Consider adding an enc_config parameter to better handle
+ // this case.
if (cpi->ext_refresh_frame_flags_pending == 0) {
int sl;
cpi->svc.spatial_layer_id = cpi->svc.spatial_layer_to_encode;