From: Marco Date: Sat, 6 May 2017 01:39:55 +0000 (-0700) Subject: vp9: SVC: Set downsample filtertype for lowest spatial layer. X-Git-Tag: v1.7.0~492^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b729748ac5cb0087f2e1282ebb503009e6ba836;p=libvpx vp9: SVC: Set downsample filtertype for lowest spatial layer. For lowest spatial layer, in 3 layer SVC, set the downsampling filtertype to get averaging filter. Needed for reducing aliasing on low-res layer, small increase in overall encoder time. Change-Id: Ia31460123bd91b72eca49b46dd924b9f226d4563 --- diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c index ed628758b..edd8e226d 100644 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@ -651,6 +651,10 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) { lc->scaling_factor_num, lc->scaling_factor_den, &width, &height); + // For 3 spatial layers, on the lowest resolution layer: set the filtertype + // for downsampling source to 1, to get averaging filter. + if (cpi->svc.number_spatial_layers == 3) + cpi->svc.filtertype_downsample_source[0] = 1; // The usage of use_base_mv assumes down-scale of 2x2. For now, turn off use // of base motion vectors if spatial scale factors for any layers are not 2, // keep the case of 3 spatial layers with scale factor of 4x4 for base layer.