count >>= 1;
}
- 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->ref_frame_flags = VP9_ALT_FLAG | VP9_GOLD_FLAG | VP9_LAST_FLAG;
+
+ 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) {