Merge "Limit Key frame Intra modes checks."

This commit is contained in:
Paul Wilkins
2013-08-26 12:34:56 -07:00
committed by Gerrit Code Review
3 changed files with 30 additions and 6 deletions

View File

@@ -735,7 +735,8 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->mode_search_skip_flags = 0; sf->mode_search_skip_flags = 0;
sf->disable_split_var_thresh = 0; sf->disable_split_var_thresh = 0;
sf->disable_filter_search_var_thresh = 0; sf->disable_filter_search_var_thresh = 0;
sf->last_chroma_intra_mode = TM_PRED; sf->intra_y_mode_mask = ALL_INTRA_MODES;
sf->intra_uv_mode_mask = ALL_INTRA_MODES;
sf->use_rd_breakout = 0; sf->use_rd_breakout = 0;
sf->skip_encode_sb = 0; sf->skip_encode_sb = 0;
sf->use_uv_intra_rd_estimate = 0; sf->use_uv_intra_rd_estimate = 0;
@@ -798,6 +799,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
// the main framework of partition search type. // the main framework of partition search type.
sf->disable_split_var_thresh = 0; sf->disable_split_var_thresh = 0;
sf->disable_filter_search_var_thresh = 16; sf->disable_filter_search_var_thresh = 16;
sf->intra_y_mode_mask = INTRA_DC_TM_H_V;
sf->intra_uv_mode_mask = INTRA_DC_TM_H_V;
} }
if (speed == 2) { if (speed == 2) {
sf->adjust_thresholds_by_speed = 1; sf->adjust_thresholds_by_speed = 1;
@@ -819,7 +823,8 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
FLAG_SKIP_COMP_REFMISMATCH | FLAG_SKIP_COMP_REFMISMATCH |
FLAG_SKIP_INTRA_LOWVAR | FLAG_SKIP_INTRA_LOWVAR |
FLAG_EARLY_TERMINATE; FLAG_EARLY_TERMINATE;
sf->last_chroma_intra_mode = DC_PRED; sf->intra_y_mode_mask = INTRA_DC_TM;
sf->intra_uv_mode_mask = INTRA_DC_TM;
sf->use_uv_intra_rd_estimate = 1; sf->use_uv_intra_rd_estimate = 1;
sf->use_rd_breakout = 1; sf->use_rd_breakout = 1;
sf->skip_encode_sb = 1; sf->skip_encode_sb = 1;
@@ -859,6 +864,8 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->subpel_iters_per_step = 1; sf->subpel_iters_per_step = 1;
sf->disable_split_var_thresh = 64; sf->disable_split_var_thresh = 64;
sf->disable_filter_search_var_thresh = 64; sf->disable_filter_search_var_thresh = 64;
sf->intra_y_mode_mask = INTRA_DC_ONLY;
sf->intra_uv_mode_mask = INTRA_DC_ONLY;
} }
if (speed == 4) { if (speed == 4) {
sf->comp_inter_joint_search_thresh = BLOCK_SIZES; sf->comp_inter_joint_search_thresh = BLOCK_SIZES;

View File

@@ -238,6 +238,11 @@ typedef enum {
// Other methods to come // Other methods to come
} SUBPEL_SEARCH_METHODS; } SUBPEL_SEARCH_METHODS;
#define ALL_INTRA_MODES 0x3FF
#define INTRA_DC_ONLY 0x01
#define INTRA_DC_TM ((1 << TM_PRED) | (1 << DC_PRED))
#define INTRA_DC_TM_H_V (INTRA_DC_TM | (1 << V_PRED) | (1 << H_PRED))
typedef struct { typedef struct {
int RD; int RD;
SEARCH_METHODS search_method; SEARCH_METHODS search_method;
@@ -288,7 +293,8 @@ typedef struct {
// A source variance threshold below which filter search is disabled // A source variance threshold below which filter search is disabled
// Choose a very large value (UINT_MAX) to use 8-tap always // Choose a very large value (UINT_MAX) to use 8-tap always
unsigned int disable_filter_search_var_thresh; unsigned int disable_filter_search_var_thresh;
MB_PREDICTION_MODE last_chroma_intra_mode; int intra_y_mode_mask;
int intra_uv_mode_mask;
int use_rd_breakout; int use_rd_breakout;
int use_uv_intra_rd_estimate; int use_uv_intra_rd_estimate;
int use_fast_lpf_pick; int use_fast_lpf_pick;

View File

@@ -1043,6 +1043,10 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
for (mode = DC_PRED; mode <= TM_PRED; ++mode) { for (mode = DC_PRED; mode <= TM_PRED; ++mode) {
int64_t this_rd; int64_t this_rd;
int ratey = 0; int ratey = 0;
if (!(cpi->sf.intra_y_mode_mask & (1 << mode)))
continue;
// Only do the oblique modes if the best so far is // Only do the oblique modes if the best so far is
// one of the neighboring directional modes // one of the neighboring directional modes
if (cpi->sf.mode_search_skip_flags & FLAG_SKIP_INTRA_DIRMISMATCH) { if (cpi->sf.mode_search_skip_flags & FLAG_SKIP_INTRA_DIRMISMATCH) {
@@ -1228,6 +1232,9 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
int64_t local_tx_cache[TX_MODES]; int64_t local_tx_cache[TX_MODES];
const int mis = xd->mode_info_stride; const int mis = xd->mode_info_stride;
if (!(cpi->sf.intra_y_mode_mask & (1 << mode)))
continue;
if (cpi->common.frame_type == KEY_FRAME) { if (cpi->common.frame_type == KEY_FRAME) {
const MB_PREDICTION_MODE A = above_block_mode(mic, 0, mis); const MB_PREDICTION_MODE A = above_block_mode(mic, 0, mis);
const MB_PREDICTION_MODE L = xd->left_available ? const MB_PREDICTION_MODE L = xd->left_available ?
@@ -1325,10 +1332,14 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
int this_rate_tokenonly, this_rate, s; int this_rate_tokenonly, this_rate, s;
int64_t this_distortion, this_sse; int64_t this_distortion, this_sse;
MB_PREDICTION_MODE last_mode = bsize <= BLOCK_8X8 ? // int mode_mask = (bsize <= BLOCK_8X8)
TM_PRED : cpi->sf.last_chroma_intra_mode; // ? ALL_INTRA_MODES : cpi->sf.intra_uv_mode_mask;
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
// if (!(mode_mask & (1 << mode)))
if (!(cpi->sf.intra_uv_mode_mask & (1 << mode)))
continue;
for (mode = DC_PRED; mode <= last_mode; mode++) {
x->e_mbd.mode_info_context->mbmi.uv_mode = mode; x->e_mbd.mode_info_context->mbmi.uv_mode = mode;
super_block_uvrd(&cpi->common, x, &this_rate_tokenonly, super_block_uvrd(&cpi->common, x, &this_rate_tokenonly,
&this_distortion, &s, &this_sse, bsize, best_rd); &this_distortion, &s, &this_sse, bsize, best_rd);