#elif ARCH_AARCH64
{"ARMv8", X264_CPU_ARMV8},
{"NEON", X264_CPU_NEON},
+#elif ARCH_MIPS
+ {"MSA", X264_CPU_MSA},
#endif
{"", 0},
};
return X264_CPU_ARMV8 | X264_CPU_NEON;
}
+#elif ARCH_MIPS
+
+uint32_t x264_cpu_detect( void )
+{
+ uint32_t flags = 0;
+#if HAVE_MSA
+ flags |= X264_CPU_MSA;
+#endif
+ return flags;
+}
+
#else
uint32_t x264_cpu_detect( void )
# list of all preprocessor HAVE values we can define
CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F SWSCALE \
- LAVF FFMS GPAC AVS GPL VECTOREXT INTERLACED CPU_COUNT OPENCL THP LSMASH X86_INLINE_ASM AS_FUNC INTEL_DISPATCHER"
+ LAVF FFMS GPAC AVS GPL VECTOREXT INTERLACED CPU_COUNT OPENCL THP LSMASH X86_INLINE_ASM AS_FUNC INTEL_DISPATCHER \
+ MSA"
# parse options
sparc)
ARCH="SPARC"
;;
- mips|mipsel|mips64|mips64el)
+ mips*)
ARCH="MIPS"
+ AS="${AS-${CC}}"
+ AS_EXT=".c"
;;
arm*)
ARCH="ARM"
as_check ".func test${NL}.endfunc" && define HAVE_AS_FUNC 1
fi
+if [ $asm = auto -a $ARCH = MIPS ] ; then
+ if ! echo $CFLAGS | grep -Eq '(-march|-mmsa|-mno-msa)' ; then
+ cc_check '' '-mmsa -mfp64 -mhard-float' && CFLAGS="-mmsa -mfp64 -mhard-float $CFLAGS"
+ fi
+
+ if cc_check '' '' '__asm__("addvi.b $w0, $w1, 1");' ; then
+ define HAVE_MSA
+ else
+ echo "You specified a pre-MSA CPU in your CFLAGS."
+ echo "If you really want to run on such a CPU, configure with --disable-asm."
+ exit 1
+ fi
+fi
+
[ $asm = no ] && AS=""
[ "x$AS" = x ] && asm="no" || asm="yes"
#include "x264_config.h"
-#define X264_BUILD 147
+#define X264_BUILD 148
/* Application developers planning to link against a shared library version of
* libx264 from a Microsoft Visual Studio or similar development environment
#define X264_CPU_FAST_NEON_MRC 0x0000004 /* Transfer from NEON to ARM register is fast (Cortex-A9) */
#define X264_CPU_ARMV8 0x0000008
+/* MIPS */
+#define X264_CPU_MSA 0x0000001 /* MIPS MSA */
+
/* Analyse flags */
#define X264_ANALYSE_I4x4 0x0001 /* Analyse i4x4 */
#define X264_ANALYSE_I8x8 0x0002 /* Analyse i8x8 (requires 8x8 transform) */