diff --git a/Android.mk b/Android.mk index 5d29d900a..a3c8c0e28 100644 --- a/Android.mk +++ b/Android.mk @@ -22,19 +22,19 @@ LOCAL_SRC_FILES := \ source/rotate_any.cc \ source/rotate_argb.cc \ source/rotate_common.cc \ - source/rotate_mips.cc \ + source/rotate_dspr2.cc \ source/rotate_neon64.cc \ source/rotate_gcc.cc \ source/row_any.cc \ source/row_common.cc \ - source/row_mips.cc \ + source/row_dspr2.cc \ source/row_neon64.cc \ source/row_gcc.cc \ source/scale.cc \ source/scale_any.cc \ source/scale_argb.cc \ source/scale_common.cc \ - source/scale_mips.cc \ + source/scale_dspr2.cc \ source/scale_neon64.cc \ source/scale_gcc.cc \ source/video_common.cc diff --git a/BUILD.gn b/BUILD.gn index 79ee567a9..57771b721 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -79,19 +79,19 @@ static_library("libyuv") { "source/rotate_any.cc", "source/rotate_argb.cc", "source/rotate_common.cc", - "source/rotate_mips.cc", + "source/rotate_dspr2.cc", "source/rotate_gcc.cc", "source/rotate_win.cc", "source/row_any.cc", "source/row_common.cc", - "source/row_mips.cc", + "source/row_dspr2.cc", "source/row_gcc.cc", "source/row_win.cc", "source/scale.cc", "source/scale_any.cc", "source/scale_argb.cc", "source/scale_common.cc", - "source/scale_mips.cc", + "source/scale_dspr2.cc", "source/scale_gcc.cc", "source/scale_win.cc", "source/video_common.cc", @@ -254,7 +254,7 @@ if (libyuv_include_tests) { # Enable the following 3 macros to turn off assembly for specified CPU. # "LIBYUV_DISABLE_X86", # "LIBYUV_DISABLE_NEON", - # "LIBYUV_DISABLE_MIPS", + # "LIBYUV_DISABLE_DSPR2", # Enable the following macro to build libyuv as a shared library (dll). # "LIBYUV_USING_SHARED_LIBRARY" ] diff --git a/README.chromium b/README.chromium index f7d63913f..425de92bc 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1641 +Version: 1642 License: BSD License File: LICENSE diff --git a/include/libyuv/rotate_row.h b/include/libyuv/rotate_row.h index a3e69e016..2c51584ee 100644 --- a/include/libyuv/rotate_row.h +++ b/include/libyuv/rotate_row.h @@ -54,7 +54,7 @@ extern "C" { #define HAS_TRANSPOSEUVWX8_NEON #endif -#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ +#if !defined(LIBYUV_DISABLE_DSPR2) && !defined(__native_client__) && \ defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) #define HAS_TRANSPOSEWX8_DSPR2 #define HAS_TRANSPOSEUVWX8_DSPR2 diff --git a/include/libyuv/row.h b/include/libyuv/row.h index 3ed94cc8b..f667a72b9 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -355,10 +355,10 @@ extern "C" { #endif // The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \ - (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6) -#define HAS_COPYROW_MIPS -#if defined(__mips_dsp) && (__mips_dsp_rev >= 2) +#if !defined(LIBYUV_DISABLE_dspr2) && defined(__dspr2__) && \ + (_dspr2_SIM == _dspr2_SIM_ABI32) && (__dspr2_isa_rev < 6) +#define HAS_COPYROW_dspr2 +#if defined(__dspr2_dsp) && (__dspr2_dsp_rev >= 2) #define HAS_I422TOARGBROW_DSPR2 #define HAS_INTERPOLATEROW_DSPR2 #define HAS_MIRRORROW_DSPR2 @@ -384,7 +384,7 @@ extern "C" { #endif #endif -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) +#if !defined(LIBYUV_DISABLE_MSA) && defined(__dspr2_msa) #define HAS_ARGBMIRRORROW_MSA #define HAS_I422TOUYVYROW_MSA #define HAS_I422TOYUY2ROW_MSA @@ -646,7 +646,7 @@ extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B"); -#else /* Visual C */ +#else /* Visual C */ #define IACA_UD_BYTES \ { __asm _emit 0x0F __asm _emit 0x0B } @@ -1354,7 +1354,7 @@ void CopyRow_SSE2(const uint8* src, uint8* dst, int count); void CopyRow_AVX(const uint8* src, uint8* dst, int count); void CopyRow_ERMS(const uint8* src, uint8* dst, int count); void CopyRow_NEON(const uint8* src, uint8* dst, int count); -void CopyRow_MIPS(const uint8* src, uint8* dst, int count); +void CopyRow_dspr2(const uint8* src, uint8* dst, int count); void CopyRow_C(const uint8* src, uint8* dst, int count); void CopyRow_Any_SSE2(const uint8* src, uint8* dst, int count); void CopyRow_Any_AVX(const uint8* src, uint8* dst, int count); diff --git a/include/libyuv/scale_row.h b/include/libyuv/scale_row.h index 73796db99..edb46cc8c 100644 --- a/include/libyuv/scale_row.h +++ b/include/libyuv/scale_row.h @@ -95,7 +95,7 @@ extern "C" { #endif // The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ +#if !defined(LIBYUV_DISABLE_DSPR2) && !defined(__native_client__) && \ defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) #define HAS_SCALEROWDOWN2_DSPR2 #define HAS_SCALEROWDOWN4_DSPR2 diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 4d6dd6282..6bf438025 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1641 +#define LIBYUV_VERSION 1642 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/libyuv.gyp b/libyuv.gyp index d2371450e..f73a1a4b7 100644 --- a/libyuv.gyp +++ b/libyuv.gyp @@ -121,7 +121,7 @@ # Enable the following 3 macros to turn off assembly for specified CPU. # 'LIBYUV_DISABLE_X86', # 'LIBYUV_DISABLE_NEON', - # 'LIBYUV_DISABLE_MIPS', + # 'LIBYUV_DISABLE_DSPR2', # Enable the following macro to build libyuv as a shared library (dll). # 'LIBYUV_USING_SHARED_LIBRARY', # TODO(fbarchard): Make these into gyp defines. diff --git a/libyuv.gypi b/libyuv.gypi index 165d92973..18b2feca5 100644 --- a/libyuv.gypi +++ b/libyuv.gypi @@ -54,7 +54,7 @@ 'source/rotate_argb.cc', 'source/rotate_common.cc', 'source/rotate_gcc.cc', - 'source/rotate_mips.cc', + 'source/rotate_dspr2.cc', 'source/rotate_msa.cc', 'source/rotate_neon.cc', 'source/rotate_neon64.cc', @@ -62,7 +62,7 @@ 'source/row_any.cc', 'source/row_common.cc', 'source/row_gcc.cc', - 'source/row_mips.cc', + 'source/row_dspr2.cc', 'source/row_msa.cc', 'source/row_neon.cc', 'source/row_neon64.cc', @@ -72,7 +72,7 @@ 'source/scale_argb.cc', 'source/scale_common.cc', 'source/scale_gcc.cc', - 'source/scale_mips.cc', + 'source/scale_dspr2.cc', 'source/scale_msa.cc', 'source/scale_neon.cc', 'source/scale_neon64.cc', diff --git a/libyuv_test.gyp b/libyuv_test.gyp index 259954656..88860f5c6 100644 --- a/libyuv_test.gyp +++ b/libyuv_test.gyp @@ -99,7 +99,7 @@ # Enable the following 3 macros to turn off assembly for specified CPU. # 'LIBYUV_DISABLE_X86', # 'LIBYUV_DISABLE_NEON', - # 'LIBYUV_DISABLE_MIPS', + # 'LIBYUV_DISABLE_DSPR2', # Enable the following macro to build libyuv as a shared library (dll). # 'LIBYUV_USING_SHARED_LIBRARY', ], diff --git a/linux.mk b/linux.mk index 625cde9da..923345ae4 100644 --- a/linux.mk +++ b/linux.mk @@ -32,14 +32,14 @@ LOCAL_OBJ_FILES := \ source/rotate.o \ source/rotate_common.o \ source/rotate_gcc.o \ - source/rotate_mips.o \ + source/rotate_dspr2.o \ source/rotate_neon64.o \ source/rotate_neon.o \ source/rotate_win.o \ source/row_any.o \ source/row_common.o \ source/row_gcc.o \ - source/row_mips.o \ + source/row_dspr2.o \ source/row_neon64.o \ source/row_neon.o \ source/row_win.o \ @@ -48,7 +48,7 @@ LOCAL_OBJ_FILES := \ source/scale.o \ source/scale_common.o \ source/scale_gcc.o \ - source/scale_mips.o \ + source/scale_dspr2.o \ source/scale_neon64.o \ source/scale_neon.o \ source/scale_win.o \ diff --git a/source/rotate_mips.cc b/source/rotate_dspr2.cc similarity index 99% rename from source/rotate_mips.cc rename to source/rotate_dspr2.cc index fd300038f..2dce9107c 100644 --- a/source/rotate_mips.cc +++ b/source/rotate_dspr2.cc @@ -18,7 +18,7 @@ namespace libyuv { extern "C" { #endif -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips_dsp) && \ +#if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips_dsp) && \ (__mips_dsp_rev >= 2) && (_MIPS_SIM == _MIPS_SIM_ABI32) void TransposeWx8_DSPR2(const uint8* src, diff --git a/source/row_mips.cc b/source/row_dspr2.cc similarity index 99% rename from source/row_mips.cc rename to source/row_dspr2.cc index ff58e8c1c..466dd5d91 100644 --- a/source/row_mips.cc +++ b/source/row_dspr2.cc @@ -16,7 +16,7 @@ extern "C" { #endif // The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \ +#if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips__) && \ (_MIPS_SIM == _MIPS_SIM_ABI32) #ifdef HAS_COPYROW_MIPS @@ -376,7 +376,7 @@ void CopyRow_MIPS(const uint8* src, uint8* dst, int count) { #endif // HAS_COPYROW_MIPS // DSPR2 functions -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips_dsp) && \ +#if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips_dsp) && \ (__mips_dsp_rev >= 2) && (_MIPS_SIM == _MIPS_SIM_ABI32) && \ (__mips_isa_rev < 6) diff --git a/source/scale_mips.cc b/source/scale_dspr2.cc similarity index 99% rename from source/scale_mips.cc rename to source/scale_dspr2.cc index d7dd20344..ddedcbf46 100644 --- a/source/scale_mips.cc +++ b/source/scale_dspr2.cc @@ -17,7 +17,7 @@ extern "C" { #endif // This module is for GCC MIPS DSPR2 -#if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips_dsp) && \ +#if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips_dsp) && \ (__mips_dsp_rev >= 2) && (_MIPS_SIM == _MIPS_SIM_ABI32) void ScaleRowDown2_DSPR2(const uint8* src_ptr, diff --git a/unit_test/cpu_test.cc b/unit_test/cpu_test.cc index 336f30140..048ed31a8 100644 --- a/unit_test/cpu_test.cc +++ b/unit_test/cpu_test.cc @@ -51,6 +51,8 @@ TEST_F(LibYUVBaseTest, TestCpuHas) { printf("Has MIPS %x\n", has_mips); int has_dspr2 = TestCpuFlag(kCpuHasDSPR2); printf("Has DSPR2 %x\n", has_dspr2); + int has_msa = TestCpuFlag(kCpuHasMSA); + printf("Has MSA %x\n", has_msa); } TEST_F(LibYUVBaseTest, TestCpuCompilerEnabled) {