Commit fe53107f authored by Johann's avatar Johann
Browse files

remove incorrect initialization

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

Change-Id: Iaf43c8467129f2f261f04fa9188b603aa46216b5
parent 05239f0c
......@@ -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
// with lots of intra coming in.
int max_filter_level = MAX_LOOP_FILTER ;//* 3 / 4;
(void)base_qindex;
if (cpi->twopass.section_intra_rating > 8)
max_filter_level = MAX_LOOP_FILTER * 3 / 4;
(void) cpi;
(void) base_qindex;
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 filt_err = 0;
int min_filter_level = 0;
int max_filter_level = MAX_LOOP_FILTER * 3 / 4; // PGW August 2006: Highest filter values almost always a bad idea
int min_filter_level = get_min_filter_level(cpi, cm->base_qindex);
int max_filter_level = get_max_filter_level(cpi, cm->base_qindex);
int filt_val;
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
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.
if (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 filt_err = 0;
int min_filter_level;
int max_filter_level;
int min_filter_level = get_min_filter_level(cpi, cm->base_qindex);
int max_filter_level = get_max_filter_level(cpi, cm->base_qindex);
int filter_step;
int filt_high = 0;
......@@ -329,10 +323,6 @@ void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
else
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.
filt_mid = cm->filter_level;
......
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