ref: 3556ab56f6439607d3bb8c935db580f0b2fb63ea
parent: 82757250d668c0289a3fed60d325fe464b3104c7
parent: 8d42fad9c1d2342cfc551b3223e706e05b01a2a3
author: Jingning Han <[email protected]>
date: Thu Sep 11 07:14:37 EDT 2014
Merge "Move overlay frame speed feature setting out of mode search loop"
--- 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;
}
}