diff --git a/README.chromium b/README.chromium index c90241c19..0321f8cf8 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 524 +Version: 525 License: BSD License File: LICENSE diff --git a/include/libyuv/basic_types.h b/include/libyuv/basic_types.h index cf6cc3389..b66312ab9 100644 --- a/include/libyuv/basic_types.h +++ b/include/libyuv/basic_types.h @@ -104,22 +104,4 @@ typedef signed char int8; #define LIBYUV_LITTLE_ENDIAN #endif -#ifdef LIBYUV_LITTLE_ENDIAN -#define READWORD(p) (*reinterpret_cast(p)) -#define WRITEWORD(p, v) *reinterpret_cast(p) = v -#else -static inline uint32 READWORD(const uint8* p) { - return static_cast(p[0]) | - (static_cast(p[1]) << 8) | - (static_cast(p[2]) << 16) | - (static_cast(p[3]) << 24); -} -static inline void WRITEWORD(uint8* p, uint32 v) { - p[0] = (uint8)(v & 255); - p[1] = (uint8)((v >> 8) & 255); - p[2] = (uint8)((v >> 16) & 255); - p[3] = (uint8)((v >> 24) & 255); -} -#endif - #endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ NOLINT diff --git a/include/libyuv/row.h b/include/libyuv/row.h index f62d37687..0b96c74c8 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -22,6 +22,24 @@ extern "C" { #define kMaxStride (2880 * 4) #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) +#ifdef LIBYUV_LITTLE_ENDIAN +#define READWORD(p) (*reinterpret_cast(p)) +#define WRITEWORD(p, v) *reinterpret_cast(p) = v +#else +static inline uint32 READWORD(const uint8* p) { + return static_cast(p[0]) | + (static_cast(p[1]) << 8) | + (static_cast(p[2]) << 16) | + (static_cast(p[3]) << 24); +} +static inline void WRITEWORD(uint8* p, uint32 v) { + p[0] = (uint8)(v & 255); + p[1] = (uint8)((v >> 8) & 255); + p[2] = (uint8)((v >> 16) & 255); + p[3] = (uint8)((v >> 24) & 255); +} +#endif + #if defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \ defined(TARGET_IPHONE_SIMULATOR) #define YUV_DISABLE_ASM diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 8f5b253d2..55b9d851e 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 524 +#define LIBYUV_VERSION 525 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT