* [Buildroot] [PATCH] ffmpeg: make ARM optimizations explicit
@ 2012-12-21 12:40 Gustavo Zacarias
2012-12-21 12:57 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Zacarias @ 2012-12-21 12:40 UTC (permalink / raw)
To: buildroot
The ffmpeg configure script tries to autodetermine ARM optimizations by
building a small code snippet with AS.
If AS allows higher-level (>generic) assembly instructions then it
passes and enables the relevant optimization path.
Some toolchains allow/default to more than generic asm and then fail
when the real code is built.
Fixes:
http://autobuild.buildroot.net/results/b6e1225a07a58cc7544e37bc55675be71e2b5088/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/multimedia/ffmpeg/ffmpeg.mk | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index 90c1f1b..b018ea0 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -133,19 +133,26 @@ FFMPEG_DEPENDENCIES += host-nasm
endif
endif
-# ARM defaults to v5: clear if less, add extra if more
+# Explicitly disable everything that doesn't match for ARM
+# FFMPEG "autodetects" by compiling an extended instruction via AS
+# This works on compilers that aren't built for generic by default
ifeq ($(BR2_generic_arm)$(BR2_arm7tdmi)$(BR2_arm610)$(BR2_arm710)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t),y)
FFMPEG_CONF_OPT += --disable-armv5te
endif
ifeq ($(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf-s),y)
FFMPEG_CONF_OPT += --enable-armv6
+else
+FFMPEG_CONF_OPT += --disable-armv6 --disable-armv6t2
endif
-ifeq ($(BR2_arm10)$(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf-s)$(BR2_cortex_a8)$(BR2_cortex_a9),y)
+ifeq ($(BR2_arm10)$(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf-s)$(BR2_cortex_a5)$(BR2_cortex_a8)$(BR2_cortex_a9)$(BR2_cortex_a15),y)
FFMPEG_CONF_OPT += --enable-armvfp
+else
+FFMPEG_CONF_OPT += --disable-armvfp
endif
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
FFMPEG_CONF_OPT += --enable-neon
endif
+
# Set powerpc altivec appropriately
ifeq ($(BR2_powerpc),y)
ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
--
1.7.8.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] ffmpeg: make ARM optimizations explicit
2012-12-21 12:40 [Buildroot] [PATCH] ffmpeg: make ARM optimizations explicit Gustavo Zacarias
@ 2012-12-21 12:57 ` Peter Korsgaard
2012-12-21 13:03 ` Gustavo Zacarias
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2012-12-21 12:57 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
Gustavo> The ffmpeg configure script tries to autodetermine ARM optimizations by
Gustavo> building a small code snippet with AS.
Gustavo> If AS allows higher-level (>generic) assembly instructions then it
Gustavo> passes and enables the relevant optimization path.
Gustavo> Some toolchains allow/default to more than generic asm and then fail
Gustavo> when the real code is built.
Gustavo> Fixes:
Gustavo> http://autobuild.buildroot.net/results/b6e1225a07a58cc7544e37bc55675be71e2b5088/
Committed, thanks.
It would be good to add some BR2_ARM_HAS_ARMVx config options so we
don't need these written out checks in the packages which care.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] ffmpeg: make ARM optimizations explicit
2012-12-21 12:57 ` Peter Korsgaard
@ 2012-12-21 13:03 ` Gustavo Zacarias
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2012-12-21 13:03 UTC (permalink / raw)
To: buildroot
On 12/21/2012 09:57 AM, Peter Korsgaard wrote:
> Committed, thanks.
>
> It would be good to add some BR2_ARM_HAS_ARMVx config options so we
> don't need these written out checks in the packages which care.
Yes, it would be good to have an additional BR2_ARM_CPU_HAS_VFP also
since it's optional for some cores, like NEON.
I haven't seen A9's without VFP, it doesn't mean there aren't.
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-21 13:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 12:40 [Buildroot] [PATCH] ffmpeg: make ARM optimizations explicit Gustavo Zacarias
2012-12-21 12:57 ` Peter Korsgaard
2012-12-21 13:03 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox