OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 12 matching lines...) Expand all Loading... |
23 const __m128i acc_diff_lo = _mm_srai_epi16( | 23 const __m128i acc_diff_lo = _mm_srai_epi16( |
24 _mm_unpacklo_epi8(acc_diff, acc_diff), 8); | 24 _mm_unpacklo_epi8(acc_diff, acc_diff), 8); |
25 const __m128i acc_diff_hi = _mm_srai_epi16( | 25 const __m128i acc_diff_hi = _mm_srai_epi16( |
26 _mm_unpackhi_epi8(acc_diff, acc_diff), 8); | 26 _mm_unpackhi_epi8(acc_diff, acc_diff), 8); |
27 const __m128i acc_diff_16 = _mm_add_epi16(acc_diff_lo, acc_diff_hi); | 27 const __m128i acc_diff_16 = _mm_add_epi16(acc_diff_lo, acc_diff_hi); |
28 const __m128i hg_fe_dc_ba = _mm_madd_epi16(acc_diff_16, k_1); | 28 const __m128i hg_fe_dc_ba = _mm_madd_epi16(acc_diff_16, k_1); |
29 const __m128i hgfe_dcba = _mm_add_epi32(hg_fe_dc_ba, | 29 const __m128i hgfe_dcba = _mm_add_epi32(hg_fe_dc_ba, |
30 _mm_srli_si128(hg_fe_dc_ba, 8)); | 30 _mm_srli_si128(hg_fe_dc_ba, 8)); |
31 const __m128i hgfedcba = _mm_add_epi32(hgfe_dcba, | 31 const __m128i hgfedcba = _mm_add_epi32(hgfe_dcba, |
32 _mm_srli_si128(hgfe_dcba, 4)); | 32 _mm_srli_si128(hgfe_dcba, 4)); |
33 unsigned int sum_diff = _mm_cvtsi128_si32(hgfedcba); | 33 unsigned int sum_diff = abs(_mm_cvtsi128_si32(hgfedcba)); |
34 | 34 |
35 return abs(sum_diff); | 35 return sum_diff; |
36 } | 36 } |
37 | 37 |
38 int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, | 38 int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y, |
39 int mc_avg_y_stride, | 39 int mc_avg_y_stride, |
40 unsigned char *running_avg_y, int avg_y_stride, | 40 unsigned char *running_avg_y, int avg_y_stride, |
41 unsigned char *sig, int sig_stride, | 41 unsigned char *sig, int sig_stride, |
42 unsigned int motion_magnitude, | 42 unsigned int motion_magnitude, |
43 int increase_denoising) | 43 int increase_denoising) |
44 { | 44 { |
45 unsigned char *running_avg_y_start = running_avg_y; | 45 unsigned char *running_avg_y_start = running_avg_y; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 370 } |
371 } else { | 371 } else { |
372 return COPY_BLOCK; | 372 return COPY_BLOCK; |
373 } | 373 } |
374 } | 374 } |
375 } | 375 } |
376 | 376 |
377 vp8_copy_mem8x8(running_avg_start, avg_stride, sig_start, sig_stride); | 377 vp8_copy_mem8x8(running_avg_start, avg_stride, sig_start, sig_stride); |
378 return FILTER_BLOCK; | 378 return FILTER_BLOCK; |
379 } | 379 } |
OLD | NEW |