Commit aa76cd1e authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Removing is_intra_mode() function.

It is enough to check just block type: intra or inter. Intra block implies
intra prediction mode, and inter block implies inter mode.

Change-Id: I3cf98731a3935f670a3cd8e2b2443483eb944be4
parent 19cf72ed
......@@ -74,10 +74,6 @@ typedef enum {
MB_MODE_COUNT
} MB_PREDICTION_MODE;
static INLINE int is_intra_mode(MB_PREDICTION_MODE mode) {
return mode <= TM_PRED;
}
static INLINE int is_inter_mode(MB_PREDICTION_MODE mode) {
return mode >= NEARESTMV && mode <= NEWMV;
}
......
......@@ -3526,16 +3526,14 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
}
// Keep record of best intra rd
if (xd->mi_8x8[0]->mbmi.ref_frame[0] == INTRA_FRAME &&
is_intra_mode(xd->mi_8x8[0]->mbmi.mode) &&
if (!is_inter_block(&xd->mi_8x8[0]->mbmi) &&
this_rd < best_intra_rd) {
best_intra_rd = this_rd;
best_intra_mode = xd->mi_8x8[0]->mbmi.mode;
}
// Keep record of best inter rd with single reference
if (xd->mi_8x8[0]->mbmi.ref_frame[0] > INTRA_FRAME &&
xd->mi_8x8[0]->mbmi.ref_frame[1] == NONE &&
!mode_excluded &&
if (is_inter_block(&xd->mi_8x8[0]->mbmi) && !mode_excluded &&
this_rd < best_inter_rd) {
best_inter_rd = this_rd;
best_inter_ref_frame = ref_frame;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment