| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |