mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
[AArch64] Fix rotate by odd sizes
The existing disabled gtest rotate tests fail because the existing "any" kernels always assume we are processing height=8 rows at a time. This was recently changed to 16 on AArch64 which triggered this bug. To fix this, amend the TANY macro to explicitly specify the fallback kernel, such that we can use the height=16 kernel to match the SIMD optimized version where necessary. Also change other architecture versions to match. Bug: b/352351302 Change-Id: I8080fa8f44c7c67fa970a78fb426f2f801a9a00e Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5703585 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
ec9a8781c7
commit
e1a93c79fc
@ -18,34 +18,34 @@ namespace libyuv {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TANY(NAMEANY, TPOS_SIMD, MASK) \
|
||||
void NAMEANY(const uint8_t* src, int src_stride, uint8_t* dst, \
|
||||
int dst_stride, int width) { \
|
||||
int r = width & MASK; \
|
||||
int n = width - r; \
|
||||
if (n > 0) { \
|
||||
TPOS_SIMD(src, src_stride, dst, dst_stride, n); \
|
||||
} \
|
||||
TransposeWx8_C(src + n, src_stride, dst + n * dst_stride, dst_stride, r); \
|
||||
#define TANY(NAMEANY, TPOS_SIMD, TPOS_C, MASK) \
|
||||
void NAMEANY(const uint8_t* src, int src_stride, uint8_t* dst, \
|
||||
int dst_stride, int width) { \
|
||||
int r = width & MASK; \
|
||||
int n = width - r; \
|
||||
if (n > 0) { \
|
||||
TPOS_SIMD(src, src_stride, dst, dst_stride, n); \
|
||||
} \
|
||||
TPOS_C(src + n, src_stride, dst + n * dst_stride, dst_stride, r); \
|
||||
}
|
||||
|
||||
#ifdef HAS_TRANSPOSEWX8_NEON
|
||||
TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, 7)
|
||||
TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, TransposeWx8_C, 7)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX16_NEON
|
||||
TANY(TransposeWx16_Any_NEON, TransposeWx16_NEON, 15)
|
||||
TANY(TransposeWx16_Any_NEON, TransposeWx16_NEON, TransposeWx16_C, 15)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX8_SSSE3
|
||||
TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, 7)
|
||||
TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, TransposeWx8_C, 7)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX8_FAST_SSSE3
|
||||
TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, 15)
|
||||
TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, TransposeWx8_C, 15)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX16_MSA
|
||||
TANY(TransposeWx16_Any_MSA, TransposeWx16_MSA, 15)
|
||||
TANY(TransposeWx16_Any_MSA, TransposeWx16_MSA, TransposeWx16_C, 15)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX16_LSX
|
||||
TANY(TransposeWx16_Any_LSX, TransposeWx16_LSX, 15)
|
||||
TANY(TransposeWx16_Any_LSX, TransposeWx16_LSX, TransposeWx16_C, 15)
|
||||
#endif
|
||||
#undef TANY
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user