Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: source/libvpx/vp9/encoder/vp9_picklpf.c

Issue 290653003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698