Commit 2363e18b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Contribs: FFmpeg options cleanup

parent 6ca901ec
...@@ -373,6 +373,9 @@ case "$DISTRO" in ...@@ -373,6 +373,9 @@ case "$DISTRO" in
add_makefile_cfg "ANDROID_NDK = ${ANDROID_NDK}" add_makefile_cfg "ANDROID_NDK = ${ANDROID_NDK}"
add_makefile_cfg "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}" add_makefile_cfg "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
add_enabled_makefile_cfg "HAVE_LINUX" add_enabled_makefile_cfg "HAVE_LINUX"
if test -z "$NO_NEON"; then
add_enabled_makefile_cfg "HAVE_NEON"
fi
esac esac
# Save passed flags # Save passed flags
......
...@@ -940,50 +940,52 @@ CLEAN_PKG += libamrwb ...@@ -940,50 +940,52 @@ CLEAN_PKG += libamrwb
DISTCLEAN_PKG += amrwb-$(LIBAMR_WB_VERSION).tar.bz2 DISTCLEAN_PKG += amrwb-$(LIBAMR_WB_VERSION).tar.bz2
# *************************************************************************** # ***************************************************************************
# ffmpeg # ffmpeg
# *************************************************************************** # ***************************************************************************
FFMPEGCONF=--disable-doc --disable-decoder=libvpx #Common configuration
FFMPEGCONF = --disable-doc \
--disable-decoder=libvpx \
--disable-debug \
--enable-gpl \
--enable-postproc \
--disable-ffprobe \
--disable-ffserver \
--disable-ffmpeg \
--disable-ffplay \
--disable-devices \
--disable-protocols \
--disable-avfilter \
--disable-network
FFMPEGCONFSMALL = --disable-encoders --disable-muxers
#Cross-Compilation
ifdef HAVE_CROSS_COMPILE ifdef HAVE_CROSS_COMPILE
FFMPEGCONF += --enable-cross-compile FFMPEGCONF += --enable-cross-compile
endif endif
ifdef HAVE_CROSS_COMPILE_NEEDS_CROSS_PREFIX ifdef HAVE_CROSS_COMPILE_NEEDS_CROSS_PREFIX
ifndef HAVE_ANDROID ifndef HAVE_ANDROID
ifndef HAVE_SYMBIAN ifndef HAVE_SYMBIAN
FFMPEGCONF += --cross-prefix=$(HOST)- FFMPEGCONF += --cross-prefix=$(HOST)-
else else
FFMPEGCONF += --cross-prefix=arm-none-symbianelf- --arch=armv6 --disable-asm FFMPEGCONF += --cross-prefix=arm-none-symbianelf- --arch=armv6 --disable-asm --target-os=none
FFMPEGCONF += $(FFMPEGCONFSMALL)
endif endif
else else
FFMPEGCONF += --cross-prefix=arm-linux-androideabi- --arch=armv4l FFMPEGCONF += --cross-prefix=arm-linux-androideabi- --arch=armv4l
FFMPEGCONF += $(FFMPEGCONFSMALL)
endif endif
endif endif
ifdef CC
FFMPEGCONF += --cc="$(CC)"
endif
# #
# Special target-dependant options # Special target-dependant options
# #
ifdef HAVE_WINCE
FFMPEGCONF+= --target-os=mingw32ce --arch=armv4l --cpu=armv4t \
--disable-encoders --disable-muxers --disable-mpegaudio-hp \
--disable-decoder=snow --disable-decoder=vc9 \
--disable-decoder=wmv3 --disable-decoder=vorbis \
--disable-decoder=dvdsub --disable-decoder=dvbsub \
--disable-protocols
endif
ifdef HAVE_UCLIBC
ifdef HAVE_BIGENDIAN
FFMPEGCONF+= --arch=armeb --enable-armv5te --enable-iwmmxt
else
FFMPEGCONF+= --arch=armv4l
endif
FFMPEGCONF+= --enable-small --disable-mpegaudio-hp
FFMPEG_CFLAGS += -DHAVE_LRINTF --std=c99
endif
ifndef HAVE_UCLIBC ifndef HAVE_UCLIBC
ifndef HAVE_WINCE ifndef HAVE_WINCE
ifndef HAVE_IOS ifndef HAVE_IOS
...@@ -994,10 +996,7 @@ endif ...@@ -994,10 +996,7 @@ endif
endif endif
endif endif
ifdef CC # MacOS X
FFMPEGCONF += --cc="$(CC)"
endif
ifdef HAVE_MACOSX_ON_INTEL ifdef HAVE_MACOSX_ON_INTEL
FFMPEGCONF += --enable-memalign-hack FFMPEGCONF += --enable-memalign-hack
endif endif
...@@ -1030,17 +1029,9 @@ FFMPEGCONF += --disable-mmx ...@@ -1030,17 +1029,9 @@ FFMPEGCONF += --disable-mmx
endif endif
endif #IOS endif #IOS
ifdef HAVE_AMR # Linux
FFMPEGCONF+= --enable-libamr-nb --enable-libamr-wb --enable-nonfree
endif
ifdef HAVE_LINUX ifdef HAVE_LINUX
FFMPEGCONF += --target-os=linux FFMPEGCONF += --target-os=linux --enable-pic
FFMPEGCONF += --enable-pic
endif
ifdef HAVE_SYMBIAN
FFMPEGCONF += --target-os=none
endif endif
ifdef HAVE_MAEMO ifdef HAVE_MAEMO
...@@ -1049,11 +1040,25 @@ FFMPEGCONF += --disable-runtime-cpudetect --enable-neon --cpu=cortex-a8 ...@@ -1049,11 +1040,25 @@ FFMPEGCONF += --disable-runtime-cpudetect --enable-neon --cpu=cortex-a8
endif endif
endif endif
ifdef HAVE_ANDROID
FFMPEGCONF+= --disable-encoders --disable-muxers
endif
ifdef HAVE_UCLIBC
ifdef HAVE_BIGENDIAN
FFMPEGCONF+= --arch=armeb --enable-armv5te --enable-iwmmxt
else
FFMPEGCONF+= --arch=armv4l
endif
FFMPEGCONF+= --enable-small --disable-mpegaudio-hp
FFMPEG_CFLAGS += -DHAVE_LRINTF --std=c99
endif
# Win32
ifdef HAVE_WIN32 ifdef HAVE_WIN32
FFMPEGCONF+= --target-os=mingw32 --arch=x86 --enable-memalign-hack FFMPEGCONF+= --target-os=mingw32 --arch=x86 --enable-memalign-hack
FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis \ FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis \
--enable-libmp3lame --enable-w32threads --disable-bsfs --enable-libmp3lame --enable-w32threads --disable-bsfs
ifdef HAVE_WIN64 ifdef HAVE_WIN64
FFMPEGCONF += --disable-dxva2 FFMPEGCONF += --disable-dxva2
FFMPEGCONF+= --cpu=athlon64 --arch=x86_64 FFMPEGCONF+= --cpu=athlon64 --arch=x86_64
...@@ -1063,6 +1068,15 @@ FFMPEGCONF+= --cpu=i686 ...@@ -1063,6 +1068,15 @@ FFMPEGCONF+= --cpu=i686
endif endif
endif endif
# WinCE
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
FFMPEGCONF += $(FFMPEGCONFSMALL)
endif
ifndef HAVE_WIN32 ifndef HAVE_WIN32
FFMPEGCONF += --enable-pthreads FFMPEGCONF += --enable-pthreads
FFMPEG_CFLAGS += --std=gnu99 FFMPEG_CFLAGS += --std=gnu99
...@@ -1098,19 +1112,6 @@ ffmpeg/.untar: ffmpeg-$(FFMPEG_VERSION).tar.gz ...@@ -1098,19 +1112,6 @@ ffmpeg/.untar: ffmpeg-$(FFMPEG_VERSION).tar.gz
$(EXTRACT_GZ) $(EXTRACT_GZ)
touch $@ touch $@
FFMPEGCONF += \
--disable-debug \
--enable-gpl \
--enable-postproc \
--disable-ffprobe \
--disable-ffserver \
--disable-ffmpeg \
--disable-ffplay \
--disable-devices \
--disable-protocols \
--disable-avfilter \
--disable-network
ifeq ($(ARCH),armel) ifeq ($(ARCH),armel)
HAVE_ARMELF=1 HAVE_ARMELF=1
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment