From 4ca882f32fb7f45044ccf01db0f4a40c52e5fcca Mon Sep 17 00:00:00 2001 From: Yunqing Wang Date: Wed, 3 Apr 2013 12:22:50 -0700 Subject: Modify vp9_setup_interp_filters function Took vp9_setup_scale_factors_for_frame() out from vp9_setup_interp_filters(), so that it is only called once per frame instead of per macroblock. Decoder tests showed a 1.5% performance gain. Change-Id: I770cb09eb2140ab85132f82aed388ac0bdd3a0aa --- vp9/common/vp9_reconinter.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'vp9/common') diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index 30a16d1a9..75b4e7cae 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -206,20 +206,6 @@ void vp9_setup_scale_factors_for_frame(struct scale_factors *scale, void vp9_setup_interp_filters(MACROBLOCKD *xd, INTERPOLATIONFILTERTYPE mcomp_filter_type, VP9_COMMON *cm) { - int i; - - /* Calculate scaling factors for each of the 3 available references */ - for (i = 0; i < 3; ++i) { - if (cm->active_ref_idx[i] >= NUM_YV12_BUFFERS) { - memset(&cm->active_ref_scale[i], 0, sizeof(cm->active_ref_scale[i])); - continue; - } - - vp9_setup_scale_factors_for_frame(&cm->active_ref_scale[i], - &cm->yv12_fb[cm->active_ref_idx[i]], - cm->width, cm->height); - } - if (xd->mode_info_context) { MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi; @@ -229,7 +215,6 @@ void vp9_setup_interp_filters(MACROBLOCKD *xd, cm->active_ref_scale); } - switch (mcomp_filter_type) { case EIGHTTAP: case SWITCHABLE: -- cgit v1.2.3