Commit cc206dee authored by fbarchard@google.com's avatar fbarchard@google.com

Fix register used for YUY2 Neon

BUG=113
TEST=unittest
Review URL: https://webrtc-codereview.appspot.com/858008

git-svn-id: http://libyuv.googlecode.com/svn/trunk@392 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent a844b956
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 391 Version: 392
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -120,6 +120,12 @@ extern "C" { ...@@ -120,6 +120,12 @@ extern "C" {
#define HAS_I422TOBGRAROW_NEON #define HAS_I422TOBGRAROW_NEON
#define HAS_I422TOABGRROW_NEON #define HAS_I422TOABGRROW_NEON
#define HAS_I422TORGBAROW_NEON #define HAS_I422TORGBAROW_NEON
#define HAS_YUY2TOUV422ROW_NEON
#define HAS_YUY2TOUVROW_NEON
#define HAS_YUY2TOYROW_NEON
#define HAS_UYVYTOUV422ROW_NEON
#define HAS_UYVYTOUVROW_NEON
#define HAS_UYVYTOYROW_NEON
// TODO(fbarchard): Hook these up to calling functions. // TODO(fbarchard): Hook these up to calling functions.
#define HAS_ARGBTORGBAROW_NEON #define HAS_ARGBTORGBAROW_NEON
#define HAS_ARGBTORGB24ROW_NEON #define HAS_ARGBTORGB24ROW_NEON
...@@ -129,13 +135,6 @@ extern "C" { ...@@ -129,13 +135,6 @@ extern "C" {
#define HAS_RGBATOARGBROW_NEON #define HAS_RGBATOARGBROW_NEON
#define HAS_RAWTOARGBROW_NEON #define HAS_RAWTOARGBROW_NEON
#define HAS_RGB24TOARGBROW_NEON #define HAS_RGB24TOARGBROW_NEON
#define HAS_YUY2TOUV422ROW_NEON
#define HAS_YUY2TOUVROW_NEON
#define HAS_YUY2TOYROW_NEON
#define HAS_UYVYTOUV422ROW_NEON
#define HAS_UYVYTOUVROW_NEON
#define HAS_UYVYTOYROW_NEON
#endif #endif
#if defined(_MSC_VER) && !defined(__CLR_VER) #if defined(_MSC_VER) && !defined(__CLR_VER)
......
...@@ -11,6 +11,6 @@ ...@@ -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 391 #define LIBYUV_VERSION 392
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -181,7 +181,13 @@ int InitCpuFlags(void) { ...@@ -181,7 +181,13 @@ int InitCpuFlags(void) {
cpu_info_ = kCpuHasNEON; cpu_info_ = kCpuHasNEON;
#endif #endif
cpu_info_ |= kCpuInitialized | kCpuHasARM; cpu_info_ |= kCpuInitialized | kCpuHasARM;
#endif if (getenv("LIBYUV_DISABLE_NEON")) {
cpu_info_ &= ~kCpuHasNEON;
}
if (getenv("LIBYUV_DISABLE_ASM")) {
cpu_info_ = kCpuInitialized;
}
#endif // __arm__
return cpu_info_; return cpu_info_;
} }
......
...@@ -213,9 +213,9 @@ void CopyRow_NEON(const uint8* src, uint8* dst, int count) { ...@@ -213,9 +213,9 @@ void CopyRow_NEON(const uint8* src, uint8* dst, int count) {
asm volatile ( asm volatile (
"1: \n" "1: \n"
"pld [%0, #0xC0] \n" // preload "pld [%0, #0xC0] \n" // preload
"vldm %0!,{q0, q1, q2, q3} \n" // load 64 "vldm %0!,{q0, q1, q2, q3} \n" // load 64
"subs %2, %2, #64 \n" // 64 processed per loop "subs %2, %2, #64 \n" // 64 processed per loop
"vstm %1!,{q0, q1, q2, q3} \n" // store 64 "vstm %1!,{q0, q1, q2, q3} \n" // store 64
"bgt 1b \n" "bgt 1b \n"
: "+r"(src), // %0 : "+r"(src), // %0
"+r"(dst), // %1 "+r"(dst), // %1
...@@ -587,17 +587,17 @@ void YUY2ToUVRow_NEON(const uint8* src_yuy2, int stride_yuy2, ...@@ -587,17 +587,17 @@ void YUY2ToUVRow_NEON(const uint8* src_yuy2, int stride_yuy2,
"1: \n" "1: \n"
"vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of YUY2. "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of YUY2.
"vld4.8 {d4, d5, d6, d7}, [%1]! \n" // load next row YUY2. "vld4.8 {d4, d5, d6, d7}, [%1]! \n" // load next row YUY2.
"subs %3, %3, #16 \n" // 16 pixels = 8 UVs. "subs %4, %4, #16 \n" // 16 pixels = 8 UVs.
"vrhadd.u8 d1, d1, d5 \n" // average rows of U "vrhadd.u8 d1, d1, d5 \n" // average rows of U
"vrhadd.u8 d3, d3, d7 \n" // average rows of V "vrhadd.u8 d3, d3, d7 \n" // average rows of V
"vst1.u8 {d1}, [%2]! \n" // store 8 U. "vst1.u8 {d1}, [%2]! \n" // store 8 U.
"vst1.u8 {d3}, [%3]! \n" // store 8 V. "vst1.u8 {d3}, [%3]! \n" // store 8 V.
"bgt 1b \n" "bgt 1b \n"
: "+r"(src_yuy2), // %0 : "+r"(src_yuy2), // %0
"+r"(stride_yuy2), // %1 "+r"(stride_yuy2), // %1
"+r"(dst_u), // %2 "+r"(dst_u), // %2
"+r"(dst_v), // %3 "+r"(dst_v), // %3
"+r"(pix) // %4 "+r"(pix) // %4
: :
: "memory", "cc", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7" // Clobber List : "memory", "cc", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7" // Clobber List
); );
...@@ -612,17 +612,17 @@ void UYVYToUVRow_NEON(const uint8* src_uyvy, int stride_uyvy, ...@@ -612,17 +612,17 @@ void UYVYToUVRow_NEON(const uint8* src_uyvy, int stride_uyvy,
"1: \n" "1: \n"
"vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of UYVY. "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load 16 pixels of UYVY.
"vld4.8 {d4, d5, d6, d7}, [%1]! \n" // load next row UYVY. "vld4.8 {d4, d5, d6, d7}, [%1]! \n" // load next row UYVY.
"subs %3, %3, #16 \n" // 16 pixels = 8 UVs. "subs %4, %4, #16 \n" // 16 pixels = 8 UVs.
"vrhadd.u8 d0, d0, d4 \n" // average rows of U "vrhadd.u8 d0, d0, d4 \n" // average rows of U
"vrhadd.u8 d2, d2, d6 \n" // average rows of V "vrhadd.u8 d2, d2, d6 \n" // average rows of V
"vst1.u8 {d0}, [%2]! \n" // store 8 U. "vst1.u8 {d0}, [%2]! \n" // store 8 U.
"vst1.u8 {d2}, [%3]! \n" // store 8 V. "vst1.u8 {d2}, [%3]! \n" // store 8 V.
"bgt 1b \n" "bgt 1b \n"
: "+r"(src_uyvy), // %0 : "+r"(src_uyvy), // %0
"+r"(stride_uyvy), // %1 "+r"(stride_uyvy), // %1
"+r"(dst_u), // %2 "+r"(dst_u), // %2
"+r"(dst_v), // %3 "+r"(dst_v), // %3
"+r"(pix) // %4 "+r"(pix) // %4
: :
: "memory", "cc", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7" // Clobber List : "memory", "cc", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7" // Clobber List
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment