ref: d96228a07cc7002ba437b9598c5efdd73cae5b1e
parent: 619951af97b1d4902ff90ad254b3f39ad6f9e142
author: Jingning Han <[email protected]>
date: Tue Sep 9 07:58:10 EDT 2014
Replace best_mode_index table retrieve with fetching best_mbmode This commit allows the encoder to find current best prediction mode state using best_mbmode, instead of fetching from the static mode search table via best_mode_index. Change-Id: Ibefeab83aed33a49c2be03e83f09153856ca4271
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2705,7 +2705,7 @@
// Look at the reference frame of the best mode so far and set the
// skip mask to look at a subset of the remaining modes.
if (mode_index == mode_skip_start && best_mode_index >= 0) {
- switch (vp9_mode_order[best_mode_index].ref_frame[0]) {
+ switch (best_mbmode.ref_frame[0]) {
case INTRA_FRAME:
break;
case LAST_FRAME:
@@ -2794,7 +2794,7 @@
if ((mode_search_skip_flags & FLAG_SKIP_COMP_BESTINTRA) &&
best_mode_index >=0 &&
- vp9_mode_order[best_mode_index].ref_frame[0] == INTRA_FRAME)
+ best_mbmode.ref_frame[0] == INTRA_FRAME)
continue;
if ((mode_search_skip_flags & FLAG_SKIP_COMP_REFMISMATCH) &&
ref_frame != best_inter_ref_frame &&
@@ -2826,7 +2826,7 @@
if ((mode_search_skip_flags & FLAG_SKIP_INTRA_BESTINTER) &&
(this_mode >= D45_PRED && this_mode <= TM_PRED)) {
if (best_mode_index >= 0 &&
- vp9_mode_order[best_mode_index].ref_frame[0] > INTRA_FRAME)
+ best_mbmode.ref_frame[0] > INTRA_FRAME)
continue;
}
if (mode_search_skip_flags & FLAG_SKIP_INTRA_DIRMISMATCH) {
@@ -3124,7 +3124,7 @@
// If we used an estimate for the uv intra rd in the loop above...
if (cpi->sf.use_uv_intra_rd_estimate) {
// Do Intra UV best rd mode selection if best mode choice above was intra.
- if (vp9_mode_order[best_mode_index].ref_frame[0] == INTRA_FRAME) {
+ if (best_mbmode.ref_frame[0] == INTRA_FRAME) {
TX_SIZE uv_tx_size;
*mbmi = best_mbmode;
uv_tx_size = get_uv_tx_size(mbmi, &xd->plane[1]);