ref: ffaebfc7b420e3966c0b66575282d39aac2522ac
parent: c50256c1574fc7754f6bb7147bd42388d8d0092e
parent: f1581b3b2ed21b18c37b2fdbe62494f1945d0ca4
author: Jingning Han <[email protected]>
date: Mon Sep 15 17:26:37 EDT 2014
Merge "Add ARF validation for compound inter mode check"
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2793,6 +2793,15 @@
if (!cm->allow_comp_inter_inter)
continue;
+ // Skip compound inter modes if ARF is not available.
+ if (!(cpi->ref_frame_flags & flag_list[second_ref_frame]))
+ continue;
+
+ // Do not allow compound prediction if the segment level reference frame
+ // feature is in use as in this case there can only be one reference.
+ if (vp9_segfeature_active(seg, segment_id, SEG_LVL_REF_FRAME))
+ continue;
+
if ((mode_search_skip_flags & FLAG_SKIP_COMP_BESTINTRA) &&
best_mode_index >= 0 && best_mbmode.ref_frame[0] == INTRA_FRAME)
continue;