Skip to contentSkip to conversation

ffmpeg: disable MIPS DSP options by default

PATCH New Vicente Olivert Riera 2 participants 2 messages Oct 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ffmpeg: disable MIPS DSP options by default

DSP support depends on the core implementation, not on the ISA, so enabling it for mips64r2 is not correct since you can build a mips64r2 core without DSP support.

Disable mipsdspr1 and mipsdspr2 options by default and let the user enable them via the BR2_PACKAGE_FFMPEG_EXTRACONF kconfig option, which will take preference and override the default values.

---
 package/ffmpeg/ffmpeg.mk |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
package/ffmpeg/ffmpeg.mk +2 -10
index f817471..87415f3 100644
@@ -41,6 +41,8 @@ FFMPEG_CONF_OPTS = \
 	--enable-runtime-cpudetect \
 	--disable-hardcoded-tables \
 	--disable-memalign-hack \
+	--disable-mipsdspr1 \
+	--disable-mipsdspr2 \
 	--disable-msa \
 	--enable-hwaccels \
 	--disable-avisynth \
@@ -355,16 +357,6 @@ FFMPEG_CONF_OPTS += \
 	--disable-mips32r2
 endif
 
-ifeq ($(BR2_mips_64r2),y)
-FFMPEG_CONF_OPTS += \
-	--enable-mipsdspr1 \
-	--enable-mipsdspr2
-else
-FFMPEG_CONF_OPTS += \
-	--disable-mipsdspr1 \
-	--disable-mipsdspr2
-endif
-
 ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
 FFMPEG_CONF_OPTS += --enable-altivec
 else
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ffmpeg: disable MIPS DSP options by default

Dear Vicente Olivert Riera,

Quoted 4 lines · Vicente Olivert Riera

DSP support depends on the core implementation, not on the ISA, so enabling it for mips64r2 is not correct since you can build a mips64r2 core without DSP support.

Quoted 8 lines

Disable mipsdspr1 and mipsdspr2 options by default and let the user enable them via the BR2_PACKAGE_FFMPEG_EXTRACONF kconfig option, which will take preference and override the default values.

---
 package/ffmpeg/ffmpeg.mk |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

Applied, thanks. As Gustavo suggested, it might be worth adding a Config.in option in arch/Config.in.mips to allow the usage of the DSP instructions (of course, if such instructions are in practice used by ffmpeg, and available on a useful selection of MIPS SoCs).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com