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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 #define HAS_INTERPOLATEROW_SSSE3 | 167 #define HAS_INTERPOLATEROW_SSSE3 |
168 #define HAS_RGBCOLORTABLEROW_X86 | 168 #define HAS_RGBCOLORTABLEROW_X86 |
169 #define HAS_SOBELROW_SSE2 | 169 #define HAS_SOBELROW_SSE2 |
170 #define HAS_SOBELTOPLANEROW_SSE2 | 170 #define HAS_SOBELTOPLANEROW_SSE2 |
171 #define HAS_SOBELXROW_SSE2 | 171 #define HAS_SOBELXROW_SSE2 |
172 #define HAS_SOBELXYROW_SSE2 | 172 #define HAS_SOBELXYROW_SSE2 |
173 #define HAS_SOBELYROW_SSE2 | 173 #define HAS_SOBELYROW_SSE2 |
174 | 174 |
175 // The following functions fail on gcc/clang 32 bit with fpic and framepointer. | 175 // The following functions fail on gcc/clang 32 bit with fpic and framepointer. |
176 // caveat: clangcl uses row_win.cc which works. | 176 // caveat: clangcl uses row_win.cc which works. |
177 #if defined(NDEBUG) || !(defined(_DEBUG) && defined(__i386__)) || \ | 177 #if !defined(__i386__) || defined(__OPTIMIZE__) |
178 !defined(__i386__) || defined(_MSC_VER) | |
179 // TODO(fbarchard): fix build error on android_full_debug=1 | 178 // TODO(fbarchard): fix build error on android_full_debug=1 |
180 // https://code.google.com/p/libyuv/issues/detail?id=517 | 179 // https://code.google.com/p/libyuv/issues/detail?id=517 |
181 #define HAS_I422ALPHATOARGBROW_SSSE3 | 180 #define HAS_I422ALPHATOARGBROW_SSSE3 |
182 #endif | 181 #endif |
183 #endif | 182 #endif |
184 | 183 |
185 // The following are available on all x86 platforms, but | 184 // The following are available on all x86 platforms, but |
186 // require VS2012, clang 3.4 or gcc 4.7. | 185 // require VS2012, clang 3.4 or gcc 4.7. |
187 // The code supports NaCL but requires a new compiler and validator. | 186 // The code supports NaCL but requires a new compiler and validator. |
188 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ | 187 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 #define HAS_YUY2TOYROW_AVX2 | 227 #define HAS_YUY2TOYROW_AVX2 |
229 | 228 |
230 // Effects: | 229 // Effects: |
231 #define HAS_ARGBADDROW_AVX2 | 230 #define HAS_ARGBADDROW_AVX2 |
232 #define HAS_ARGBATTENUATEROW_AVX2 | 231 #define HAS_ARGBATTENUATEROW_AVX2 |
233 #define HAS_ARGBMULTIPLYROW_AVX2 | 232 #define HAS_ARGBMULTIPLYROW_AVX2 |
234 #define HAS_ARGBSUBTRACTROW_AVX2 | 233 #define HAS_ARGBSUBTRACTROW_AVX2 |
235 #define HAS_ARGBUNATTENUATEROW_AVX2 | 234 #define HAS_ARGBUNATTENUATEROW_AVX2 |
236 #define HAS_BLENDPLANEROW_AVX2 | 235 #define HAS_BLENDPLANEROW_AVX2 |
237 | 236 |
238 #if !(defined(_DEBUG) && defined(__i386__)) | 237 #if !defined(__i386__) || defined(__OPTIMIZE__) |
239 // TODO(fbarchard): fix build error on android_full_debug=1 | 238 // TODO(fbarchard): fix build error on android_full_debug=1 |
240 // https://code.google.com/p/libyuv/issues/detail?id=517 | 239 // https://code.google.com/p/libyuv/issues/detail?id=517 |
241 #define HAS_I422ALPHATOARGBROW_AVX2 | 240 #define HAS_I422ALPHATOARGBROW_AVX2 |
242 #endif | 241 #endif |
243 #endif | 242 #endif |
244 | 243 |
245 // The following are available for AVX2 Visual C and clangcl 32 bit: | 244 // The following are available for AVX2 Visual C and clangcl 32 bit: |
246 // TODO(fbarchard): Port to gcc. | 245 // TODO(fbarchard): Port to gcc. |
247 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ | 246 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ |
248 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) | 247 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709 | 484 extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709 |
486 | 485 |
487 // Conversion matrix for YVU to BGR | 486 // Conversion matrix for YVU to BGR |
488 extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601 | 487 extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601 |
489 extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg | 488 extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg |
490 extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 | 489 extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 |
491 | 490 |
492 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) | 491 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) |
493 #define OMITFP | 492 #define OMITFP |
494 #else | 493 #else |
495 #define OMITFP __attribute__((optimize("omit-frame-pointer"))) | 494 #define OMITFP __attribute__((optimize("omit-frame-pointer"))) |
wangcheng
2016/10/25 00:26:48
might affect the expectation of build with -fno-om
| |
496 #endif | 495 #endif |
497 | 496 |
498 // NaCL macros for GCC x86 and x64. | 497 // NaCL macros for GCC x86 and x64. |
499 #if defined(__native_client__) | 498 #if defined(__native_client__) |
500 #define LABELALIGN ".p2align 5\n" | 499 #define LABELALIGN ".p2align 5\n" |
501 #else | 500 #else |
502 #define LABELALIGN | 501 #define LABELALIGN |
503 #endif | 502 #endif |
504 #if defined(__native_client__) && defined(__x86_64__) | 503 #if defined(__native_client__) && defined(__x86_64__) |
505 // r14 is used for MEMOP macros. | 504 // r14 is used for MEMOP macros. |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1999 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, | 1998 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, |
2000 int width, | 1999 int width, |
2001 const uint8* luma, uint32 lumacoeff); | 2000 const uint8* luma, uint32 lumacoeff); |
2002 | 2001 |
2003 #ifdef __cplusplus | 2002 #ifdef __cplusplus |
2004 } // extern "C" | 2003 } // extern "C" |
2005 } // namespace libyuv | 2004 } // namespace libyuv |
2006 #endif | 2005 #endif |
2007 | 2006 |
2008 #endif // INCLUDE_LIBYUV_ROW_H_ | 2007 #endif // INCLUDE_LIBYUV_ROW_H_ |
OLD | NEW |