Skip to content

Commit

Permalink
changed, add --enable-neon configure switch to pass into ffmpeg. defa…
Browse files Browse the repository at this point in the history
…ult to no. fixed xbmc on iOS5 where ASLR is causing kernel panics when dlopen of neon enable avcodec
  • Loading branch information
davilla committed Oct 20, 2011
1 parent 83e9b2a commit 8f95324
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions configure.in
Expand Up @@ -155,6 +155,12 @@ AC_ARG_WITH([cpu],
[use_cpu=$withval],
[use_cpu=no])

AC_ARG_ENABLE([neon],
[AS_HELP_STRING([--enable-neon],
[enable neon passing to ffmpeg (default is no)])],
[use_neon=$enableval],
[use_neon=no])

AC_ARG_ENABLE([optimizations],
[AS_HELP_STRING([--enable-optimizations],
[enable optimization (default is yes)])],
Expand Down Expand Up @@ -579,10 +585,14 @@ elif test "$use_arch" = "arm"; then
CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
use_cpu=cortex-a8])
else
# Compile for ARMv7a architecture, CortexA8 cpu and NEON coprocessor
CFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
CXXFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad"
FFMPEG_EXTRACFLAGS+=" -mfpu=neon"
# Compile for ARMv7a architecture, CortexA8 cpu and check for enabled NEON coprocessor
CFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8"
CXXFLAGS+=" -Wa,-march=armv7a -mcpu=cortex-a8"
if test "$use_neon" = "yes"; then
CFLAGS+=" -mfpu=neon -mvectorize-with-neon-quad"
CXXFLAGS+=" -mfpu=neon -mvectorize-with-neon-quad"
FFMPEG_EXTRACFLAGS+=" -mfpu=neon"
fi
fi
fi

Expand Down Expand Up @@ -1989,11 +1999,12 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
`if test "$use_arch" != "no"; then echo --enable-cross-compile; fi` \
`if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
`if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
`if test "$use_arch" = "arm"; then echo --enable-pic; fi`\
`if test "$use_neon" = "yes"; then echo --enable-neon; else echo --disable-neon; fi`\
--target-os=$(tolower $(uname -s)) \
--disable-amd3dnow \
--disable-armv5te \
--disable-armv6t2 \
`if test "$use_arch" != "yes"; then echo --enable-neon; fi`\
--disable-static \
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
--disable-muxers \
Expand Down Expand Up @@ -2034,6 +2045,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
`if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
`if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
`if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
`if test "$use_neon" = "yes"; then echo --enable-neon; else echo --disable-neon; fi`\
--target-os=$(tolower $(uname -s)) \
--disable-muxers \
--enable-muxer=spdif \
Expand Down

2 comments on commit 8f95324

@Memphiz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! (as usual ;) ). But does this impact soft decoding performance on IOS5 then?

@davilla
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now, we have no other choice... disable neon in ffmpeg or we don't run and in fact will cause kernel panics under iOS5.

Please sign in to comment.