Commit bed27a96 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Add a feature to reduce chrome intra mode search

Change-Id: I721ebdeef2b53ce3e5c3eba3f7462ae2103c95a8
parent 863204e6
......@@ -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;
......
......@@ -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 {
......
......@@ -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);
......
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