diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-04-11 15:33:50 -0700 |
---|---|---|
committer | Dmitry Kovalev <dkovalev@google.com> | 2014-04-11 15:33:50 -0700 |
commit | 3766ccd37a5472667f68eb52f2b857f571011a45 (patch) | |
tree | dae88e4afdd3bbb4c7a7a7011a3e6e39d57c2602 | |
parent | 2ebd7f12e135920ae084a79fb8d1cd39b1cfbc0a (diff) | |
download | libvpx-3766ccd37a5472667f68eb52f2b857f571011a45.tar libvpx-3766ccd37a5472667f68eb52f2b857f571011a45.tar.gz libvpx-3766ccd37a5472667f68eb52f2b857f571011a45.tar.bz2 libvpx-3766ccd37a5472667f68eb52f2b857f571011a45.zip |
Adding consts in vp9_picklpf.c.
Change-Id: I84af62cc52954fc2eaf0b737245be76551fc8005
-rw-r--r-- | vp9/encoder/vp9_picklpf.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/vp9/encoder/vp9_picklpf.c b/vp9/encoder/vp9_picklpf.c index 3ac85228b..e003a0f42 100644 --- a/vp9/encoder/vp9_picklpf.c +++ b/vp9/encoder/vp9_picklpf.c @@ -23,7 +23,7 @@ #include "vp9/encoder/vp9_picklpf.h" #include "vp9/encoder/vp9_quantize.h" -static int get_max_filter_level(VP9_COMP *cpi) { +static int get_max_filter_level(const VP9_COMP *cpi) { return cpi->twopass.section_intra_rating > 8 ? MAX_LOOP_FILTER * 3 / 4 : MAX_LOOP_FILTER; } @@ -43,15 +43,15 @@ static int try_filter_frame(const YV12_BUFFER_CONFIG *sd, VP9_COMP *const cpi, return filt_err; } -static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, - int partial_frame) { - VP9_COMMON *const cm = &cpi->common; - struct loopfilter *const lf = &cm->lf; +static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, + int partial_frame) { + const VP9_COMMON *const cm = &cpi->common; + const struct loopfilter *const lf = &cm->lf; const int min_filter_level = 0; const int max_filter_level = get_max_filter_level(cpi); - int best_err; - int filt_best; int filt_direction = 0; + int best_err, filt_best; + // Start the search at the previous frame filter level unless it is now out of // range. int filt_mid = clamp(lf->filter_level, min_filter_level, max_filter_level); @@ -128,7 +128,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, } } - lf->filter_level = filt_best; + return filt_best; } void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, @@ -150,6 +150,7 @@ void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, filt_guess -= 4; lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level); } else { - search_filter_level(sd, cpi, method == LPF_PICK_FROM_SUBIMAGE); + lf->filter_level = search_filter_level(sd, cpi, + method == LPF_PICK_FROM_SUBIMAGE); } } |