--shlibdir=DIR install shared libs in DIR [LIBDIR]
--incdir=DIR install includes in DIR [PREFIX/include]
--mandir=DIR install man page in DIR [PREFIX/share/man]
+ --pkgconfigdir=DIR install pkg-config files in DIR [LIBDIR/pkgconfig]
--enable-rpath use rpath to allow installing libraries in paths
not part of the dynamic linker search path
use rpath when linking programs [USE WITH CARE]
--disable-pixelutils disable pixel utils in libavutil
Hardware accelerators:
+ --disable-d3d11va disable D3D11VA code [autodetect]
--disable-dxva2 disable DXVA2 code [autodetect]
--disable-vaapi disable VAAPI code [autodetect]
--disable-vda disable VDA code [autodetect]
--enable-openssl enable openssl, needed for https support
if gnutls is not used [no]
--disable-sdl disable sdl [autodetect]
+ --disable-securetransport disable Secure Transport, needed for TLS support
+ on OSX if openssl and gnutls are not used [autodetect]
--enable-x11grab enable X11 grabbing (legacy) [no]
--disable-xlib disable xlib [autodetect]
--disable-zlib disable zlib [autodetect]
Optimization options (experts only):
--disable-asm disable all assembly optimizations
--disable-altivec disable AltiVec optimizations
+ --disable-vsx disable VSX optimizations
+ --disable-power8 disable POWER8 optimizations
--disable-amd3dnow disable 3DNow! optimizations
--disable-amd3dnowext disable 3DNow! extended optimizations
--disable-mmx disable MMX optimizations
opengl
openssl
sdl
+ securetransport
x11grab
xlib
zlib
"
HWACCEL_LIST="
+ d3d11va
dxva2
vaapi
vda
mipsdspr1
mipsdspr2
msa
+"
+
+ARCH_EXT_LIST_LOONGSON="
loongson3
"
altivec
dcbzl
ldbrx
+ power8
ppc4xx
vsx
"
$ARCH_EXT_LIST_PPC
$ARCH_EXT_LIST_X86
$ARCH_EXT_LIST_MIPS
- loongson
+ $ARCH_EXT_LIST_LOONGSON
"
ARCH_FEATURES="
dev_video_meteor_ioctl_meteor_h
direct_h
dlfcn_h
+ d3d11_h
dxva_h
ES2_gl_h
gsm_h
TYPES_LIST="
CONDITION_VARIABLE_Ptr
DXVA_PicParams_HEVC
+ ID3D11VideoDecoder
socklen_t
struct_addrinfo
struct_group_source_req
$TYPES_LIST
atomics_native
dos_paths
+ d3d11_cobj
+ d3d11va_lib
dxva2api_cobj
dxva2_lib
libc_msvcrt
incdir
libdir
mandir
+ pkgconfigdir
prefix
shlibdir
"
map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
-loongson_deps="mips"
mipsfpu_deps="mips"
mipsdspr1_deps="mips"
mipsdspr2_deps="mips"
dcbzl_deps="ppc"
ldbrx_deps="ppc"
ppc4xx_deps="ppc"
-vsx_deps="ppc"
+vsx_deps="altivec"
+power8_deps="vsx"
cpunop_deps="i686"
x86_64_select="i686"
simd_align_16_if_any="altivec neon sse"
# system capabilities
-
symver_if_any="symver_asm_label symver_gnu_asm"
valgrind_backtrace_deps="!optimizations valgrind_valgrind_h"
# hardware accelerators
crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
+d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder"
dxva2_deps="dxva2api_h"
vaapi_deps="va_va_h"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
h263_vdpau_hwaccel_deps="vdpau"
h263_vdpau_hwaccel_select="h263_decoder"
h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
+h264_d3d11va_hwaccel_deps="d3d11va"
+h264_d3d11va_hwaccel_select="h264_decoder"
h264_dxva2_hwaccel_deps="dxva2"
h264_dxva2_hwaccel_select="h264_decoder"
h264_mmal_decoder_deps="mmal"
h264_vdpau_decoder_select="h264_decoder"
h264_vdpau_hwaccel_deps="vdpau"
h264_vdpau_hwaccel_select="h264_decoder"
+hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
+hevc_d3d11va_hwaccel_select="hevc_decoder"
hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
hevc_dxva2_hwaccel_select="hevc_decoder"
mpeg_vdpau_decoder_deps="vdpau"
mpeg1_xvmc_hwaccel_deps="xvmc"
mpeg1_xvmc_hwaccel_select="mpeg1video_decoder"
mpeg2_crystalhd_decoder_select="crystalhd"
+mpeg2_d3d11va_hwaccel_deps="d3d11va"
+mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
mpeg2_dxva2_hwaccel_deps="dxva2"
mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
mpeg2_vaapi_hwaccel_deps="vaapi"
mpeg4_vdpau_hwaccel_select="mpeg4_decoder"
msmpeg4_crystalhd_decoder_select="crystalhd"
vc1_crystalhd_decoder_select="crystalhd"
+vc1_d3d11va_hwaccel_deps="d3d11va"
+vc1_d3d11va_hwaccel_select="vc1_decoder"
vc1_dxva2_hwaccel_deps="dxva2"
vc1_dxva2_hwaccel_select="vc1_decoder"
vc1_vaapi_hwaccel_deps="vaapi"
vc1_vdpau_hwaccel_deps="vdpau"
vc1_vdpau_hwaccel_select="vc1_decoder"
wmv3_crystalhd_decoder_select="crystalhd"
+wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel"
wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
wmv3_vdpau_decoder_select="vc1_vdpau_decoder"
libvpx_vp9_encoder_deps="libvpx"
libwavpack_encoder_deps="libwavpack"
libwebp_encoder_deps="libwebp"
+libwebp_anim_encoder_deps="libwebp"
libx264_encoder_deps="libx264"
libx264rgb_encoder_deps="libx264"
libx264rgb_encoder_select="libx264_encoder"
sctp_protocol_select="network"
srtp_protocol_select="rtp_protocol"
tcp_protocol_select="network"
-tls_protocol_deps_any="openssl gnutls"
+tls_securetransport_protocol_deps="securetransport"
+tls_gnutls_protocol_deps="gnutls !tls_securetransport_protocol"
+tls_openssl_protocol_deps="openssl !tls_securetransport_protocol !tls_gnutls_protocol"
+tls_protocol_deps_any="tls_securetransport_protocol tls_gnutls_protocol tls_openssl_protocol"
tls_protocol_select="tcp_protocol"
udp_protocol_select="network"
udplite_protocol_select="network"
scale_filter_deps="swscale"
select_filter_select="pixelutils"
smartblur_filter_deps="gpl swscale"
+showcqt_filter_deps="avcodec"
+showcqt_filter_select="fft"
showspectrum_filter_deps="avcodec"
showspectrum_filter_select="rdft"
spp_filter_deps="gpl avcodec"
set_default sws_max_filter_size
# Enable hwaccels by default.
-enable dxva2 vaapi vda vdpau xvmc
+enable d3d11va dxva2 vaapi vda vdpau xvmc
enable xlib
# build settings
_flags_filter=armasm_flags
elif $_cc 2>&1 | grep -q Intel; then
_type=icl
- _ident=$($cc 2>&1 | head -n1)
+ _ident=$($_cc 2>&1 | head -n1)
_depflags='-QMMD -QMF$(@:.o=.d) -QMT$@'
# Not only is O3 broken on 13.x+ but it is slower on all previous
# versions (tested) as well.
disable stripping
elif $_cc 2>&1 | grep -q Microsoft; then
_type=msvc
- _ident=$($cc 2>&1 | head -n1)
+ _ident=$($_cc 2>&1 | head -n1)
_DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
_DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
_cflags_speed="-O2"
check_ldflags "-mabi=64"
;;
loongson3*)
- enable mipsfpu
+ disable mipsfpu
disable mips32r2
disable mips32r5
disable mips64r6
enable fast_cmov
enable fast_unaligned
disable aligned_stack
- cpuflags="-march=$cpu"
+ cpuflags="-march=loongson3a -mhard-float"
;;
generic)
disable mips32r5
;;
g4|745*|ppc745*|powerpc745*)
cpuflags="-mcpu=7450"
+ disable vsx
;;
74*|ppc74*|powerpc74*)
cpuflags="-mcpu=7400"
+ disable vsx
;;
g5|970|ppc970|powerpc970)
cpuflags="-mcpu=970"
+ disable vsx
;;
- power[3-8]*)
+ power[3-6]*)
+ cpuflags="-mcpu=$cpu"
+ disable vsx
+ ;;
+ power[7-8]*)
cpuflags="-mcpu=$cpu"
;;
cell)
cpuflags="-mcpu=cell"
enable ldbrx
+ disable vsx
;;
e500mc)
cpuflags="-mcpu=e500mc"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(shell echo $(NAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)'
SLIB_CREATE_DEF_CMD='echo LIBRARY $(SLIBNAME_WITH_MAJOR) INITINSTANCE TERMINSTANCE > $(SUBDIR)$(NAME).def; \
- echo PROTMODE >> $(SUBDIR)$(NAME).def; \
echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(SUBDIR)$(NAME).def; \
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(SUBDIR)$(NAME).def; \
echo EXPORTS >> $(SUBDIR)$(NAME).def; \
- emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def'
+ emxexp $(OBJS) >> $(SUBDIR)$(NAME).def'
SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \
emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib'
set_default libdir
: ${shlibdir_default:="$libdir"}
+: ${pkgconfigdir_default:="$libdir/pkgconfig"}
set_default $PATHS_LIST
set_default nm
elif enabled mips; then
- check_inline_asm loongson '"dmult.g $1, $2, $3"'
-
# Enable minimum ISA based on selected options
if enabled mips64 && (enabled mipsdspr1 || enabled mipsdspr2); then
add_cflags "-mips64r2"
add_asflags "-mips64r2"
- elif enabled mips64 && enabled mipsfpu; then
+ elif enabled mips64 && enabled mipsfpu && disabled loongson3; then
add_cflags "-mips64"
add_asflags "-mips64"
elif enabled mipsdspr1 || enabled mipsdspr2; then
check_inline_asm mipsfpu '"madd.d $f0, $f2, $f4, $f6"'
enabled msa && check_cflags "-mmsa" && check_ldflags "-mmsa" &&
check_inline_asm msa '"addvi.b $w0, $w1, 1"'
- enabled loongson3 && add_cflags "-mhard-float" && add_asflags "-mhard-float" &&
- check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"'
+ enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"'
enabled mips32r5 && add_asflags "-mips32r5 -mfp64"
enabled mips64r6 && add_asflags "-mips64r6 -mfp64"
fi
if enabled vsx; then
- check_cflags -mvsx
+ check_cflags -mvsx &&
+ check_builtin vec_vsx_ld "altivec.h" "__builtin_vec_vsx_ld" || disable vsx
+ fi
+
+ if enabled power8; then
+ check_cpp_condition "altivec.h" "defined(_ARCH_PWR8)" || disable power8
fi
+
elif enabled x86; then
check_builtin rdtsc intrin.h "__rdtsc()"
check_header direct.h
check_header dlfcn.h
+check_header d3d11.h
check_header dxva.h
check_header dxva2api.h -D_WIN32_WINNT=0x0600
check_header io.h
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
check_type "windows.h dxva.h" "DXVA_PicParams_HEVC"
+check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
if ! disabled w32threads && ! enabled pthreads; then
check_func_headers "windows.h process.h" _beginthreadex &&
enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx || disable libvpx_vp9_encoder; } }
enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
-enabled libwebp && require_pkg_config "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
+enabled libwebp && {
+ enabled libwebp_encoder && require_pkg_config "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
+ enabled libwebp_anim_encoder && { use_pkg_config "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit || disable libwebp_anim_encoder; } }
enabled libx264 && { use_pkg_config x264 "stdint.h x264.h" x264_encoder_encode ||
{ require libx264 x264.h x264_encoder_encode -lx264 &&
warn "using libx264 without pkg-config"; } } &&
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||
die "ERROR: libx264 must be installed and version must be >= 0.118."; }
enabled libx265 && require_pkg_config x265 x265.h x265_encoder_encode &&
- { check_cpp_condition x265.h "X265_BUILD >= 17" ||
- die "ERROR: libx265 version must be >= 17."; }
+ { check_cpp_condition x265.h "X265_BUILD >= 57" ||
+ die "ERROR: libx265 version must be >= 57."; }
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new
fi
enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
+disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
+ check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
+ enable securetransport; }
+
makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
enabled makeinfo && (makeinfo --version | \
grep -q 'makeinfo (GNU texinfo) 5' > /dev/null 2>&1) \
int main(void) { IDirectXVideoDecoder *o = NULL; IDirectXVideoDecoder_Release(o); return 0; }
EOF
+enabled d3d11_h &&
+ check_cc <<EOF && enable d3d11_cobj
+#define _WIN32_WINNT 0x0600
+#define COBJMACROS
+#include <windows.h>
+#include <d3d11.h>
+int main(void) { ID3D11VideoDecoder *o = NULL; ID3D11VideoDecoder_Release(o); return 0; }
+EOF
+
enabled vaapi &&
check_lib va/va.h vaInitialize -lva ||
disable vaapi
disable ebx_available
fi
fi
- # msvcrt10 x64 incorrectly enables log2, only msvcrt12 onwards actually has log2.
+ # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
check_cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION >= 12" || disable log2
fi
disable posix_memalign
fi
+enabled_all d3d11va d3d11_cobj CoTaskMemFree &&
+ prepend ffmpeg_libs $($ldflags_filter "-lole32") &&
+ enable d3d11va_lib
+
enabled_all dxva2 dxva2api_cobj CoTaskMemFree &&
prepend ffmpeg_libs $($ldflags_filter "-lole32" "-luser32") &&
enable dxva2_lib
enabled aresample_filter && prepend avfilter_deps "swresample"
enabled asyncts_filter && prepend avfilter_deps "avresample"
enabled atempo_filter && prepend avfilter_deps "avcodec"
+enabled cover_rect_filter && prepend avfilter_deps "avformat avcodec"
enabled ebur128_filter && enabled swresample && prepend avfilter_deps "swresample"
enabled elbg_filter && prepend avfilter_deps "avcodec"
enabled fftfilt_filter && prepend avfilter_deps "avcodec"
+enabled find_rect_filter && prepend avfilter_deps "avformat avcodec"
enabled mcdeint_filter && prepend avfilter_deps "avcodec"
enabled movie_filter && prepend avfilter_deps "avformat avcodec"
enabled pan_filter && prepend avfilter_deps "swresample"
fi
if enabled ppc; then
echo "AltiVec enabled ${altivec-no}"
+ echo "VSX enabled ${vsx-no}"
+ echo "POWER8 enabled ${power8-no}"
echo "PPC 4xx optimizations ${ppc4xx-no}"
- echo "PPC VSX optimizations ${vsx-no}"
echo "dcbzl available ${dcbzl-no}"
fi
echo "debug symbols ${debug-no}"
DATADIR=\$(DESTDIR)$datadir
DOCDIR=\$(DESTDIR)$docdir
MANDIR=\$(DESTDIR)$mandir
+PKGCONFIGDIR=\$(DESTDIR)$pkgconfigdir
SRC_PATH=$source_path
ifndef MAIN_MAKEFILE
SRC_PATH:=\$(SRC_PATH:.%=..%)