ref: 8d42fad9c1d2342cfc551b3223e706e05b01a2a3
parent: f9f0879756c6c6a5af3cd43986ffde39b3b5deae
author: Jingning Han <[email protected]>
date: Wed Sep 10 15:42:51 EDT 2014
Move overlay frame speed feature setting out of mode search loop Refactor overlay frame speed-up related function. Make it unified with the ref_frame_skip_mask system and Move it out of the mode search loop. Change-Id: I0dde9baf44354f6ba00b4679cba02fa6a30c7316
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2677,6 +2677,14 @@
}
}
+ if (cpi->rc.is_src_frame_alt_ref) {
+ if (cpi->sf.alt_ref_search_fp) {
+ mode_skip_mask[ALTREF_FRAME] = 0;
+ ref_frame_skip_mask[0] = ~(1 << ALTREF_FRAME);
+ ref_frame_skip_mask[1] = SECOND_REF_FRAME_MASK;
+ }
+ }
+
for (mode_index = 0; mode_index < MAX_MODES; ++mode_index) {
int mode_excluded = 0;
int64_t this_rd = INT64_MAX;
@@ -2718,15 +2726,6 @@
case MAX_REF_FRAMES:
assert(0 && "Invalid Reference frame");
break;
- }
- }
-
- if (cpi->rc.is_src_frame_alt_ref) {
- if (cpi->sf.alt_ref_search_fp) {
- mode_skip_mask[ALTREF_FRAME] = 0;
-
- if (!(ref_frame == ALTREF_FRAME && second_ref_frame == NONE))
- continue;
}
}