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

Unified Diff: source/libvpx/vp8/encoder/pickinter.c

Issue 668403002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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
« no previous file with comments | « source/libvpx/vp8/encoder/mcomp.c ('k') | source/libvpx/vp8/vp8_dx_iface.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/encoder/pickinter.c
===================================================================
--- source/libvpx/vp8/encoder/pickinter.c (revision 292608)
+++ source/libvpx/vp8/encoder/pickinter.c (working copy)
@@ -516,9 +516,8 @@
// Adjust rd for ZEROMV and LAST, if LAST is the closest reference frame.
if (this_mode == ZEROMV &&
x->e_mbd.mode_info_context->mbmi.ref_frame == LAST_FRAME &&
- (denoise_aggressive || cpi->closest_reference_frame == LAST_FRAME))
- {
- this_rd = ((int64_t)this_rd) * rd_adj / 100;
+ (denoise_aggressive || cpi->closest_reference_frame == LAST_FRAME)) {
+ this_rd = ((int64_t)this_rd) * rd_adj / 100;
}
check_for_encode_breakout(*sse, x);
@@ -1083,7 +1082,14 @@
{
/* Store for later use by denoiser. */
- if (this_mode == ZEROMV && sse < zero_mv_sse )
+ // Dont' denoise with GOLDEN OR ALTREF is they are old reference
+ // frames (greater than MAX_GF_ARF_DENOISE_RANGE frames in past).
+ int skip_old_reference = ((this_ref_frame != LAST_FRAME) &&
+ (cpi->common.current_video_frame -
+ cpi->current_ref_frames[this_ref_frame] >
+ MAX_GF_ARF_DENOISE_RANGE)) ? 1 : 0;
+ if (this_mode == ZEROMV && sse < zero_mv_sse &&
+ !skip_old_reference)
{
zero_mv_sse = sse;
x->best_zeromv_reference_frame =
@@ -1092,7 +1098,7 @@
/* Store the best NEWMV in x for later use in the denoiser. */
if (x->e_mbd.mode_info_context->mbmi.mode == NEWMV &&
- sse < best_sse)
+ sse < best_sse && !skip_old_reference)
{
best_sse = sse;
x->best_sse_inter_mode = NEWMV;
« no previous file with comments | « source/libvpx/vp8/encoder/mcomp.c ('k') | source/libvpx/vp8/vp8_dx_iface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698