| 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 |
| 11 #ifndef INCLUDE_LIBYUV_ROW_H_ // NOLINT | 11 #ifndef INCLUDE_LIBYUV_ROW_H_ |
| 12 #define INCLUDE_LIBYUV_ROW_H_ | 12 #define INCLUDE_LIBYUV_ROW_H_ |
| 13 | 13 |
| 14 #include <stdlib.h> // For malloc. | 14 #include <stdlib.h> // For malloc. |
| 15 | 15 |
| 16 #include "libyuv/basic_types.h" | 16 #include "libyuv/basic_types.h" |
| 17 | 17 |
| 18 #ifdef __cplusplus | 18 #ifdef __cplusplus |
| 19 namespace libyuv { | 19 namespace libyuv { |
| 20 extern "C" { | 20 extern "C" { |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) | 23 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) |
| 24 | 24 |
| 25 #ifdef __cplusplus | |
| 26 #define align_buffer_64(var, size) \ | |
| 27 uint8* var##_mem = reinterpret_cast<uint8*>(malloc((size) + 63)); \ | |
| 28 uint8* var = reinterpret_cast<uint8*> \ | |
| 29 ((reinterpret_cast<intptr_t>(var##_mem) + 63) & ~63) | |
| 30 #else | |
| 31 #define align_buffer_64(var, size) \ | 25 #define align_buffer_64(var, size) \ |
| 32 uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ | 26 uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ |
| 33 uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ | 27 uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ |
| 34 #endif | |
| 35 | 28 |
| 36 #define free_aligned_buffer_64(var) \ | 29 #define free_aligned_buffer_64(var) \ |
| 37 free(var##_mem); \ | 30 free(var##_mem); \ |
| 38 var = 0 | 31 var = 0 |
| 39 | 32 |
| 40 #if defined(__pnacl__) || defined(__CLR_VER) || \ | 33 #if defined(__pnacl__) || defined(__CLR_VER) || \ |
| 41 (defined(__i386__) && !defined(__SSE2__)) | 34 (defined(__i386__) && !defined(__SSE2__)) |
| 42 #define LIBYUV_DISABLE_X86 | 35 #define LIBYUV_DISABLE_X86 |
| 43 #endif | 36 #endif |
| 44 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 | 37 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 |
| (...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 const uint8* luma, uint32 lumacoeff); | 1936 const uint8* luma, uint32 lumacoeff); |
| 1944 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, | 1937 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, |
| 1945 int width, | 1938 int width, |
| 1946 const uint8* luma, uint32 lumacoeff); | 1939 const uint8* luma, uint32 lumacoeff); |
| 1947 | 1940 |
| 1948 #ifdef __cplusplus | 1941 #ifdef __cplusplus |
| 1949 } // extern "C" | 1942 } // extern "C" |
| 1950 } // namespace libyuv | 1943 } // namespace libyuv |
| 1951 #endif | 1944 #endif |
| 1952 | 1945 |
| 1953 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT | 1946 #endif // INCLUDE_LIBYUV_ROW_H_ |
| OLD | NEW |