From 2c950e131cc180c8d8babbc89f24fc29eb542273 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 31 Jan 2018 13:33:27 -0800 Subject: [PATCH] vp9-svc: Fix to initialize downsampling filters. For 3 spatial layers with 1/2 downsampling, the downsampling filter for the middle layer was not set for the very first frame, so it was defaulting to the subsample filter (no averaging/phase = 0). Its not set due to the two stage scaling that is done for 1/4 on base layer, during which the intermediate 1/2 result is saved for the middle layer. Fix for now is to set the default downsampling filter to Bilinear (averaging/non-zero phase) for all layers on init (vp9_init_layer_context):. Change-Id: Ic7407810b34c621e7e7420682508d45478bdffcf --- vp9/encoder/vp9_svc_layercontext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c index 54789ee70..389d48f21 100644 --- a/vp9/encoder/vp9_svc_layercontext.c +++ b/vp9/encoder/vp9_svc_layercontext.c @@ -45,8 +45,8 @@ void vp9_init_layer_context(VP9_COMP *const cpi) { svc->ext_lst_fb_idx[sl] = 0; svc->ext_gld_fb_idx[sl] = 1; svc->ext_alt_fb_idx[sl] = 2; - svc->downsample_filter_type[sl] = EIGHTTAP; - svc->downsample_filter_phase[sl] = 0; // Set to 8 for averaging filter. + svc->downsample_filter_type[sl] = BILINEAR; + svc->downsample_filter_phase[sl] = 8; // Set to 8 for averaging filter. } if (cpi->oxcf.error_resilient_mode == 0 && cpi->oxcf.pass == 2) { -- 2.40.0