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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 unsigned int *sse) { | 237 unsigned int *sse) { |
238 unsigned int var; | 238 unsigned int var; |
239 int avg; | 239 int avg; |
240 | 240 |
241 variance_sse2(src_ptr, source_stride, ref_ptr, recon_stride, 16, 16, | 241 variance_sse2(src_ptr, source_stride, ref_ptr, recon_stride, 16, 16, |
242 &var, &avg, vp9_get16x16var_sse2, 16); | 242 &var, &avg, vp9_get16x16var_sse2, 16); |
243 *sse = var; | 243 *sse = var; |
244 return (var - (((unsigned int)avg * avg) >> 8)); | 244 return (var - (((unsigned int)avg * avg) >> 8)); |
245 } | 245 } |
246 | 246 |
247 unsigned int vp9_mse16x16_wmt( | 247 unsigned int vp9_mse16x16_sse2( |
248 const unsigned char *src_ptr, | 248 const unsigned char *src_ptr, |
249 int source_stride, | 249 int source_stride, |
250 const unsigned char *ref_ptr, | 250 const unsigned char *ref_ptr, |
251 int recon_stride, | 251 int recon_stride, |
252 unsigned int *sse) { | 252 unsigned int *sse) { |
253 | 253 |
254 unsigned int sse0; | 254 unsigned int sse0; |
255 int sum0; | 255 int sum0; |
256 vp9_get16x16var_sse2(src_ptr, source_stride, ref_ptr, recon_stride, &sse0, | 256 vp9_get16x16var_sse2(src_ptr, source_stride, ref_ptr, recon_stride, &sse0, |
257 &sum0); | 257 &sum0); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 FN(8, 4, 8, 3, 2, opt1,); \ | 493 FN(8, 4, 8, 3, 2, opt1,); \ |
494 FN(4, 8, 4, 2, 3, opt2,); \ | 494 FN(4, 8, 4, 2, 3, opt2,); \ |
495 FN(4, 4, 4, 2, 2, opt2,) | 495 FN(4, 4, 4, 2, 2, opt2,) |
496 | 496 |
497 FNS(sse2, sse); | 497 FNS(sse2, sse); |
498 FNS(ssse3, ssse3); | 498 FNS(ssse3, ssse3); |
499 | 499 |
500 #undef FNS | 500 #undef FNS |
501 #undef FN | 501 #undef FN |
502 | 502 |
503 unsigned int vp9_variance_halfpixvar16x16_h_wmt( | 503 unsigned int vp9_variance_halfpixvar16x16_h_sse2( |
504 const unsigned char *src_ptr, | 504 const unsigned char *src_ptr, |
505 int src_pixels_per_line, | 505 int src_pixels_per_line, |
506 const unsigned char *dst_ptr, | 506 const unsigned char *dst_ptr, |
507 int dst_pixels_per_line, | 507 int dst_pixels_per_line, |
508 unsigned int *sse) { | 508 unsigned int *sse) { |
509 int xsum0; | 509 int xsum0; |
510 unsigned int xxsum0; | 510 unsigned int xxsum0; |
511 | 511 |
512 vp9_half_horiz_variance16x_h_sse2( | 512 vp9_half_horiz_variance16x_h_sse2( |
513 src_ptr, src_pixels_per_line, | 513 src_ptr, src_pixels_per_line, |
514 dst_ptr, dst_pixels_per_line, 16, | 514 dst_ptr, dst_pixels_per_line, 16, |
515 &xsum0, &xxsum0); | 515 &xsum0, &xxsum0); |
516 | 516 |
517 *sse = xxsum0; | 517 *sse = xxsum0; |
518 return (xxsum0 - (((unsigned int)xsum0 * xsum0) >> 8)); | 518 return (xxsum0 - (((unsigned int)xsum0 * xsum0) >> 8)); |
519 } | 519 } |
520 | 520 |
521 | 521 |
522 unsigned int vp9_variance_halfpixvar16x16_v_wmt( | 522 unsigned int vp9_variance_halfpixvar16x16_v_sse2( |
523 const unsigned char *src_ptr, | 523 const unsigned char *src_ptr, |
524 int src_pixels_per_line, | 524 int src_pixels_per_line, |
525 const unsigned char *dst_ptr, | 525 const unsigned char *dst_ptr, |
526 int dst_pixels_per_line, | 526 int dst_pixels_per_line, |
527 unsigned int *sse) { | 527 unsigned int *sse) { |
528 int xsum0; | 528 int xsum0; |
529 unsigned int xxsum0; | 529 unsigned int xxsum0; |
530 vp9_half_vert_variance16x_h_sse2( | 530 vp9_half_vert_variance16x_h_sse2( |
531 src_ptr, src_pixels_per_line, | 531 src_ptr, src_pixels_per_line, |
532 dst_ptr, dst_pixels_per_line, 16, | 532 dst_ptr, dst_pixels_per_line, 16, |
533 &xsum0, &xxsum0); | 533 &xsum0, &xxsum0); |
534 | 534 |
535 *sse = xxsum0; | 535 *sse = xxsum0; |
536 return (xxsum0 - (((unsigned int)xsum0 * xsum0) >> 8)); | 536 return (xxsum0 - (((unsigned int)xsum0 * xsum0) >> 8)); |
537 } | 537 } |
538 | 538 |
539 | 539 |
540 unsigned int vp9_variance_halfpixvar16x16_hv_wmt( | 540 unsigned int vp9_variance_halfpixvar16x16_hv_sse2( |
541 const unsigned char *src_ptr, | 541 const unsigned char *src_ptr, |
542 int src_pixels_per_line, | 542 int src_pixels_per_line, |
543 const unsigned char *dst_ptr, | 543 const unsigned char *dst_ptr, |
544 int dst_pixels_per_line, | 544 int dst_pixels_per_line, |
545 unsigned int *sse) { | 545 unsigned int *sse) { |
546 int xsum0; | 546 int xsum0; |
547 unsigned int xxsum0; | 547 unsigned int xxsum0; |
548 | 548 |
549 vp9_half_horiz_vert_variance16x_h_sse2( | 549 vp9_half_horiz_vert_variance16x_h_sse2( |
550 src_ptr, src_pixels_per_line, | 550 src_ptr, src_pixels_per_line, |
551 dst_ptr, dst_pixels_per_line, 16, | 551 dst_ptr, dst_pixels_per_line, 16, |
552 &xsum0, &xxsum0); | 552 &xsum0, &xxsum0); |
553 | 553 |
554 *sse = xxsum0; | 554 *sse = xxsum0; |
555 return (xxsum0 - (((unsigned int)xsum0 * xsum0) >> 8)); | 555 return (xxsum0 - (((unsigned int)xsum0 * xsum0) >> 8)); |
556 } | 556 } |
OLD | NEW |