echo " --disable-golomb disable Golomb code"
echo " --disable-mdct disable MDCT code"
echo " --disable-rdft disable RDFT code"
+ echo " --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)"
echo " --enable-hardcoded-tables use hardcoded tables instead of runtime generation"
echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
echo " --enable-beos-netserver enable BeOS netserver"
echo " --disable-decoder=NAME disable decoder NAME"
echo " --enable-decoder=NAME enable decoder NAME"
echo " --disable-decoders disable all decoders"
+ echo " --disable-hwaccel=NAME disable hwaccel NAME"
+ echo " --enable-hwaccel=NAME enable hwaccel NAME"
+ echo " --disable-hwaccels disable all hwaccels"
echo " --disable-muxer=NAME disable muxer NAME"
echo " --enable-muxer=NAME enable muxer NAME"
echo " --disable-muxers disable all muxers"
echo " --disable-filters disable all filters"
echo " --list-decoders show all available decoders"
echo " --list-encoders show all available encoders"
+ echo " --list-hwaccels show all available hardware accelerators"
echo " --list-muxers show all available muxers"
echo " --list-demuxers show all available demuxers"
echo " --list-parsers show all available parsers"
die(){
echolog "$@"
cat <<EOF
+
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
demuxers
encoders
filters
+ hwaccels
indevs
muxers
outdevs
postproc
powerpc_perf
rdft
+ runtime_cpudetect
shared
small
static
ia64
m68k
mips
+ mips64
parisc
ppc
+ ppc64
s390
sh4
sparc
alsa_asoundlib_h
altivec_h
arpa_inet_h
+ bigendian
bswap
closesocket
cmov
getrusage
inet_aton
inline_asm
+ ldbrx
libdc1394_1
libdc1394_2
llrint
+ loongson
lrint
lrintf
+ lzo1x_999_compress
machine_ioctl_bt848_h
machine_ioctl_meteor_h
malloc_h
mkstemp
pld
posix_memalign
- ppc64
round
roundf
sdl
truncf
VirtualAlloc
winsock2_h
+ xform_asm
yasm
"
ssse3_deps="sse"
vis_deps="sparc"
-# decoders / encoders
+# decoders / encoders / hardware accelerators
aac_decoder_select="fft mdct"
-ac3_decoder_deps="gpl"
ac3_decoder_select="fft mdct"
atrac3_decoder_select="fft mdct"
cavs_decoder_select="golomb"
dca_decoder_select="fft mdct"
dnxhd_encoder_select="aandct"
dxa_decoder_select="zlib"
-eac3_decoder_deps="gpl"
eac3_decoder_select="fft mdct"
eatgq_decoder_select="aandct"
eatqi_decoder_select="aandct"
flv_encoder_select="aandct"
h261_encoder_select="aandct"
h263_encoder_select="aandct"
+h263_vaapi_hwaccel_deps="va_va_h"
h263p_encoder_select="aandct"
h264_decoder_select="golomb"
+h264_vaapi_hwaccel_deps="va_va_h"
h264_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
imc_decoder_select="fft mdct"
jpegls_decoder_select="golomb"
mpeg4_encoder_select="aandct"
mpeg_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
mpeg1_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
+mpeg2_vaapi_hwaccel_deps="va_va_h"
+mpeg4_vaapi_hwaccel_deps="va_va_h"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
msmpeg4v1_encoder_select="aandct"
msmpeg4v2_encoder_select="aandct"
tiff_decoder_suggest="zlib"
tiff_encoder_suggest="zlib"
tscc_decoder_select="zlib"
+vc1_vaapi_hwaccel_deps="va_va_h"
vc1_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
vorbis_decoder_select="fft mdct"
vorbis_encoder_select="fft mdct"
wmav2_encoder_select="fft mdct"
wmv1_encoder_select="aandct"
wmv2_encoder_select="aandct"
+wmv3_vaapi_hwaccel_deps="va_va_h"
wmv3_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
zlib_decoder_select="zlib"
zlib_encoder_select="zlib"
bktr_demuxer_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
dirac_demuxer_deps="dirac_parser"
dv1394_demuxer_deps="dv1394 dv_demuxer"
+jack_demuxer_deps="jack_jack_h"
+jack_demuxer_extralibs="-ljack"
libdc1394_demuxer_deps="libdc1394"
libnut_demuxer_deps="libnut"
libnut_muxer_deps="libnut"
die "Out of tree builds are impossible with config.h in source dir."
fi
-FFMPEG_CONFIGURATION="$@"
+for v in "$@"; do
+ r="${v#*=}"
+ l="${v%$r}"
+ test "$r" = "${r#* }" || r="'$r'"
+ FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
+done
find_things(){
thing=$1
ENCODER_LIST=$(find_things encoder ENC libavcodec/allcodecs.c)
DECODER_LIST=$(find_things decoder DEC libavcodec/allcodecs.c)
+HWACCEL_LIST=$(find_things hwaccel HWACCEL libavcodec/allcodecs.c)
PARSER_LIST=$(find_things parser PARSER libavcodec/allcodecs.c)
BSF_LIST=$(find_things bsf BSF libavcodec/allcodecs.c)
MUXER_LIST=$(find_things muxer _MUX libavformat/allformats.c)
enable $ARCH_EXT_LIST \
$DECODER_LIST \
$ENCODER_LIST \
+ $HWACCEL_LIST \
$PARSER_LIST \
$BSF_LIST \
$DEMUXER_LIST \
--enable-*=*|--disable-*=*)
eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
case "$thing" in
- encoder|decoder|muxer|demuxer|parser|bsf|protocol|filter) $action ${optval}_${thing} ;;
+ encoder|decoder|hwaccel|muxer|demuxer|parser|bsf|protocol|filter) $action ${optval}_${thing} ;;
*) die_unknown "$opt" ;;
esac
;;
disabled logging && logfile=/dev/null
-echo "# $0 $@" > $logfile
+echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
set >> $logfile
test -n "$cross_prefix" && enable cross_compile
;;
mips64)
arch="mips"
+ subarch="mips64"
enable fast_64bit
;;
parisc|hppa)
;;
ppc64)
arch="ppc"
+ subarch="ppc64"
enable fast_64bit
enable fast_unaligned
;;
SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"'
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
- SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
+ SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
objformat="win32"
enable dos_paths
+ check_cflags -fno-common
if ! enabled x86_64; then
check_cpp_condition _mingw.h "(__MINGW32_MAJOR_VERSION > 3) || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW runtime version must be >= 3.15."
SHFLAGS='-shared -Wl,--enable-auto-image-base'
objformat="win32"
enable dos_paths
+ check_cflags -fno-common
;;
*-dos|freedos|opendos)
disable ffplay ffserver
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
enable dos_paths
;;
+ gnu/kfreebsd)
+ ;;
+ gnu)
+ ;;
*)
die "Unknown OS '$target_os'."
fi
-if ! enabled gpl; then
- die_gpl_disabled(){
- name=$1
- shift
- enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
- }
- die_gpl_disabled "The Postprocessing code" postproc
- die_gpl_disabled "libx264" libx264
- die_gpl_disabled "libxvidcore" libxvid
- die_gpl_disabled "FAAD2" libfaad2
- die_gpl_disabled "The X11 grabber" x11grab
-fi
+die_license_disabled() {
+ enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
+}
+
+die_license_disabled gpl libfaad2
+die_license_disabled gpl libx264
+die_license_disabled gpl libxvid
+die_license_disabled gpl postproc
+die_license_disabled gpl x11grab
+
+die_license_disabled nonfree libamr_nb
+die_license_disabled nonfree libamr_wb
+die_license_disabled nonfree libfaac
-if ! enabled nonfree && enabled_any libamr_nb libamr_wb; then
- die "libamr is nonfree and --enable-nonfree is not specified."
-fi
check_deps $ARCH_EXT_LIST
G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
add_cflags -mcpu=970 -mpowerpc-gfxopt -mpowerpc64
warn_altivec disabled PPC970
- enable ppc64
;;
Cell|CELL|cell)
add_cflags -mcpu=cell
warn_altivec disabled Cell
- enable ppc64
+ enable ldbrx
;;
# targets that do NOT support conditional mov (cmov)
i[345]86|pentium|pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
ev4|ev45|ev5|ev56|pca56|ev6|ev67)
enabled ccc && add_cflags -arch $cpu || add_cflags -mcpu=$cpu
;;
+ bf*)
+ add_cflags -mcpu=$cpu
+ ;;
+ mips*|[45]k*|[237]4k*|m4k|r*000|loongson2[ef])
+ add_cflags -march=$cpu
+ ;;
*)
echo "WARNING: Unknown CPU \"$cpu\", ignored."
;;
# check for assembler specific support
+enabled mips && check_asm loongson '"dmult.g $1, $2, $3"'
+
enabled ppc && check_asm dcbzl '"dcbzl 0, 1"'
enabled ppc && check_asm ppc4xx '"maclhw r10, r11, r12"'
+enabled ppc && check_asm xform_asm '"lwzx 0, %y0" :: "Z"(*(int*)0)'
# check for SIMD availability
check_func mkstemp
check_func posix_memalign
check_func_headers io.h setmode
+check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_func_headers windows.h GetProcessTimes
check_func_headers windows.h VirtualAlloc
done
check_lib math.h sin -lm
+check_lib va/va.h vaInitialize -lva
# test for C99 functions in math.h
for func in llrint lrint lrintf round roundf truncf; do
# these are off by default, so fail if requested and not available
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
-enabled libamr_nb && require libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm
+enabled libamr_nb && require libamrnb amrnb/interf_dec.h Decoder_Interface_init -lamrnb -lm
enabled libamr_wb && require libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm
enabled libdirac && add_cflags $(pkg-config --cflags dirac) &&
require libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init -ldirac_decoder &&
check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
+check_lib2 jack/jack.h jack_client_open -ljack
+
# deal with the X11 frame grabber
enabled x11grab &&
check_header X11/Xlib.h &&
enabled_any $DECODER_LIST && enable decoders
enabled_any $ENCODER_LIST && enable encoders
+enabled_any $HWACCEL_LIST && enable hwaccels
enabled_any $BSF_LIST && enable bsfs
enabled_any $DEMUXER_LIST && enable demuxers
enabled_any $MUXER_LIST && enable muxers
$HAVE_LIST \
$DECODER_LIST \
$ENCODER_LIST \
+ $HWACCEL_LIST \
$PARSER_LIST \
$BSF_LIST \
$DEMUXER_LIST \
echo "version string suffix $extra_version"
fi
echo "big-endian ${bigendian-no}"
+echo "runtime cpu detection ${runtime_cpudetect-no}"
if enabled x86; then
echo "yasm ${yasm-no}"
echo "MMX enabled ${mmx-no}"
echo "bzlib enabled ${bzlib-no}"
echo
-for type in decoder encoder parser demuxer muxer protocol filter bsf indev outdev; do
+for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do
echo "Enabled ${type}s:"
eval list=\$$(toupper $type)_LIST
for part in $list; do
echo
done
-license="LGPL"
+license="LGPL version 2.1 or later"
if enabled nonfree; then
- license="unredistributable"
+ license="nonfree and unredistributable"
elif enabled gpl; then
- license="GPL"
+ license="GPL version 2 or later"
fi
echo "License: $license"
$CONFIG_EXTRA \
$DECODER_LIST \
$ENCODER_LIST \
+ $HWACCEL_LIST \
$PARSER_LIST \
$BSF_LIST \
$DEMUXER_LIST \
libavutil \
libpostproc \
libswscale \
+ libswscale/bfin \
+ libswscale/mlib \
+ libswscale/ppc \
+ libswscale/sparc \
+ libswscale/x86 \
tests \
tools \
"