FFMPEGCONF = \
--cc="$(CC)" \
--disable-doc \
- --disable-decoder=libvpx \
--disable-decoder=bink \
--enable-libgsm \
--enable-libopenjpeg \
# Optional dependencies
ifdef BUILD_ENCODERS
-FFMPEGCONF += --enable-libmp3lame --enable-libvpx
+FFMPEGCONF += --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
DEPS_ffmpeg += lame $(DEPS_lame) vpx $(DEPS_vpx)
else
FFMPEGCONF += --disable-encoders --disable-muxers
ifdef ENABLE_SMALL
FFMPEGCONF += --enable-small --optflags=-O2
ifeq ($(ARCH),arm)
-ifdef HAVE_NEON
-# XXX: assumes CPU >= cortex-a8, and thus thumb2 able
+ifdef HAVE_ARMV7A
+# XXX: assumes > ARMv7-A, and thus thumb2-able
FFMPEGCONF += --enable-thumb
endif
endif
endif
-# XXX: REVISIT
-#ifndef HAVE_FPU
-#FFMPEGCONF += --disable-mpegaudio-hp
-#endif
-
ifdef HAVE_CROSS_COMPILE
FFMPEGCONF += --enable-cross-compile
ifndef HAVE_IOS
# ARM stuff
ifeq ($(ARCH),arm)
-FFMPEGCONF += --disable-runtime-cpudetect --arch=arm
+FFMPEGCONF += --arch=arm
ifdef HAVE_NEON
FFMPEGCONF += --cpu=cortex-a8 --enable-neon
-FFMPEG_CFLAGS +=-mfloat-abi=softfp -mfpu=neon
+FFMPEG_CFLAGS += -mfpu=neon
endif
endif
endif
ifdef HAVE_IOS
FFMPEGCONF += --enable-pic --as="$(AS)" --disable-decoder=snow
-ifeq ($(ARCH), arm)
-FFMPEGCONF += --cpu=cortex-a8
-endif
endif
# Linux
ifdef HAVE_LINUX
FFMPEGCONF += --target-os=linux --enable-pic
+
+ifeq ($(ANDROID_ABI), x86)
+ifdef HAVE_ANDROID
+# Android-x86 gcc doesn't guarantee an aligned stack, but this is
+# handled by __attribute__((force_align_arg_pointer)) in libavcodec
+# already, so we tell gcc to assume this alignment, so we don't need
+# to waste a precious register in assembly functions to realign it.
+FFMPEG_CFLAGS += -mincoming-stack-boundary=4
+endif # HAVE_ANDROID
+endif # x86
+
endif
# Windows
FFMPEGCONF += --enable-pthreads
endif
-ifdef HAVE_WINCE
-FFMPEGCONF += --target-os=mingw32ce --arch=armv4l --cpu=armv4t \
- --disable-decoder=snow --disable-decoder=vc9 \
- --disable-decoder=wmv3 --disable-decoder=vorbis \
- --disable-decoder=dvdsub --disable-decoder=dvbsub
-endif
-
-FFMPEG_CFLAGS += --std=gnu99
-
# Build
PKGS += ffmpeg
rm -Rf $@ $@-git
mkdir -p $@-git
$(ZCAT) "$<" | (cd $@-git && tar xv --strip-components=1)
-ifdef HAVE_WIN32
- sed -i "s/std=c99/std=gnu99/" $@-$(FFMPEG_VERSION)/configure
-endif
$(MOVE)
.ffmpeg: ffmpeg
cd $< && $(HOSTVARS) ./configure \
- --extra-cflags="$(FFMPEG_CFLAGS) -DHAVE_STDINT_H" \
--extra-ldflags="$(LDFLAGS)" $(FFMPEGCONF) \
--prefix="$(PREFIX)" --enable-static --disable-shared
cd $< && $(MAKE) install-libs install-headers