From: Minghai Shang Date: Mon, 22 Sep 2014 21:01:24 +0000 (-0700) Subject: Merge "[spatial svc] Remove vpx_svc_parameters_t and the loop that sets it for each... X-Git-Tag: v1.4.0~737 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38b6aed8fdf50e701c070e708ff7933cc3a61117;p=libvpx Merge "[spatial svc] Remove vpx_svc_parameters_t and the loop that sets it for each layer" --- 38b6aed8fdf50e701c070e708ff7933cc3a61117 diff --cc vp9/encoder/vp9_svc_layercontext.c index 8c735abee,1a3f29604..eed681c96 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@@ -286,13 -266,27 +266,15 @@@ int vp9_svc_start_frame(VP9_COMP *cons count >>= 1; } + cpi->ref_frame_flags = VP9_ALT_FLAG | VP9_GOLD_FLAG | VP9_LAST_FLAG; + - cpi->lst_fb_idx = - cpi->svc.spatial_layer_id * cpi->svc.number_temporal_layers + - cpi->svc.temporal_layer_id; - if (lc->frames_from_key_frame < cpi->svc.number_temporal_layers) - cpi->ref_frame_flags &= ~VP9_LAST_FLAG; - - if (cpi->svc.spatial_layer_id == 0) { - if (cpi->svc.temporal_layer_id == 0) - cpi->gld_fb_idx = lc->gold_ref_idx >= 0 ? - lc->gold_ref_idx : cpi->lst_fb_idx; - else - cpi->gld_fb_idx = cpi->lst_fb_idx - 1; - } else { - if (cpi->svc.temporal_layer_id == 0) - cpi->gld_fb_idx = cpi->svc.spatial_layer_id - - cpi->svc.number_temporal_layers; - else - cpi->gld_fb_idx = cpi->lst_fb_idx - 1; - } + cpi->lst_fb_idx = cpi->svc.spatial_layer_id; + + if (cpi->svc.spatial_layer_id == 0) + cpi->gld_fb_idx = (lc->gold_ref_idx >= 0) ? + lc->gold_ref_idx : cpi->lst_fb_idx; + else + cpi->gld_fb_idx = cpi->svc.spatial_layer_id - 1; if (lc->current_video_frame_in_layer == 0) { if (cpi->svc.spatial_layer_id >= 2) {