summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_svc_layercontext.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_svc_layercontext.c')
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index 2b68047c5..1957bb9ec 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -38,11 +38,11 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
svc->current_superframe = 0;
svc->non_reference_frame = 0;
svc->skip_enhancement_layer = 0;
- svc->last_layer_encoded = 0;
for (i = 0; i < REF_FRAMES; ++i) svc->ref_frame_index[i] = -1;
for (sl = 0; sl < oxcf->ss_number_layers; ++sl) {
- svc->rc_drop_spatial_layer[sl] = 0;
+ svc->last_layer_dropped[sl] = 0;
+ svc->drop_spatial_layer[sl] = 0;
svc->ext_frame_flags[sl] = 0;
svc->ext_lst_fb_idx[sl] = 0;
svc->ext_gld_fb_idx[sl] = 1;
@@ -649,11 +649,12 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
}
}
- // Reset the drop flags for all spatial lauyers, on the base layer.
+ // Reset the drop flags for all spatial layers, on the base layer.
if (cpi->svc.spatial_layer_id == 0) {
int i;
- for (i = 0; i < cpi->svc.number_spatial_layers; i++)
- cpi->svc.rc_drop_spatial_layer[i] = 0;
+ for (i = 0; i < cpi->svc.number_spatial_layers; i++) {
+ cpi->svc.drop_spatial_layer[i] = 0;
+ }
}
lc = &cpi->svc.layer_context[cpi->svc.spatial_layer_id *
@@ -702,6 +703,13 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
break;
}
}
+ // For non-zero spatial layers: if the previous spatial layer was dropped
+ // disable the base_mv and partition_reuse features.
+ if (cpi->svc.spatial_layer_id > 0 &&
+ cpi->svc.drop_spatial_layer[cpi->svc.spatial_layer_id - 1]) {
+ cpi->svc.use_base_mv = 0;
+ cpi->svc.use_partition_reuse = 0;
+ }
}
cpi->svc.non_reference_frame = 0;