mips msa webp configuration
Change-Id: I886164d6d3d560b1249603d47391fddf20b5a3d4
This commit is contained in:
parent
0b8ae8520f
commit
e11da081f9
27
README
27
README
@ -84,6 +84,33 @@ be installed independently using a minor modification in the corresponding
|
||||
Makefile.am configure files (see comments there). See './configure --help' for
|
||||
more options.
|
||||
|
||||
Building for MIPS Linux:
|
||||
------------------------
|
||||
MIPS Linux toolchain stable available releases can be found at:
|
||||
https://community.imgtec.com/developers/mips/tools/codescape-mips-sdk/available-releases/
|
||||
|
||||
# Add toolchain to PATH
|
||||
export PATH=$PATH:/path/to/toolchain/bin
|
||||
|
||||
# 32-bit build for mips32r5 (p5600)
|
||||
HOST=mips-mti-linux-gnu
|
||||
MIPS_CFLAGS="-O3 -mips32r5 -mabi=32 -mtune=p5600 -mmsa -mfp64 \
|
||||
-msched-weight -mload-store-pairs -fPIE"
|
||||
MIPS_LDFLAGS="-mips32r5 -mabi=32 -mmsa -mfp64 -pie"
|
||||
|
||||
# 64-bit build for mips64r6 (i6400)
|
||||
HOST=mips-img-linux-gnu
|
||||
MIPS_CFLAGS="-O3 -mips64r6 -mabi=64 -mtune=i6400 -mmsa -mfp64 \
|
||||
-msched-weight -mload-store-pairs -fPIE"
|
||||
MIPS_LDFLAGS="-mips64r6 -mabi=64 -mmsa -mfp64 -pie"
|
||||
|
||||
./configure --host=${HOST} --build=`config.guess` \
|
||||
CC="${HOST}-gcc -EL" \
|
||||
CFLAGS="$MIPS_CFLAGS" \
|
||||
LDFLAGS="$MIPS_LDFLAGS"
|
||||
make
|
||||
make install
|
||||
|
||||
CMake:
|
||||
------
|
||||
The support for CMake is minimal: it only helps you compile libwebp, cwebp and
|
||||
|
@ -89,6 +89,14 @@ endif
|
||||
# EXTRA_FLAGS += -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
|
||||
# -> seems to make the overall lib slower: -fno-split-wide-types
|
||||
|
||||
# MIPS (MSA) 32-bit build specific flags for mips32r5 (p5600):
|
||||
# EXTRA_FLAGS += -mips32r5 -mabi=32 -mtune=p5600 -mmsa -mfp64
|
||||
# EXTRA_FLAGS += -msched-weight -mload-store-pairs
|
||||
|
||||
# MIPS (MSA) 64-bit build specific flags for mips64r6 (i6400):
|
||||
# EXTRA_FLAGS += -mips64r6 -mabi=64 -mtune=i6400 -mmsa -mfp64
|
||||
# EXTRA_FLAGS += -msched-weight -mload-store-pairs
|
||||
|
||||
#### Nothing should normally be changed below this line ####
|
||||
|
||||
AR = ar
|
||||
|
@ -170,9 +170,10 @@ static int armCPUInfo(CPUFeature feature) {
|
||||
#endif
|
||||
}
|
||||
VP8CPUInfo VP8GetCPUInfo = armCPUInfo;
|
||||
#elif defined(WEBP_USE_MIPS32) || defined(WEBP_USE_MIPS_DSP_R2)
|
||||
#elif defined(WEBP_USE_MIPS32) || defined(WEBP_USE_MIPS_DSP_R2) || \
|
||||
defined(WEBP_USE_MSA)
|
||||
static int mipsCPUInfo(CPUFeature feature) {
|
||||
if ((feature == kMIPS32) || (feature == kMIPSdspR2)) {
|
||||
if ((feature == kMIPS32) || (feature == kMIPSdspR2) || (feature == kMSA)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -96,6 +96,10 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__mips_msa) && defined(__mips_isa_rev) && (__mips_isa_rev >= 5)
|
||||
#define WEBP_USE_MSA
|
||||
#endif
|
||||
|
||||
// This macro prevents thread_sanitizer from reporting known concurrent writes.
|
||||
#define WEBP_TSAN_IGNORE_FUNCTION
|
||||
#if defined(__has_feature)
|
||||
@ -134,7 +138,8 @@ typedef enum {
|
||||
kAVX2,
|
||||
kNEON,
|
||||
kMIPS32,
|
||||
kMIPSdspR2
|
||||
kMIPSdspR2,
|
||||
kMSA
|
||||
} CPUFeature;
|
||||
// returns true if the CPU supports the feature.
|
||||
typedef int (*VP8CPUInfo)(CPUFeature feature);
|
||||
|
Loading…
Reference in New Issue
Block a user