Add a feature to reduce chrome intra mode search

Change-Id: I721ebdeef2b53ce3e5c3eba3f7462ae2103c95a8
This commit is contained in:
Yaowu Xu 2013-07-10 08:59:18 -07:00
parent 863204e64d
commit bed27a960a
3 changed files with 10 additions and 1 deletions

View File

@ -719,6 +719,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->last_partitioning_redo_frequency = 4;
sf->disable_splitmv = 0;
sf->mode_search_skip_flags = 0;
sf->last_chroma_intra_mode = TM_PRED;
// Skip any mode not chosen at size < X for all sizes > X
// Hence BLOCK_SIZE_SB64X64 (skip is off)
@ -746,6 +747,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->auto_mv_step_size = 1;
sf->use_avoid_tested_higherror = 1;
sf->adaptive_rd_thresh = 1;
sf->last_chroma_intra_mode = TM_PRED;
if (speed == 1) {
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_TYPES;
@ -764,6 +766,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->mode_search_skip_flags = FLAG_SKIP_INTRA_DIRMISMATCH |
FLAG_SKIP_INTRA_BESTINTER |
FLAG_SKIP_COMP_BESTINTRA;
sf->last_chroma_intra_mode = H_PRED;
}
if (speed == 2) {
sf->adjust_thresholds_by_speed = 1;
@ -786,6 +789,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
FLAG_SKIP_INTRA_BESTINTER |
FLAG_SKIP_COMP_BESTINTRA |
FLAG_SKIP_COMP_REFMISMATCH;
sf->last_chroma_intra_mode = DC_PRED;
}
if (speed == 3) {
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_TYPES;

View File

@ -274,6 +274,7 @@ typedef struct {
// The heuristics selected are based on flags
// defined in the MODE_SEARCH_SKIP_HEURISTICS enum
unsigned int mode_search_skip_flags;
MB_PREDICTION_MODE last_chroma_intra_mode;
} SPEED_FEATURES;
enum BlockSize {

View File

@ -1500,12 +1500,16 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
int64_t *distortion, int *skippable,
BLOCK_SIZE_TYPE bsize) {
MB_PREDICTION_MODE mode;
MB_PREDICTION_MODE last_mode;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
int64_t best_rd = INT64_MAX, this_rd;
int this_rate_tokenonly, this_rate, s;
int64_t this_distortion;
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
last_mode = bsize <= BLOCK_SIZE_SB8X8 ?
TM_PRED : cpi->sf.last_chroma_intra_mode;
for (mode = DC_PRED; mode <= last_mode; mode++) {
x->e_mbd.mode_info_context->mbmi.uv_mode = mode;
super_block_uvrd(&cpi->common, x, &this_rate_tokenonly,
&this_distortion, &s, NULL, bsize);