remove incorrect initialization

Values were set, then reset. Only set them once.

Change-Id: Iaf43c8467129f2f261f04fa9188b603aa46216b5
This commit is contained in:
Johann 2011-06-27 16:31:01 -04:00
parent 05239f0c41
commit fe53107fda

View File

@ -141,13 +141,11 @@ static int get_max_filter_level(VP8_COMP *cpi, int base_qindex)
// jbb chg: 20100118 - not so any more with this overquant stuff allow high values // jbb chg: 20100118 - not so any more with this overquant stuff allow high values
// with lots of intra coming in. // with lots of intra coming in.
int max_filter_level = MAX_LOOP_FILTER ;//* 3 / 4; int max_filter_level = MAX_LOOP_FILTER ;//* 3 / 4;
(void)base_qindex;
if (cpi->twopass.section_intra_rating > 8) if (cpi->twopass.section_intra_rating > 8)
max_filter_level = MAX_LOOP_FILTER * 3 / 4; max_filter_level = MAX_LOOP_FILTER * 3 / 4;
(void) cpi;
(void) base_qindex;
return max_filter_level; return max_filter_level;
} }
@ -157,8 +155,8 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
int best_err = 0; int best_err = 0;
int filt_err = 0; int filt_err = 0;
int min_filter_level = 0; int min_filter_level = get_min_filter_level(cpi, cm->base_qindex);
int max_filter_level = MAX_LOOP_FILTER * 3 / 4; // PGW August 2006: Highest filter values almost always a bad idea int max_filter_level = get_max_filter_level(cpi, cm->base_qindex);
int filt_val; int filt_val;
int best_filt_val = cm->filter_level; int best_filt_val = cm->filter_level;
@ -171,10 +169,6 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
else else
cm->sharpness_level = cpi->oxcf.Sharpness; cm->sharpness_level = cpi->oxcf.Sharpness;
// Enforce a minimum filter level based upon Q
min_filter_level = get_min_filter_level(cpi, cm->base_qindex);
max_filter_level = get_max_filter_level(cpi, cm->base_qindex);
// Start the search at the previous frame filter level unless it is now out of range. // Start the search at the previous frame filter level unless it is now out of range.
if (cm->filter_level < min_filter_level) if (cm->filter_level < min_filter_level)
cm->filter_level = min_filter_level; cm->filter_level = min_filter_level;
@ -294,8 +288,8 @@ void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
int best_err = 0; int best_err = 0;
int filt_err = 0; int filt_err = 0;
int min_filter_level; int min_filter_level = get_min_filter_level(cpi, cm->base_qindex);
int max_filter_level; int max_filter_level = get_max_filter_level(cpi, cm->base_qindex);
int filter_step; int filter_step;
int filt_high = 0; int filt_high = 0;
@ -329,10 +323,6 @@ void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
else else
cm->sharpness_level = cpi->oxcf.Sharpness; cm->sharpness_level = cpi->oxcf.Sharpness;
// Enforce a minimum filter level based upon Q
min_filter_level = get_min_filter_level(cpi, cm->base_qindex);
max_filter_level = get_max_filter_level(cpi, cm->base_qindex);
// Start the search at the previous frame filter level unless it is now out of range. // Start the search at the previous frame filter level unless it is now out of range.
filt_mid = cm->filter_level; filt_mid = cm->filter_level;