ref: 085b97aa5c17afbc07c8a342ba08a0bbc5b1b523
parent: ccdb518ff8082bc1a3f9ec3027e051e3a8317851
author: Jingning Han <[email protected]>
date: Sun Oct 5 08:05:14 EDT 2014
Fix an IOC issue in vp9_rd_pick_inter_mode_sb It is possible that the GOLDEN reference frame is not avaiable, in which setting the predicted mv will be associated with a residual value of INT_MAX. This commit checks this condition before left shift and comparison with that of ALTREF frame, to avoid overflow issue. Change-Id: Ib98c3149dbdd016f2fe5beaafb13f67d469dd07c
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2675,7 +2675,7 @@
}
if (cpi->sf.alt_ref_search_fp)
- if (!cm->show_frame)
+ if (!cm->show_frame && x->pred_mv_sad[GOLDEN_FRAME] < INT_MAX)
if (x->pred_mv_sad[ALTREF_FRAME] > (x->pred_mv_sad[GOLDEN_FRAME] << 1))
mode_skip_mask[ALTREF_FRAME] |= INTER_ALL;