--disable-static do not build static libraries [no]
--enable-shared build shared libraries [no]
--enable-small optimize for size instead of speed
- --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
+ --disable-runtime-cpudetect disable detecting cpu capabilities at runtime (smaller binary)
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
disable buffer boundary checking in bitreaders
(faster, but may crash)
--enable-memalign-hack emulate memalign, interferes with memory debuggers
+ --enable-lto use link-time optimization
Optimization options (experts only):
--disable-asm disable all assembler optimizations
--valgrind=VALGRIND run "make fate" tests through valgrind to detect memory
leaks and errors, using the specified valgrind binary.
Cannot be combined with --target-exec
+ --enable-ftrapv Trap arithmetic overflows
--samples=PATH location of test samples for FATE, if not set use
\$FATE_SAMPLES at make invocation time.
--enable-xmm-clobber-test check XMM registers for clobbering (Win64-only;
fft
fontconfig
frei0r
+ ftrapv
gnutls
gpl
gray
mipsdspr2
"
+HAVE_LIST_CMDLINE='
+ inline_asm
+ symver
+ yasm
+'
+
HAVE_LIST_PUB='
bigendian
fast_unaligned
$ARCH_EXT_LIST
$(add_suffix _external $ARCH_EXT_LIST)
$(add_suffix _inline $ARCH_EXT_LIST)
+ $HAVE_LIST_CMDLINE
$HAVE_LIST_PUB
$THREADS_LIST
aligned_malloc
asm_types_h
attribute_may_alias
attribute_packed
+ broken_snprintf
cbrtf
clock_gettime
closesocket
cmov
- cpuid
cpunop
dcbzl
dev_bktr_ioctl_bt848_h
gnu_as
ibm_asm
inet_aton
- inline_asm
io_h
isatty
isinf
rint
round
roundf
- rweflags
sched_getaffinity
sdl
sdl_video_size
struct_sockaddr_sa_len
struct_sockaddr_storage
struct_v4l2_frmivalenum_discrete
- symver
symver_asm_label
symver_gnu_asm
sysconf
windows_h
winsock2_h
xform_asm
- xgetbv
xmm_clobbers
- yasm
"
# options emitted with CONFIG_ prefix but not available on command line
huffman
lgplv3
lpc
+ mpegaudio
mpegaudiodsp
mpegvideo
mpegvideoenc
CMDLINE_SELECT="
$ARCH_EXT_LIST
$CONFIG_LIST
+ $HAVE_LIST_CMDLINE
$THREADS_LIST
asm
coverage
cross_compile
debug
extra_warnings
- inline_asm
logging
+ lto
optimizations
stripping
- symver
- yasm
"
PATHS_LIST='
dct_select="rdft"
mdct_select="fft"
rdft_select="fft"
+mpegaudio_select="mpegaudiodsp"
mpegaudiodsp_select="dct"
mpegvideoenc_select="mpegvideo"
mdec_decoder_select="error_resilience mpegvideo"
mjpeg_encoder_select="aandcttables mpegvideoenc"
mlp_decoder_select="mlp_parser"
-mp1_decoder_select="mpegaudiodsp"
-mp1float_decoder_select="mpegaudiodsp"
-mp2_decoder_select="mpegaudiodsp"
-mp2float_decoder_select="mpegaudiodsp"
-mp3_decoder_select="mpegaudiodsp"
-mp3adu_decoder_select="mpegaudiodsp"
-mp3adufloat_decoder_select="mpegaudiodsp"
-mp3float_decoder_select="mpegaudiodsp"
-mp3on4_decoder_select="mpegaudiodsp"
-mp3on4float_decoder_select="mpegaudiodsp"
+mp1_decoder_select="mpegaudio"
+mp1float_decoder_select="mpegaudio"
+mp2_decoder_select="mpegaudio"
+mp2float_decoder_select="mpegaudio"
+mp3_decoder_select="mpegaudio"
+mp3adu_decoder_select="mpegaudio"
+mp3adufloat_decoder_select="mpegaudio"
+mp3float_decoder_select="mpegaudio"
+mp3on4_decoder_select="mpegaudio"
+mp3on4float_decoder_select="mpegaudio"
mpc7_decoder_select="mpegaudiodsp"
mpc8_decoder_select="mpegaudiodsp"
mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder"
libopenjpeg_decoder_deps="libopenjpeg"
libopenjpeg_encoder_deps="libopenjpeg"
libopus_decoder_deps="libopus"
+libopus_encoder_deps="libopus"
libschroedinger_decoder_deps="libschroedinger"
libschroedinger_encoder_deps="libschroedinger"
libspeex_decoder_deps="libspeex"
asf_stream_muxer_select="asf_muxer"
avisynth_demuxer_deps="avisynth"
dirac_demuxer_select="dirac_parser"
+dts_demuxer_select="dca_parser"
+dtshd_demuxer_select="dca_parser"
eac3_demuxer_select="ac3_parser"
f4v_muxer_select="mov_muxer"
flac_demuxer_select="flac_parser"
sdp_demuxer_select="rtpdec"
smoothstreaming_muxer_select="ismv_muxer"
spdif_muxer_select="aac_parser"
+tak_demuxer_select="tak_parser"
tg2_muxer_select="mov_muxer"
tgp_muxer_select="mov_muxer"
w64_demuxer_deps="wav_demuxer"
delogo_filter_deps="gpl"
deshake_filter_deps="avcodec"
drawtext_filter_deps="libfreetype"
+ebur128_filter_deps="gpl"
flite_filter_deps="libflite"
frei0r_filter_deps="frei0r dlopen"
frei0r_filter_extralibs='$ldl'
removelogo_filter_deps="avcodec avformat swscale"
scale_filter_deps="swscale"
smartblur_filter_deps="gpl swscale"
-showspectrum_filter_deps="avcodec"
+showspectrum_filter_deps="avcodec rdft"
super2xsai_filter_deps="gpl"
tinterlace_filter_deps="gpl"
yadif_filter_deps="gpl"
+pixfmts_super2xsai_test_deps="super2xsai_filter"
+tinterlace_merge_test_deps="tinterlace_filter"
+tinterlace_pad_test_deps="tinterlace_filter"
# libraries
avdevice_deps="avcodec avformat"
# tests
colormatrix1_test_deps="colormatrix_filter"
colormatrix2_test_deps="colormatrix_filter"
-flashsv2_test_deps="zlib"
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
-mpng_test_deps="zlib"
+png_test_deps="zlib"
pp_test_deps="mp_filter"
pp2_test_deps="mp_filter"
pp3_test_deps="mp_filter"
pp4_test_deps="mp_filter"
pp5_test_deps="mp_filter"
pp6_test_deps="mp_filter"
+seek_flashsv_flv_test_deps="zlib"
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
-zlib_test_deps="zlib"
-zmbv_test_deps="zlib"
test_deps(){
suf1=$1
enable doc
enable network
enable optimizations
+enable runtime_cpudetect
enable safe_bitstream_reader
enable static
enable swscale_alpha
-fno-common) ;;
-fno-signed-zeros) ;;
-lz) echo zlib.lib ;;
+ -lavifil32) echo vfw32.lib ;;
+ -lavicap32) echo vfw32.lib user32.lib ;;
-l*) echo ${flag#-l}.lib ;;
*) echo $flag ;;
esac
"defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW runtime version must be >= 3.15."
+ if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \
+ __MINGW64_VERSION_MAJOR < 3"; then
+ enable broken_snprintf
+ add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
+ fi
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
libc_type=newlib
elif check_func_headers stdlib.h _get_doserrno; then
libc_type=msvcrt
+ enable broken_snprintf
add_cflags -Dstrtod=avpriv_strtod
add_cflags -Dsnprintf=avpriv_snprintf \
-D_snprintf=avpriv_snprintf \
elif enabled x86; then
- check_code ld immintrin.h "return __xgetbv(0)" "cc" && enable xgetbv
- check_code ld intrin.h "int info[4]; __cpuid(info, 0)" "cc" && enable cpuid
check_code ld intrin.h "__rdtsc()" "cc" && enable rdtsc
- check_code ld intrin.h "unsigned int x = __readeflags()" "cc" && enable rweflags
check_code ld mmintrin.h "_mm_empty()" "cc" && enable mm_empty
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
# check for VDA header
-if ! disabled vda; then
+if ! disabled vda && ! enabled ppc; then
if check_header VideoDecodeAcceleration/VDADecoder.h; then
enable vda
add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
enabled libass && require_pkg_config libass ass/ass.h ass_library_init
enabled libbluray && require libbluray libbluray/bluray.h bd_open -lbluray
+enabled libcdio && require2 libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open "-lcdio_paranoia -lcdio_cdda -lcdio"
enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
{ check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
-enabled libcdio &&
- check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open "-lcdio_paranoia -lcdio_cdda -lcdio"
-
enabled x11grab &&
require X11 X11/Xlib.h XOpenDisplay -lX11 &&
require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
EOF
fi
-if [ -n "$optflags" ]; then
- add_cflags $optflags
-elif enabled small; then
- add_cflags $cflags_size
-elif enabled optimizations; then
- add_cflags $cflags_speed
-else
- add_cflags $cflags_noopt
+if [ -z "$optflags" ]; then
+ if enabled small; then
+ optflags=$cflags_size
+ elif enabled optimizations; then
+ optflags=$cflags_speed
+ else
+ optflags=$cflags_noopt
+ fi
+fi
+
+check_optflags(){
+ check_cflags "$@"
+ enabled lto && check_ldflags "$@"
+}
+
+
+if enabled lto; then
+ test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker"
+ check_cflags -flto
+ check_ldflags -flto $cpuflags
fi
-check_cflags -fno-math-errno
-check_cflags -fno-signed-zeros
+
+check_optflags $optflags
+check_optflags -fno-math-errno
+check_optflags -fno-signed-zeros
+
+enabled ftrapv && check_cflags -ftrapv
+
check_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
int x;
EOF
add_cflags -msg_disable ptrmismatch1
add_cflags -msg_disable unreachcode
elif enabled gcc; then
- check_cflags -fno-tree-vectorize
+ check_optflags -fno-tree-vectorize
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
+ check_cflags -Werror=vla
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
elif enabled clang; then
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
}
-get_version_old LIBPOSTPROC libpostproc/postprocess.h
-get_version_old LIBSWRESAMPLE libswresample/swresample.h
+get_version_old LIBPOSTPROC libpostproc/version.h
get_version libavcodec
get_version libavdevice
get_version libavformat
get_version libavresample
get_version libavutil
+get_version libswresample
get_version libswscale
cat > $TMPH <<EOF