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

Side by Side Diff: source/libvpx/vp8/encoder/rdopt.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp8/encoder/pickinter.c ('k') | source/libvpx/vp8/vp8_cx_iface.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 x->rd_thresh_mult[best_mode_index] - best_adjustment : 2504 x->rd_thresh_mult[best_mode_index] - best_adjustment :
2505 MIN_THRESHMULT; 2505 MIN_THRESHMULT;
2506 x->rd_threshes[best_mode_index] = 2506 x->rd_threshes[best_mode_index] =
2507 (cpi->rd_baseline_thresh[best_mode_index] >> 7) * 2507 (cpi->rd_baseline_thresh[best_mode_index] >> 7) *
2508 x->rd_thresh_mult[best_mode_index]; 2508 x->rd_thresh_mult[best_mode_index];
2509 } 2509 }
2510 2510
2511 #if CONFIG_TEMPORAL_DENOISING 2511 #if CONFIG_TEMPORAL_DENOISING
2512 if (cpi->oxcf.noise_sensitivity) 2512 if (cpi->oxcf.noise_sensitivity)
2513 { 2513 {
2514 int uv_denoise = (cpi->oxcf.noise_sensitivity == 2) ? 1 : 0;
2515 int block_index = mb_row * cpi->common.mb_cols + mb_col; 2514 int block_index = mb_row * cpi->common.mb_cols + mb_col;
2516 if (x->best_sse_inter_mode == DC_PRED) 2515 if (x->best_sse_inter_mode == DC_PRED)
2517 { 2516 {
2518 /* No best MV found. */ 2517 /* No best MV found. */
2519 x->best_sse_inter_mode = best_mode.mbmode.mode; 2518 x->best_sse_inter_mode = best_mode.mbmode.mode;
2520 x->best_sse_mv = best_mode.mbmode.mv; 2519 x->best_sse_mv = best_mode.mbmode.mv;
2521 x->need_to_clamp_best_mvs = best_mode.mbmode.need_to_clamp_mvs; 2520 x->need_to_clamp_best_mvs = best_mode.mbmode.need_to_clamp_mvs;
2522 x->best_reference_frame = best_mode.mbmode.ref_frame; 2521 x->best_reference_frame = best_mode.mbmode.ref_frame;
2523 best_sse = best_rd_sse; 2522 best_sse = best_rd_sse;
2524 } 2523 }
2525 vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse, 2524 vp8_denoiser_denoise_mb(&cpi->denoiser, x, best_sse, zero_mv_sse,
2526 recon_yoffset, recon_uvoffset, 2525 recon_yoffset, recon_uvoffset,
2527 &cpi->common.lf_info, mb_row, mb_col, 2526 &cpi->common.lf_info, mb_row, mb_col,
2528 block_index, uv_denoise); 2527 block_index);
2529
2530 2528
2531 /* Reevaluate ZEROMV after denoising. */ 2529 /* Reevaluate ZEROMV after denoising. */
2532 if (best_mode.mbmode.ref_frame == INTRA_FRAME && 2530 if (best_mode.mbmode.ref_frame == INTRA_FRAME &&
2533 x->best_zeromv_reference_frame != INTRA_FRAME) 2531 x->best_zeromv_reference_frame != INTRA_FRAME)
2534 { 2532 {
2535 int this_rd = INT_MAX; 2533 int this_rd = INT_MAX;
2536 int disable_skip = 0; 2534 int disable_skip = 0;
2537 int other_cost = 0; 2535 int other_cost = 0;
2538 int this_ref_frame = x->best_zeromv_reference_frame; 2536 int this_ref_frame = x->best_zeromv_reference_frame;
2539 rd.rate2 = x->ref_frame_cost[this_ref_frame] + 2537 rd.rate2 = x->ref_frame_cost[this_ref_frame] +
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 x->e_mbd.mode_info_context->mbmi.mode = B_PRED; 2632 x->e_mbd.mode_info_context->mbmi.mode = B_PRED;
2635 rate += rate4x4; 2633 rate += rate4x4;
2636 } 2634 }
2637 else 2635 else
2638 { 2636 {
2639 rate += rate16x16; 2637 rate += rate16x16;
2640 } 2638 }
2641 2639
2642 *rate_ = rate; 2640 *rate_ = rate;
2643 } 2641 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/pickinter.c ('k') | source/libvpx/vp8/vp8_cx_iface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698