diff --git a/include/libyuv/row.h b/include/libyuv/row.h index c64b6be1b..5ac0c42b2 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -299,15 +299,18 @@ extern "C" { #define HAS_COPYROW_NEON #define HAS_J400TOARGBROW_NEON #define HAS_I411TOARGBROW_NEON +#define HAS_I422TOARGBROW_NEON #define HAS_I422TOABGRROW_NEON #define HAS_I422TOARGB1555ROW_NEON #define HAS_I422TOARGB4444ROW_NEON -#define HAS_I422TOARGBROW_NEON // TODO(fbarchard): Implement aarch64 neon version #ifndef __aarch64__ #define HAS_I422TOARGBMATRIXROW_NEON +#define HAS_I422TOABGRMATRIXROW_NEON #define HAS_J422TOARGBROW_NEON +#define HAS_J422TOABGRROW_NEON #define HAS_H422TOARGBROW_NEON +#define HAS_H422TOABGRROW_NEON #endif // #define HAS_I422TOABGRMATRIXROW_NEON #define HAS_I422TOBGRAROW_NEON diff --git a/source/row_any.cc b/source/row_any.cc index aeb3fe23d..0e75547bc 100644 --- a/source/row_any.cc +++ b/source/row_any.cc @@ -123,9 +123,15 @@ ANY31(I422ToRGB565Row_Any_NEON, I422ToRGB565Row_NEON, 1, 0, 2, 7) #ifdef HAS_J422TOARGBROW_NEON ANY31(J422ToARGBRow_Any_NEON, J422ToARGBRow_NEON, 1, 0, 4, 7) #endif +#ifdef HAS_J422TOABGRROW_NEON +ANY31(J422ToABGRRow_Any_NEON, J422ToABGRRow_NEON, 1, 0, 4, 7) +#endif #ifdef HAS_H422TOARGBROW_NEON ANY31(H422ToARGBRow_Any_NEON, H422ToARGBRow_NEON, 1, 0, 4, 7) #endif +#ifdef HAS_H422TOABGRROW_NEON +ANY31(H422ToABGRRow_Any_NEON, H422ToABGRRow_NEON, 1, 0, 4, 7) +#endif #ifdef HAS_I422TOYUY2ROW_NEON ANY31(I422ToYUY2Row_Any_NEON, I422ToYUY2Row_NEON, 1, 1, 4, 15) #endif diff --git a/source/row_common.cc b/source/row_common.cc index e900bc19b..5f4aa3714 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -2294,7 +2294,11 @@ ANYYUV(I422ToARGBRow_NEON, I422ToARGBMatrixRow_NEON, kYuvConstantsNEON) ANYYUV(J422ToARGBRow_NEON, I422ToARGBMatrixRow_NEON, kYuvJConstantsNEON) ANYYUV(H422ToARGBRow_NEON, I422ToARGBMatrixRow_NEON, kYuvHConstantsNEON) #endif - +#ifdef HAS_I422TOABGRMATRIXROW_NEON +ANYYUV(I422ToABGRRow_NEON, I422ToABGRMatrixRow_NEON, kYuvConstantsNEON) +ANYYUV(J422ToABGRRow_NEON, I422ToABGRMatrixRow_NEON, kYuvJConstantsNEON) +ANYYUV(H422ToABGRRow_NEON, I422ToABGRMatrixRow_NEON, kYuvHConstantsNEON) +#endif #ifdef HAS_I422TOARGBMATRIXROW_SSSE3 ANYYUV(I422ToARGBRow_SSSE3, I422ToARGBMatrixRow_SSSE3, kYuvConstants) ANYYUV(J422ToARGBRow_SSSE3, I422ToARGBMatrixRow_SSSE3, kYuvJConstants) diff --git a/source/row_neon.cc b/source/row_neon.cc index a384eb655..b4742ef5d 100644 --- a/source/row_neon.cc +++ b/source/row_neon.cc @@ -368,11 +368,12 @@ void I422ToBGRARow_NEON(const uint8* src_y, ); } -void I422ToABGRRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_abgr, - int width) { +void I422ToABGRMatrixRow_NEON(const uint8* src_y, + const uint8* src_u, + const uint8* src_v, + uint8* dst_abgr, + struct YuvConstantsNEON* YuvConstants, + int width) { asm volatile ( YUV422TORGB_SETUP_REG "1: \n" @@ -389,10 +390,10 @@ void I422ToABGRRow_NEON(const uint8* src_y, "+r"(src_v), // %2 "+r"(dst_abgr), // %3 "+r"(width) // %4 - : [kUVToRB]"r"(&kYuvConstantsNEON.kUVToRB), // %5 - [kUVToG]"r"(&kYuvConstantsNEON.kUVToG), // %6 - [kUVBiasBGR]"r"(&kYuvConstantsNEON.kUVBiasBGR), - [kYToRgb]"r"(&kYuvConstantsNEON.kYToRgb) + : [kUVToRB]"r"(&YuvConstants->kUVToRB), // %5 + [kUVToG]"r"(&YuvConstants->kUVToG), // %6 + [kUVBiasBGR]"r"(&YuvConstants->kUVBiasBGR), + [kYToRgb]"r"(&YuvConstants->kYToRgb) : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" ); diff --git a/source/row_neon64.cc b/source/row_neon64.cc index 2b3eff40d..ab74c792d 100644 --- a/source/row_neon64.cc +++ b/source/row_neon64.cc @@ -205,6 +205,7 @@ void I444ToARGBRow_NEON(const uint8* src_y, } #endif // HAS_I444TOARGBROW_NEON +// TODO(fbarchard): Switch to Matrix version of this function. #ifdef HAS_I422TOARGBROW_NEON void I422ToARGBRow_NEON(const uint8* src_y, const uint8* src_u, @@ -292,6 +293,7 @@ void I422ToBGRARow_NEON(const uint8* src_y, } #endif // HAS_I422TOBGRAROW_NEON +// TODO(fbarchard): Switch to Matrix version of this function. #ifdef HAS_I422TOABGRROW_NEON void I422ToABGRRow_NEON(const uint8* src_y, const uint8* src_u,