From cb54e8b69ad68ae30ed29634698b1e2dd8a3f668 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 27 Jul 2015 17:00:41 -0700 Subject: [PATCH] rename rotate macros and functions to match BUG=libyuv:477 R=harryjin@google.com Review URL: https://webrtc-codereview.appspot.com/52199004. --- include/libyuv/rotate_row.h | 15 +++++++-------- source/rotate.cc | 20 ++++++++++---------- source/rotate_any.cc | 6 +++--- source/rotate_gcc.cc | 2 +- source/rotate_mips.cc | 8 +++----- 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/include/libyuv/rotate_row.h b/include/libyuv/rotate_row.h index 6d1f9e168..c41cf3273 100644 --- a/include/libyuv/rotate_row.h +++ b/include/libyuv/rotate_row.h @@ -78,20 +78,19 @@ extern "C" { #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_TRANSPOSE_WX8_NEON -#define HAS_TRANSPOSE_UVWX8_NEON +#define HAS_TRANSPOSEWX8_NEON +#define HAS_TRANSPOSEUVWX8_NEON #endif #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ defined(__mips__) && \ defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_TRANSPOSE_WX8_MIPS_DSPR2 -#define HAS_TRANSPOSE_UVWx8_MIPS_DSPR2 +#define HAS_TRANSPOSEWX8_MIPS_DSPR2 +#define HAS_TRANSPOSEUVWx8_MIPS_DSPR2 #endif // defined(__mips__) void TransposeWxH_C(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); + uint8* dst, int dst_stride, int width, int height); void TransposeWx8_C(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); @@ -99,7 +98,7 @@ void TransposeWx8_NEON(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); void TransposeWx8_SSSE3(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); -void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride, +void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); @@ -108,7 +107,7 @@ void TransposeWx8_Any_NEON(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); -void TransposeWx8_FAST_Any_SSSE3(const uint8* src, int src_stride, +void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); void TransposeWx8_Any_MIPS_DSPR2(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width); diff --git a/source/rotate.cc b/source/rotate.cc index b5f17e495..320227429 100644 --- a/source/rotate.cc +++ b/source/rotate.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" +#include "libyuv/rotate.h" #include "libyuv/cpu_id.h" #include "libyuv/convert.h" @@ -29,26 +29,26 @@ void TransposePlane(const uint8* src, int src_stride, void (*TransposeWx8)(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width) = TransposeWx8_C; -#if defined(HAS_TRANSPOSE_WX8_NEON) +#if defined(HAS_TRANSPOSEWX8_NEON) if (TestCpuFlag(kCpuHasNEON)) { TransposeWx8 = TransposeWx8_NEON; } #endif -#if defined(HAS_TRANSPOSE_WX8_SSSE3) +#if defined(HAS_TRANSPOSEWX8_SSSE3) if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 8)) { TransposeWx8 = TransposeWx8_SSSE3; } #endif -#if defined(HAS_TRANSPOSE_WX8_FAST_SSSE3) +#if defined(HAS_TRANSPOSEWX8_FAST_SSSE3) if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 16)) { - TransposeWx8 = TransposeWx8_FAST_SSSE3; + TransposeWx8 = TransposeWx8_Fast_SSSE3; } #endif -#if defined(HAS_TRANSPOSE_WX8_MIPS_DSPR2) +#if defined(HAS_TRANSPOSEWX8_MIPS_DSPR2) if (TestCpuFlag(kCpuHasMIPS_DSPR2)) { if (IS_ALIGNED(width, 4) && IS_ALIGNED(src, 4) && IS_ALIGNED(src_stride, 4)) { - TransposeWx8 = TransposeWx8_FAST_MIPS_DSPR2; + TransposeWx8 = TransposeWx8_Fast_MIPS_DSPR2; } else { TransposeWx8 = TransposeWx8_MIPS_DSPR2; } @@ -193,17 +193,17 @@ void TransposeUV(const uint8* src, int src_stride, uint8* dst_a, int dst_stride_a, uint8* dst_b, int dst_stride_b, int width) = TransposeUVWx8_C; -#if defined(HAS_TRANSPOSE_UVWX8_NEON) +#if defined(HAS_TRANSPOSEUVWX8_NEON) if (TestCpuFlag(kCpuHasNEON)) { TransposeUVWx8 = TransposeUVWx8_NEON; } #endif -#if defined(HAS_TRANSPOSE_UVWX8_SSE2) +#if defined(HAS_TRANSPOSEUVWX8_SSE2) if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(width, 8)) { TransposeUVWx8 = TransposeUVWx8_SSE2; } #endif -#if defined(HAS_TRANSPOSE_UVWx8_MIPS_DSPR2) +#if defined(HAS_TRANSPOSEUVWx8_MIPS_DSPR2) if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 2) && IS_ALIGNED(src, 4) && IS_ALIGNED(src_stride, 4)) { TransposeUVWx8 = TransposeUVWx8_MIPS_DSPR2; diff --git a/source/rotate_any.cc b/source/rotate_any.cc index 72e7e6e4a..4d6eb34e1 100644 --- a/source/rotate_any.cc +++ b/source/rotate_any.cc @@ -29,16 +29,16 @@ extern "C" { TPOS_C(src + n, src_stride, dst + n * dst_stride, dst_stride, r); \ } -#ifdef HAS_TRANSPOSE_WX8_NEON +#ifdef HAS_TRANSPOSEWX8_NEON TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, TransposeWx8_C, 7) #endif #ifdef HAS_TRANSPOSEWX8_SSSE3 TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, TransposeWx8_C, 7) #endif #ifdef HAS_TRANSPOSEWX8_FAST_SSSE3 -TANY(TransposeWx8_FAST_Any_SSSE3, TransposeWx8_FAST_SSSE3, TransposeWx8_C, 15) +TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, TransposeWx8_C, 15) #endif -#ifdef HAS_TRANSPOSE_WX8_MIPS_DSPR2 +#ifdef HAS_TRANSPOSEWX8_MIPS_DSPR2 TANY(TransposeWx8_Any_MIPS_DSPR2, TransposeWx8_MIPS_DSPR2, TransposeWx8_C, 7) #endif diff --git a/source/rotate_gcc.cc b/source/rotate_gcc.cc index b1ac12470..fd385bcd3 100644 --- a/source/rotate_gcc.cc +++ b/source/rotate_gcc.cc @@ -236,7 +236,7 @@ void TransposeUVWx8_SSE2(const uint8* src, int src_stride, #if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \ defined(__x86_64__) // 64 bit version has enough registers to do 16x8 to 8x16 at a time. -void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride, +void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride, uint8* dst, int dst_stride, int width) { asm volatile ( // Read in the data from the source pointer. diff --git a/source/rotate_mips.cc b/source/rotate_mips.cc index b693c668c..efe6bd909 100644 --- a/source/rotate_mips.cc +++ b/source/rotate_mips.cc @@ -23,8 +23,7 @@ extern "C" { (_MIPS_SIM == _MIPS_SIM_ABI32) void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width) { + uint8* dst, int dst_stride, int width) { __asm__ __volatile__ ( ".set push \n" ".set noreorder \n" @@ -107,9 +106,8 @@ void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride, ); } -void TransposeWx8_FAST_MIPS_DSPR2(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width) { +void TransposeWx8_Fast_MIPS_DSPR2(const uint8* src, int src_stride, + uint8* dst, int dst_stride, int width) { __asm__ __volatile__ ( ".set noat \n" ".set push \n"