summaryrefslogtreecommitdiff
path: root/ffbuild
diff options
context:
space:
mode:
authorShiyou Yin <yinshiyou-hf@loongson.cn>2021-12-15 11:51:04 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2021-12-15 18:37:40 +0100
commit9a840ffa176038d44e0197283590f891b2cf9eeb (patch)
tree0ffdbc383bd1bdd8a7af3963c27e7ff7999d3f02 /ffbuild
parent571e8ca2ddb90a05e0e0091110f8aeed78620edd (diff)
downloadffmpeg-9a840ffa176038d44e0197283590f891b2cf9eeb.tar.gz
avutil: [loongarch] Add support for loongarch SIMD.
LSX and LASX is loongarch SIMD extention. They are enabled by default if compiler support it, and can be disabled with '--disable-lsx' '--disable-lasx'. Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffbuild')
-rw-r--r--ffbuild/arch.mak4
-rw-r--r--ffbuild/common.mak8
2 files changed, 11 insertions, 1 deletions
diff --git a/ffbuild/arch.mak b/ffbuild/arch.mak
index e09006efca..997e31e85e 100644
--- a/ffbuild/arch.mak
+++ b/ffbuild/arch.mak
@@ -8,7 +8,9 @@ OBJS-$(HAVE_MIPSFPU) += $(MIPSFPU-OBJS) $(MIPSFPU-OBJS-yes)
OBJS-$(HAVE_MIPSDSP) += $(MIPSDSP-OBJS) $(MIPSDSP-OBJS-yes)
OBJS-$(HAVE_MIPSDSPR2) += $(MIPSDSPR2-OBJS) $(MIPSDSPR2-OBJS-yes)
OBJS-$(HAVE_MSA) += $(MSA-OBJS) $(MSA-OBJS-yes)
-OBJS-$(HAVE_MMI) += $(MMI-OBJS) $(MMI-OBJS-yes)
+OBJS-$(HAVE_MMI) += $(MMI-OBJS) $(MMI-OBJS-yes)
+OBJS-$(HAVE_LSX) += $(LSX-OBJS) $(LSX-OBJS-yes)
+OBJS-$(HAVE_LASX) += $(LASX-OBJS) $(LASX-OBJS-yes)
OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS) $(ALTIVEC-OBJS-yes)
OBJS-$(HAVE_VSX) += $(VSX-OBJS) $(VSX-OBJS-yes)
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 268ae61154..0eb831d434 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -59,6 +59,8 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
COMPILE_NVCC = $(call COMPILE,NVCC)
COMPILE_MMI = $(call COMPILE,CC,MMIFLAGS)
COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
+COMPILE_LSX = $(call COMPILE,CC,LSXFLAGS)
+COMPILE_LASX = $(call COMPILE,CC,LASXFLAGS)
%_mmi.o: %_mmi.c
$(COMPILE_MMI)
@@ -66,6 +68,12 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
%_msa.o: %_msa.c
$(COMPILE_MSA)
+%_lsx.o: %_lsx.c
+ $(COMPILE_LSX)
+
+%_lasx.o: %_lasx.c
+ $(COMPILE_LASX)
+
%.o: %.c
$(COMPILE_C)