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

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

Issue 478033002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 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/onyx_int.h ('k') | source/libvpx/vp8/encoder/rdopt.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 290053)
+++ source/libvpx/vp8/encoder/pickinter.c (working copy)
@@ -40,7 +40,6 @@
extern int vp8_cost_mv_ref(MB_PREDICTION_MODE m, const int near_mv_ref_ct[4]);
-
int vp8_skip_fractional_mv_step(MACROBLOCK *mb, BLOCK *b, BLOCKD *d,
int_mv *bestmv, int_mv *ref_mv,
int error_per_bit,
@@ -506,16 +505,11 @@
this_rd = RDCOST(x->rdmult, x->rddiv, rate2, *distortion2);
- /* Adjust rd to bias to ZEROMV */
- if(this_mode == ZEROMV)
+ // 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 &&
+ cpi->closest_reference_frame == LAST_FRAME)
{
- /* Bias to ZEROMV on LAST_FRAME reference when it is available. */
- if ((cpi->ref_frame_flags & VP8_LAST_FRAME &
- cpi->common.refresh_last_frame)
- && x->e_mbd.mode_info_context->mbmi.ref_frame != LAST_FRAME)
- rd_adj = 100;
-
- // rd_adj <= 100
this_rd = ((int64_t)this_rd) * rd_adj / 100;
}
@@ -694,6 +688,13 @@
*/
calculate_zeromv_rd_adjustment(cpi, x, &rd_adjustment);
+#if CONFIG_TEMPORAL_DENOISING
+ if (cpi->oxcf.noise_sensitivity) {
+ rd_adjustment = (int)(rd_adjustment *
+ cpi->denoiser.denoise_pars.pickmode_mv_bias / 100);
+ }
+#endif
+
/* if we encode a new mv this is important
* find the best new motion vector
*/
@@ -1168,7 +1169,6 @@
#if CONFIG_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity)
{
- int uv_denoise = (cpi->oxcf.noise_sensitivity == 2) ? 1 : 0;
int block_index = mb_row * cpi->common.mb_cols + mb_col;
if (x->best_sse_inter_mode == DC_PRED)
{
@@ -1183,9 +1183,8 @@
vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse,
recon_yoffset, recon_uvoffset,
&cpi->common.lf_info, mb_row, mb_col,
- block_index, uv_denoise);
+ block_index);
-
/* Reevaluate ZEROMV after denoising. */
if (best_mbmode.ref_frame == INTRA_FRAME &&
x->best_zeromv_reference_frame != INTRA_FRAME)
« no previous file with comments | « source/libvpx/vp8/encoder/onyx_int.h ('k') | source/libvpx/vp8/encoder/rdopt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698