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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_rd.c

Issue 1019863002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_pickmode.c ('k') | source/libvpx/vp9/encoder/vp9_resize.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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 uint8_t *src_y_ptr = x->plane[0].src.buf; 460 uint8_t *src_y_ptr = x->plane[0].src.buf;
461 uint8_t *ref_y_ptr; 461 uint8_t *ref_y_ptr;
462 const int num_mv_refs = MAX_MV_REF_CANDIDATES + 462 const int num_mv_refs = MAX_MV_REF_CANDIDATES +
463 (cpi->sf.adaptive_motion_search && 463 (cpi->sf.adaptive_motion_search &&
464 block_size < x->max_partition_size); 464 block_size < x->max_partition_size);
465 465
466 MV pred_mv[3]; 466 MV pred_mv[3];
467 pred_mv[0] = mbmi->ref_mvs[ref_frame][0].as_mv; 467 pred_mv[0] = mbmi->ref_mvs[ref_frame][0].as_mv;
468 pred_mv[1] = mbmi->ref_mvs[ref_frame][1].as_mv; 468 pred_mv[1] = mbmi->ref_mvs[ref_frame][1].as_mv;
469 pred_mv[2] = x->pred_mv[ref_frame]; 469 pred_mv[2] = x->pred_mv[ref_frame];
470 assert(num_mv_refs <= (int)(sizeof(pred_mv) / sizeof(pred_mv[0])));
470 471
471 // Get the sad for each candidate reference mv. 472 // Get the sad for each candidate reference mv.
472 for (i = 0; i < num_mv_refs; ++i) { 473 for (i = 0; i < num_mv_refs; ++i) {
473 const MV *this_mv = &pred_mv[i]; 474 const MV *this_mv = &pred_mv[i];
474 475
475 max_mv = MAX(max_mv, MAX(abs(this_mv->row), abs(this_mv->col)) >> 3); 476 max_mv = MAX(max_mv, MAX(abs(this_mv->row), abs(this_mv->col)) >> 3);
476 if (is_zero_mv(this_mv) && zero_seen) 477 if (is_zero_mv(this_mv) && zero_seen)
477 continue; 478 continue;
478 479
479 zero_seen |= is_zero_mv(this_mv); 480 zero_seen |= is_zero_mv(this_mv);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 return ROUND_POWER_OF_TWO(5 * q, 2); 650 return ROUND_POWER_OF_TWO(5 * q, 2);
650 default: 651 default:
651 assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12"); 652 assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
652 return -1; 653 return -1;
653 } 654 }
654 #else 655 #else
655 return 20 * q; 656 return 20 * q;
656 #endif // CONFIG_VP9_HIGHBITDEPTH 657 #endif // CONFIG_VP9_HIGHBITDEPTH
657 } 658 }
658 659
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_pickmode.c ('k') | source/libvpx/vp9/encoder/vp9_resize.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698