| Index: source/libvpx/vp9/encoder/vp9_picklpf.c
|
| ===================================================================
|
| --- source/libvpx/vp9/encoder/vp9_picklpf.c (revision 271012)
|
| +++ source/libvpx/vp9/encoder/vp9_picklpf.c (working copy)
|
| @@ -24,8 +24,12 @@
|
| #include "vp9/encoder/vp9_quantize.h"
|
|
|
| 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;
|
| + if (cpi->pass == 2) {
|
| + return cpi->twopass.section_intra_rating > 8 ? MAX_LOOP_FILTER * 3 / 4
|
| + : MAX_LOOP_FILTER;
|
| + } else {
|
| + return MAX_LOOP_FILTER;
|
| + }
|
| }
|
|
|
|
|
| @@ -34,7 +38,8 @@
|
| VP9_COMMON *const cm = &cpi->common;
|
| int filt_err;
|
|
|
| - vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_level, 1, partial_frame);
|
| + vp9_loop_filter_frame(cm->frame_to_show, cm, &cpi->mb.e_mbd, filt_level, 1,
|
| + partial_frame);
|
| filt_err = vp9_get_y_sse(sd, cm->frame_to_show);
|
|
|
| // Re-instate the unfiltered frame
|
| @@ -77,8 +82,8 @@
|
| // Bias against raising loop filter in favor of lowering it.
|
| int bias = (best_err >> (15 - (filt_mid / 8))) * filter_step;
|
|
|
| - if (cpi->twopass.section_intra_rating < 20)
|
| - bias = bias * cpi->twopass.section_intra_rating / 20;
|
| + if ((cpi->pass == 2) && (cpi->twopass.section_intra_rating < 20))
|
| + bias = (bias * cpi->twopass.section_intra_rating) / 20;
|
|
|
| // yx, bias less for large block size
|
| if (cm->tx_mode != ONLY_4X4)
|
|
|