From 45230390ff0bdda298c9703f7995327af7523772 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Tue, 28 Jul 2015 14:30:07 -0700 Subject: [PATCH] add support for odd width rotate R=harryjin@google.com BUG=libyuv:464 Review URL: https://webrtc-codereview.appspot.com/52219004. --- source/rotate.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/source/rotate.cc b/source/rotate.cc index 320227429..be3d58920 100644 --- a/source/rotate.cc +++ b/source/rotate.cc @@ -27,21 +27,26 @@ void TransposePlane(const uint8* src, int src_stride, int width, int height) { int i = height; void (*TransposeWx8)(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width) = TransposeWx8_C; + uint8* dst, int dst_stride, int width) = TransposeWx8_C; #if defined(HAS_TRANSPOSEWX8_NEON) if (TestCpuFlag(kCpuHasNEON)) { TransposeWx8 = TransposeWx8_NEON; } #endif #if defined(HAS_TRANSPOSEWX8_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 8)) { - TransposeWx8 = TransposeWx8_SSSE3; + if (TestCpuFlag(kCpuHasSSSE3)) { + TransposeWx8 = TransposeWx8_Any_SSSE3; + if (IS_ALIGNED(width, 8)) { + TransposeWx8 = TransposeWx8_SSSE3; + } } #endif #if defined(HAS_TRANSPOSEWX8_FAST_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 16)) { - TransposeWx8 = TransposeWx8_Fast_SSSE3; + if (TestCpuFlag(kCpuHasSSSE3)) { + TransposeWx8 = TransposeWx8_Fast_Any_SSSE3; + if (IS_ALIGNED(width, 16)) { + TransposeWx8 = TransposeWx8_Fast_SSSE3; + } } #endif #if defined(HAS_TRANSPOSEWX8_MIPS_DSPR2)