OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 remainder = (int)(count) & 15; | 74 remainder = (int)(count) & 15; |
75 if (remainder) { | 75 if (remainder) { |
76 seed = HashDjb2_C(src, remainder, seed); | 76 seed = HashDjb2_C(src, remainder, seed); |
77 } | 77 } |
78 return seed; | 78 return seed; |
79 } | 79 } |
80 | 80 |
81 uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count); | 81 uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count); |
82 #if !defined(LIBYUV_DISABLE_NEON) && \ | 82 #if !defined(LIBYUV_DISABLE_NEON) && \ |
83 (defined(__ARM_NEON__) || defined(LIBYUV_NEON)) | 83 (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) |
84 #define HAS_SUMSQUAREERROR_NEON | 84 #define HAS_SUMSQUAREERROR_NEON |
85 uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count); | 85 uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count); |
86 #endif | 86 #endif |
87 #if !defined(LIBYUV_DISABLE_X86) && \ | 87 #if !defined(LIBYUV_DISABLE_X86) && \ |
88 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) | 88 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) |
89 #define HAS_SUMSQUAREERROR_SSE2 | 89 #define HAS_SUMSQUAREERROR_SSE2 |
90 uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count); | 90 uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count); |
91 #endif | 91 #endif |
92 // Visual C 2012 required for AVX2. | 92 // Visual C 2012 required for AVX2. |
93 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && _MSC_VER >= 1700 | 93 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && _MSC_VER >= 1700 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 const double ssim_v = CalcFrameSsim(src_v_a, stride_v_a, | 316 const double ssim_v = CalcFrameSsim(src_v_a, stride_v_a, |
317 src_v_b, stride_v_b, | 317 src_v_b, stride_v_b, |
318 width_uv, height_uv); | 318 width_uv, height_uv); |
319 return ssim_y * 0.8 + 0.1 * (ssim_u + ssim_v); | 319 return ssim_y * 0.8 + 0.1 * (ssim_u + ssim_v); |
320 } | 320 } |
321 | 321 |
322 #ifdef __cplusplus | 322 #ifdef __cplusplus |
323 } // extern "C" | 323 } // extern "C" |
324 } // namespace libyuv | 324 } // namespace libyuv |
325 #endif | 325 #endif |
OLD | NEW |