From: Adrian Grange Date: Fri, 27 Apr 2012 16:01:17 +0000 (-0700) Subject: Modified ARNR MC-filter to ignore ARF frame X-Git-Tag: v1.2.0~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f252e30e4faa6609e651210ea50941f08f3b7be;p=libvpx Modified ARNR MC-filter to ignore ARF frame The ARNR filter uses MC to find the best match between the ARF and other nearby frames in the filter-set. Since the ARF is a member of the filter-set, MC in that case is unnecesssary. This patch modifies the filter so it does not apply MC in this case. Change-Id: Ic0321199c08db2189a57f28d1700b745bc7ff66d --- diff --git a/vp8/encoder/temporal_filter.c b/vp8/encoder/temporal_filter.c index b82ea47cb..cfe912246 100644 --- a/vp8/encoder/temporal_filter.c +++ b/vp8/encoder/temporal_filter.c @@ -288,31 +288,36 @@ static void vp8_temporal_filter_iterate_c for (frame = 0; frame < frame_count; frame++) { - int err = 0; - if (cpi->frames[frame] == NULL) continue; mbd->block[0].bmi.mv.as_mv.row = 0; mbd->block[0].bmi.mv.as_mv.col = 0; + if (frame == alt_ref_index) + { + filter_weight = 2; + } + else + { + int err = 0; #if ALT_REF_MC_ENABLED #define THRESH_LOW 10000 #define THRESH_HIGH 20000 - - // Find best match in this frame by MC - err = vp8_temporal_filter_find_matching_mb_c - (cpi, - cpi->frames[alt_ref_index], - cpi->frames[frame], - mb_y_offset, - THRESH_LOW); + // Find best match in this frame by MC + err = vp8_temporal_filter_find_matching_mb_c + (cpi, + cpi->frames[alt_ref_index], + cpi->frames[frame], + mb_y_offset, + THRESH_LOW); #endif - // Assign higher weight to matching MB if it's error - // score is lower. If not applying MC default behavior - // is to weight all MBs equal. - filter_weight = err