From: Marco Paniconi Date: Fri, 27 Apr 2018 00:32:22 +0000 (-0700) Subject: vp9-svc: Remove unneeded call and init some parameters. X-Git-Tag: v1.8.0~721 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ede1efa55f59c6fc3a083052393b9aa19a79f5e1;p=libvpx 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 --- 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;