summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_svc_layercontext.c
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2018-04-26 17:32:22 -0700
committerJerome Jiang <jianj@google.com>2018-04-26 18:03:15 -0700
commitede1efa55f59c6fc3a083052393b9aa19a79f5e1 (patch)
tree1901bac685cc55a03e3dae4bbef8134fd7994b2f /vp9/encoder/vp9_svc_layercontext.c
parenta47376c52d5a6e6e10157b178f49f2ea553df899 (diff)
downloadlibvpx-ede1efa55f59c6fc3a083052393b9aa19a79f5e1.tar
libvpx-ede1efa55f59c6fc3a083052393b9aa19a79f5e1.tar.gz
libvpx-ede1efa55f59c6fc3a083052393b9aa19a79f5e1.tar.bz2
libvpx-ede1efa55f59c6fc3a083052393b9aa19a79f5e1.zip
vp9-svc: Remove unneeded call and init some parameters.
Remove the unneeded vp9_copy_flags_ref_update_idx(cpi), and initialize the struct parameters needed for the GET_SVC_REF_FRAME_CONFIG. This init is useful for the case for spatial layer frame drops. Change-Id: If89e8349f6246c33720ecbb758d41a932d21e496
Diffstat (limited to 'vp9/encoder/vp9_svc_layercontext.c')
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index 361c9d737..e4caf9c70 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -665,10 +665,16 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
// 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.drop_spatial_layer[i] = 0;
- }
+ vp9_zero(cpi->svc.drop_spatial_layer);
+ memset(&cpi->svc.lst_fb_idx, -1, sizeof(cpi->svc.lst_fb_idx));
+ memset(&cpi->svc.gld_fb_idx, -1, sizeof(cpi->svc.lst_fb_idx));
+ memset(&cpi->svc.alt_fb_idx, -1, sizeof(cpi->svc.lst_fb_idx));
+ vp9_zero(cpi->svc.update_last);
+ vp9_zero(cpi->svc.update_golden);
+ vp9_zero(cpi->svc.update_altref);
+ vp9_zero(cpi->svc.reference_last);
+ vp9_zero(cpi->svc.reference_golden);
+ vp9_zero(cpi->svc.reference_altref);
}
lc = &cpi->svc.layer_context[cpi->svc.spatial_layer_id *
@@ -734,8 +740,6 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
if (cpi->svc.spatial_layer_id == 0) cpi->svc.high_source_sad_superframe = 0;
- vp9_copy_flags_ref_update_idx(cpi);
-
if (vp9_set_size_literal(cpi, width, height) != 0)
return VPX_CODEC_INVALID_PARAM;