diff options
author | Marco <marpan@google.com> | 2017-04-11 16:17:18 -0700 |
---|---|---|
committer | Marco <marpan@google.com> | 2017-04-13 09:51:55 -0700 |
commit | 863f860bfcf3bdc26eeecb299aa481d0f63d11ac (patch) | |
tree | 6ca777572d4fe57945665be0d5e9b6901183c64f /vp9/encoder/vp9_encoder.c | |
parent | f22b828d685adee4c7a561990302e2d21b5e0047 (diff) | |
download | libvpx-863f860bfcf3bdc26eeecb299aa481d0f63d11ac.tar libvpx-863f860bfcf3bdc26eeecb299aa481d0f63d11ac.tar.gz libvpx-863f860bfcf3bdc26eeecb299aa481d0f63d11ac.tar.bz2 libvpx-863f860bfcf3bdc26eeecb299aa481d0f63d11ac.zip |
vp9: Avoid encoder loopfilter for non-reference frames.
Useful for SVC, where the top layer enhancement frames may
not update any reference buffers, as is the case for the
patterns in the 1 pass CBR SVC when #temporal_layers > 1.
~3% encoder speedup for SVC patterns with temporal layers
in 1 pass CBR mode.
Updated the SVC datarate tests for the mismatch frames.
Set the frame-dropper off in some tests with #temporal_layers > 1
so we can correctly set #mismatch frames. Adjusted rate target
threshold for tests where frame-dropper was turned off.
Change-Id: Ia0c142f02100be0fed61cd2049691be9c59d6793
Diffstat (limited to 'vp9/encoder/vp9_encoder.c')
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 1dc70d2d3..7d56232e1 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -2618,6 +2618,10 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) { MACROBLOCKD *xd = &cpi->td.mb.e_mbd; struct loopfilter *lf = &cm->lf; + const int is_reference_frame = + (cpi->refresh_last_frame || cpi->refresh_golden_frame || + cpi->refresh_alt_ref_frame); + if (xd->lossless) { lf->filter_level = 0; lf->last_filt_level = 0; @@ -2643,7 +2647,7 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) { cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer); } - if (lf->filter_level > 0) { + if (lf->filter_level > 0 && is_reference_frame) { vp9_build_mask_frame(cm, lf->filter_level, 0); if (cpi->num_workers > 1) |