Allow for H and V intra modes for non-rd mode.

For non-rd mode (speed >=5): use mask based on prediction block size, and
(for non-screen content mode) allow for checking horiz and vert intra modes
for blocks sizes < 16x16.

Avg psnr/ssim metrics go up by about ~0.2%.

Only allowing H/V intra on block sizes below 16x16 for now, to keep
encoding time increase very small, and also when allowing H/V on 16x16 blocks,
metrics went down on a few clips which need to be further examined.

Change-Id: I8ae0bc8cb2a964f9709612c76c5661acaab1381e
This commit is contained in:
Marco
2015-04-30 11:39:02 -07:00
parent 670b2c09ce
commit b9a72d3c4d
3 changed files with 13 additions and 5 deletions

View File

@@ -1489,7 +1489,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
const PREDICTION_MODE this_mode = intra_mode_list[i]; const PREDICTION_MODE this_mode = intra_mode_list[i];
if (!((1 << this_mode) & cpi->sf.intra_y_mode_mask[intra_tx_size])) if (!((1 << this_mode) & cpi->sf.intra_y_mode_bsize_mask[bsize]))
continue; continue;
mbmi->mode = this_mode; mbmi->mode = this_mode;
mbmi->ref_frame[0] = INTRA_FRAME; mbmi->ref_frame[0] = INTRA_FRAME;

View File

@@ -318,11 +318,15 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
if (!is_keyframe) { if (!is_keyframe) {
int i; int i;
if (content == VP9E_CONTENT_SCREEN) { if (content == VP9E_CONTENT_SCREEN) {
for (i = 0; i < TX_SIZES; ++i) for (i = 0; i < BLOCK_SIZES; ++i)
sf->intra_y_mode_mask[i] = INTRA_DC_TM_H_V; sf->intra_y_mode_bsize_mask[i] = INTRA_DC_TM_H_V;
} else { } else {
for (i = 0; i < TX_SIZES; i++) for (i = 0; i < BLOCK_SIZES; ++i)
sf->intra_y_mode_mask[i] = INTRA_DC; if (i >= BLOCK_16X16)
sf->intra_y_mode_bsize_mask[i] = INTRA_DC;
else
// Use H and V intra mode for block sizes <= 16X16.
sf->intra_y_mode_bsize_mask[i] = INTRA_DC_H_V;
} }
} }
} }

View File

@@ -340,6 +340,10 @@ typedef struct SPEED_FEATURES {
int intra_y_mode_mask[TX_SIZES]; int intra_y_mode_mask[TX_SIZES];
int intra_uv_mode_mask[TX_SIZES]; int intra_uv_mode_mask[TX_SIZES];
// These bit masks allow you to enable or disable intra modes for each
// prediction block size separately.
int intra_y_mode_bsize_mask[BLOCK_SIZES];
// This variable enables an early break out of mode testing if the model for // This variable enables an early break out of mode testing if the model for
// rd built from the prediction signal indicates a value that's much // rd built from the prediction signal indicates a value that's much
// higher than the best rd we've seen so far. // higher than the best rd we've seen so far.