mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-16 23:29:52 +08:00
Move WRITEWORD to row.h
BUG=171 TEST=none Review URL: https://webrtc-codereview.appspot.com/1025004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@525 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
3ae19cb834
commit
54ce26fca4
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 524
|
Version: 525
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -104,22 +104,4 @@ typedef signed char int8;
|
|||||||
#define LIBYUV_LITTLE_ENDIAN
|
#define LIBYUV_LITTLE_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBYUV_LITTLE_ENDIAN
|
|
||||||
#define READWORD(p) (*reinterpret_cast<const uint32*>(p))
|
|
||||||
#define WRITEWORD(p, v) *reinterpret_cast<uint32*>(p) = v
|
|
||||||
#else
|
|
||||||
static inline uint32 READWORD(const uint8* p) {
|
|
||||||
return static_cast<uint32>(p[0]) |
|
|
||||||
(static_cast<uint32>(p[1]) << 8) |
|
|
||||||
(static_cast<uint32>(p[2]) << 16) |
|
|
||||||
(static_cast<uint32>(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
|
#endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ NOLINT
|
||||||
|
|||||||
@ -22,6 +22,24 @@ extern "C" {
|
|||||||
#define kMaxStride (2880 * 4)
|
#define kMaxStride (2880 * 4)
|
||||||
#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
|
#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
|
||||||
|
|
||||||
|
#ifdef LIBYUV_LITTLE_ENDIAN
|
||||||
|
#define READWORD(p) (*reinterpret_cast<const uint32*>(p))
|
||||||
|
#define WRITEWORD(p, v) *reinterpret_cast<uint32*>(p) = v
|
||||||
|
#else
|
||||||
|
static inline uint32 READWORD(const uint8* p) {
|
||||||
|
return static_cast<uint32>(p[0]) |
|
||||||
|
(static_cast<uint32>(p[1]) << 8) |
|
||||||
|
(static_cast<uint32>(p[2]) << 16) |
|
||||||
|
(static_cast<uint32>(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) || \
|
#if defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \
|
||||||
defined(TARGET_IPHONE_SIMULATOR)
|
defined(TARGET_IPHONE_SIMULATOR)
|
||||||
#define YUV_DISABLE_ASM
|
#define YUV_DISABLE_ASM
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 524
|
#define LIBYUV_VERSION 525
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user