ref: 891793a54026315e1ef326f4caf750b94fa29e1e
parent: 58a54b2026a6581ae5ee9992acf37be918480fe1
author: Jingning Han <[email protected]>
date: Mon Sep 29 08:42:07 EDT 2014
Conditionally skip reference frame check For regular inter frames, if the distance from GOLDEN_FRAME is larger than 2 and if the predicted motion vector of LAST_FRAME gives lower sse than that of GOLDEN_FRAME, skip the GOLDE_FRAME mode checking in the rate-distortion optimization. It provides about 5% speed-up at expense of -0.137% and -0.230% performance down for speed 3. Local experiment results: pedestrian 1080p 2000 kbps 66712 b/f, 40.908 dB, 113688 ms -> 66768 b/f, 40.911 dB, 108752 ms blue_sky 1080p 2000 kbps 51054 b/f, 35.894 dB, 70406 ms -> 51051 b/f, 35.891 dB, 67236 ms old_town_cross 720p 1500 kbps 14412 b/f, 36.252 dB, 60690 ms -> 14431 b/f, 36.249 dB, 57346 ms Change-Id: Idfcafe7f63da7a4896602fc60bd7093f0f0d82ca
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2975,6 +2975,13 @@
if (x->pred_mv_sad[ALTREF_FRAME] > (x->pred_mv_sad[GOLDEN_FRAME] << 1))
mode_skip_mask[ALTREF_FRAME] |= INTER_ALL;
+ if (cpi->sf.adaptive_mode_search) {
+ if (cm->show_frame && !cpi->rc.is_src_frame_alt_ref &&
+ cpi->rc.frames_since_golden >= 3)
+ if (x->pred_mv_sad[GOLDEN_FRAME] > (x->pred_mv_sad[LAST_FRAME] << 1))
+ mode_skip_mask[GOLDEN_FRAME] |= INTER_ALL;
+ }
+
if (bsize > cpi->sf.max_intra_bsize) {
ref_frame_skip_mask[0] |= (1 << INTRA_FRAME);
ref_frame_skip_mask[1] |= (1 << INTRA_FRAME);