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

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

Issue 17451020: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 6 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/vp9/encoder/vp9_firstpass.c ('k') | source/libvpx/vp9/encoder/vp9_onyx_if.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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 // no reason to check the same one again. 360 // no reason to check the same one again.
361 if (tr == br && tc == bc) 361 if (tr == br && tc == bc)
362 break; 362 break;
363 363
364 tr = br; 364 tr = br;
365 tc = bc; 365 tc = bc;
366 } 366 }
367 367
368 if (xd->allow_high_precision_mv) { 368 if (xd->allow_high_precision_mv) {
369 usehp = vp9_use_nmv_hp(&ref_mv->as_mv); 369 usehp = vp9_use_mv_hp(&ref_mv->as_mv);
370 } else { 370 } else {
371 usehp = 0; 371 usehp = 0;
372 } 372 }
373 373
374 if (usehp) { 374 if (usehp) {
375 hstep >>= 1; 375 hstep >>= 1;
376 while (--eighthiters) { 376 while (--eighthiters) {
377 CHECK_BETTER(left, tr, tc - hstep); 377 CHECK_BETTER(left, tr, tc - hstep);
378 CHECK_BETTER(right, tr, tc + hstep); 378 CHECK_BETTER(right, tr, tc + hstep);
379 CHECK_BETTER(up, tr - hstep, tc); 379 CHECK_BETTER(up, tr - hstep, tc);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 // no reason to check the same one again. 550 // no reason to check the same one again.
551 if (tr == br && tc == bc) 551 if (tr == br && tc == bc)
552 break; 552 break;
553 553
554 tr = br; 554 tr = br;
555 tc = bc; 555 tc = bc;
556 } 556 }
557 557
558 if (xd->allow_high_precision_mv) { 558 if (xd->allow_high_precision_mv) {
559 usehp = vp9_use_nmv_hp(&ref_mv->as_mv); 559 usehp = vp9_use_mv_hp(&ref_mv->as_mv);
560 } else { 560 } else {
561 usehp = 0; 561 usehp = 0;
562 } 562 }
563 563
564 if (usehp) { 564 if (usehp) {
565 hstep >>= 1; 565 hstep >>= 1;
566 while (--eighthiters) { 566 while (--eighthiters) {
567 CHECK_BETTER(left, tr, tc - hstep); 567 CHECK_BETTER(left, tr, tc - hstep);
568 CHECK_BETTER(right, tr, tc + hstep); 568 CHECK_BETTER(right, tr, tc + hstep);
569 CHECK_BETTER(up, tr - hstep, tc); 569 CHECK_BETTER(up, tr - hstep, tc);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 xd->allow_high_precision_mv); 923 xd->allow_high_precision_mv);
924 924
925 if (diag < bestmse) { 925 if (diag < bestmse) {
926 *bestmv = this_mv; 926 *bestmv = this_mv;
927 bestmse = diag; 927 bestmse = diag;
928 *distortion = thismse; 928 *distortion = thismse;
929 *sse1 = sse; 929 *sse1 = sse;
930 } 930 }
931 931
932 if (x->e_mbd.allow_high_precision_mv) { 932 if (x->e_mbd.allow_high_precision_mv) {
933 usehp = vp9_use_nmv_hp(&ref_mv->as_mv); 933 usehp = vp9_use_mv_hp(&ref_mv->as_mv);
934 } else { 934 } else {
935 usehp = 0; 935 usehp = 0;
936 } 936 }
937 if (!usehp) 937 if (!usehp)
938 return bestmse; 938 return bestmse;
939 939
940 /* Now do 1/8th pixel */ 940 /* Now do 1/8th pixel */
941 if (bestmv->as_mv.row < orig_mv.as_mv.row && !yrow_movedback) { 941 if (bestmv->as_mv.row < orig_mv.as_mv.row && !yrow_movedback) {
942 y -= y_stride; 942 y -= y_stride;
943 yrow_movedback = 1; 943 yrow_movedback = 1;
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 (unsigned int *)(&thissad)) + 2420 (unsigned int *)(&thissad)) +
2421 mv_err_cost(&this_mv, center_mv, mvjcost, mvcost, x->errorperbit, 2421 mv_err_cost(&this_mv, center_mv, mvjcost, mvcost, x->errorperbit,
2422 xd->allow_high_precision_mv); 2422 xd->allow_high_precision_mv);
2423 vpx_free(comp_pred); 2423 vpx_free(comp_pred);
2424 return besterr; 2424 return besterr;
2425 } else { 2425 } else {
2426 vpx_free(comp_pred); 2426 vpx_free(comp_pred);
2427 return INT_MAX; 2427 return INT_MAX;
2428 } 2428 }
2429 } 2429 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_firstpass.c ('k') | source/libvpx/vp9/encoder/vp9_onyx_if.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698