Commit 54f2094a authored by Frank Barchard's avatar Frank Barchard Committed by Commit Bot

Rename mips source files to dspr2.

Add MSA detect to unittest.
Change macro to disable DSPR2 code to LIBYUV_DISABLE_DSPR2

BUG=libyuv:634
TEST=try bots

Change-Id: I9e0aa2452204fc529bb6f9e6fd93c4e1c379bba6
Reviewed-on: https://chromium-review.googlesource.com/433463Reviewed-by: 's avatarHenrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
parent 33f52bda
......@@ -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
......
......@@ -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"
]
......
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1641
Version: 1642
License: BSD
License File: LICENSE
......
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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_
......@@ -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.
......
......@@ -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',
......
......@@ -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',
],
......
......@@ -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 \
......
......@@ -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,
......
......@@ -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)
......
......@@ -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,
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment