X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=4f1c172333e1fded83d65f2dabbd4617619ae16c;hb=1dc33c123715e195f7f19b2dca8f192a550f047c;hp=47c9ee9a3522557399c92643203722e925c5a36a;hpb=74fee9760f7a9215c502ec1fa0c67ea2636b529c;p=ffmpeg diff --git a/configure b/configure index 47c9ee9a352..4f1c172333e 100755 --- a/configure +++ b/configure @@ -109,7 +109,6 @@ Configuration options: --enable-gray enable full grayscale support (slower color) --disable-swscale-alpha disable alpha channel support in swscale --disable-all disable building components, libraries and programs - --enable-raise-major increase major version numbers in sonames [no] Program options: --disable-programs do not build command line programs @@ -235,8 +234,6 @@ External library support: --enable-libkvazaar enable HEVC encoding via libkvazaar [no] --enable-libmodplug enable ModPlug via libmodplug [no] --enable-libmp3lame enable MP3 encoding via libmp3lame [no] - --enable-libnut enable NUT (de)muxing via libnut, - native (de)muxer exists [no] --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] --enable-libopencv enable video filtering via libopencv [no] @@ -245,9 +242,9 @@ External library support: --enable-libopenmpt enable decoding tracked files via libopenmpt [no] --enable-libopus enable Opus de/encoding via libopus [no] --enable-libpulse enable Pulseaudio input via libpulse [no] + --enable-librsvg enable SVG rasterization via librsvg [no] --enable-librubberband enable rubberband needed for rubberband filter [no] --enable-librtmp enable RTMP[E] support via librtmp [no] - --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no] --enable-libshine enable fixed-point MP3 encoding via libshine [no] --enable-libsmbclient enable Samba protocol via libsmbclient [no] --enable-libsnappy enable Snappy compression, needed for hap encoding [no] @@ -259,6 +256,7 @@ External library support: --enable-libtwolame enable MP2 encoding via libtwolame [no] --enable-libv4l2 enable libv4l2/v4l-utils [no] --enable-libvidstab enable video stabilization using vid.stab [no] + --enable-libvmaf enable vmaf filter via libvmaf [no] --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] --enable-libvorbis enable Vorbis en/decoding via libvorbis, native implementation exists [no] @@ -279,8 +277,9 @@ External library support: --enable-libzvbi enable teletext support via libzvbi [no] --disable-lzma disable lzma [autodetect] --enable-decklink enable Blackmagic DeckLink I/O support [no] + --enable-libndi_newtek enable Newteck NDI I/O support [no] --enable-mediacodec enable Android MediaCodec support [no] - --enable-netcdf enable NetCDF, needed for sofalizer filter [no] + --enable-libmysofa enable libmysofa, needed for sofalizer filter [no] --enable-openal enable OpenAL 1.1 capture support [no] --enable-opencl enable OpenCL code --enable-opengl enable OpenGL rendering [no] @@ -297,6 +296,7 @@ External library support: The following libraries provide various hardware acceleration features: --disable-audiotoolbox disable Apple AudioToolbox code [autodetect] --disable-cuda disable dynamically linked Nvidia CUDA code [autodetect] + --enable-cuda-sdk enable CUDA features that require the CUDA SDK [no] --disable-cuvid disable Nvidia CUVID support [autodetect] --disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect] --disable-dxva2 disable Microsoft DirectX 9 video acceleration code [autodetect] @@ -332,11 +332,12 @@ Toolchain options: --ln_s=LN_S use symbolic link tool LN_S [$ln_s_default] --strip=STRIP use strip tool STRIP [$strip_default] --windres=WINDRES use windows resource compiler WINDRES [$windres_default] - --yasmexe=EXE use yasm-compatible assembler EXE [$yasmexe_default] + --x86asmexe=EXE use nasm-compatible assembler EXE [$x86asmexe_default] --cc=CC use C compiler CC [$cc_default] --cxx=CXX use C compiler CXX [$cxx_default] --objcc=OCC use ObjC compiler OCC [$cc_default] --dep-cc=DEPCC use dependency generator DEPCC [$cc_default] + --nvcc=NVCC use Nvidia CUDA compiler NVCC [$nvcc_default] --ld=LD use linker LD [$ld_default] --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default] --pkg-config-flags=FLAGS pass additional flags to pkgconf [] @@ -358,6 +359,7 @@ Toolchain options: --extra-libs=ELIBS add ELIBS [$ELIBS] --extra-version=STRING version string suffix [] --optflags=OPTFLAGS override optimization-related compiler flags + --nvccflags=NVCCFLAGS override nvcc flags [$nvccflags_default] --build-suffix=SUFFIX library name suffix [] --enable-pic build position-independent code --enable-thumb compile for Thumb instruction set @@ -401,7 +403,7 @@ Optimization options (experts only): --disable-vfp disable VFP optimizations --disable-neon disable NEON optimizations --disable-inline-asm disable use of inline assembly - --disable-yasm disable use of nasm/yasm assembly + --disable-x86asm disable use of standalone x86 assembly --disable-mipsdsp disable MIPS DSP ASE R1 optimizations --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations --disable-msa disable MSA optimizations @@ -979,12 +981,12 @@ check_insn(){ echo "$2" | check_as && enable ${1}_external || disable ${1}_external } -check_yasm(){ - log check_yasm "$@" +check_x86asm(){ + log check_x86asm "$@" echo "$1" > $TMPS log_file $TMPS shift 1 - check_cmd $yasmexe $YASMFLAGS -Werror "$@" -o $TMPO $TMPS + check_cmd $x86asmexe $X86ASMFLAGS -Werror "$@" -o $TMPO $TMPS } ld_o(){ @@ -1467,6 +1469,7 @@ EXAMPLE_LIST=" filtering_audio_example filtering_video_example http_multiclient_example + hw_decode_example metadata_example muxing_example qsvdec_example @@ -1506,6 +1509,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" EXTERNAL_LIBRARY_NONFREE_LIST=" decklink + libndi_newtek libfdk_aac openssl " @@ -1550,15 +1554,15 @@ EXTERNAL_LIBRARY_LIST=" libkvazaar libmodplug libmp3lame - libnut + libmysofa libopencv libopenh264 libopenjpeg libopenmpt libopus libpulse + librsvg librtmp - libschroedinger libshine libsmbclient libsnappy @@ -1569,6 +1573,7 @@ EXTERNAL_LIBRARY_LIST=" libtheora libtwolame libv4l2 + libvmaf libvorbis libvpx libwavpack @@ -1577,7 +1582,6 @@ EXTERNAL_LIBRARY_LIST=" libzmq libzvbi mediacodec - netcdf openal opencl opengl @@ -1598,6 +1602,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST=" " HWACCEL_LIBRARY_NONFREE_LIST=" + cuda_sdk libnpp " @@ -1686,7 +1691,6 @@ CONFIG_LIST=" neon_clobber_test ossfuzz pic - raise_major thumb valgrind_backtrace xmm_clobber_test @@ -1834,7 +1838,7 @@ BUILTIN_LIST=" HAVE_LIST_CMDLINE=" inline_asm symver - yasm + x86asm " HAVE_LIST_PUB=" @@ -1860,6 +1864,7 @@ HEADERS_LIST=" direct_h dirent_h dlfcn_h + dxgidebug_h dxva_h ES2_gl_h gsm_h @@ -1869,6 +1874,7 @@ HEADERS_LIST=" machine_ioctl_meteor_h malloc_h opencv2_core_core_c_h + openjpeg_2_2_openjpeg_h openjpeg_2_1_openjpeg_h openjpeg_2_0_openjpeg_h openjpeg_1_5_openjpeg_h @@ -2000,6 +2006,7 @@ TOOLCHAIN_FEATURES=" asm_mod_q attribute_may_alias attribute_packed + blocks_extension ebp_available ebx_available gnu_as @@ -2055,8 +2062,6 @@ HAVE_LIST=" alsa atomics_native dos_paths - dxva2_lib - dxva2api_cobj jack libc_msvcrt makeinfo @@ -2069,6 +2074,7 @@ HAVE_LIST=" sndio texi2html threads + uwp vaapi_drm vaapi_x11 vdpau_x11 @@ -2219,6 +2225,7 @@ CMDLINE_SET=" malloc_prefix nm optflags + nvccflags pkg_config pkg_config_flags progs_suffix @@ -2236,7 +2243,7 @@ CMDLINE_SET=" tempprefix toolchain valgrind - yasmexe + x86asmexe " CMDLINE_APPEND=" @@ -2304,7 +2311,7 @@ fma3_deps="avx" fma4_deps="avx" avx2_deps="avx" -mmx_external_deps="yasm" +mmx_external_deps="x86asm" mmx_inline_deps="inline_asm" mmx_suggest="mmx_external mmx_inline" @@ -2388,6 +2395,7 @@ bink_decoder_select="blockdsp hpeldsp" binkaudio_dct_decoder_select="mdct rdft dct sinewin wma_freqs" binkaudio_rdft_decoder_select="mdct rdft sinewin wma_freqs" cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp" +clearvideo_decoder_select="idctdsp" cllc_decoder_select="bswapdsp" comfortnoise_encoder_select="lpc" cook_decoder_select="audiodsp mdct sinewin" @@ -2398,6 +2406,7 @@ dds_decoder_select="texturedsp" dirac_decoder_select="dirac_parse dwt golomb videodsp mpegvideoenc" dnxhd_decoder_select="blockdsp idctdsp" dnxhd_encoder_select="aandcttables blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp" +dolby_e_decoder_select="mdct" dvvideo_decoder_select="dvprofile idctdsp" dvvideo_encoder_select="dvprofile fdctdsp me_cmp pixblockdsp" dxa_decoder_select="zlib" @@ -2591,10 +2600,9 @@ crystalhd_deps="libcrystalhd_libcrystalhd_if_h" cuda_deps_any="dlopen LoadLibrary" cuvid_deps="cuda" d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext" -dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode" +dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32" dxva2_extralibs="-luser32" -dxva2_lib_deps="dxva2" -vda_framework_deps="VideoDecodeAcceleration_VDADecoder_h" +vda_framework_deps="VideoDecodeAcceleration_VDADecoder_h blocks_extension" vda_framework_extralibs="-framework VideoDecodeAcceleration" vda_deps="vda_framework pthreads" vda_extralibs="-framework CoreFoundation -framework QuartzCore" @@ -2610,6 +2618,8 @@ h264_cuvid_hwaccel_deps="cuda cuvid" h264_cuvid_hwaccel_select="h264_cuvid_decoder" h264_d3d11va_hwaccel_deps="d3d11va" h264_d3d11va_hwaccel_select="h264_decoder" +h264_d3d11va2_hwaccel_deps="d3d11va" +h264_d3d11va2_hwaccel_select="h264_decoder" h264_dxva2_hwaccel_deps="dxva2" h264_dxva2_hwaccel_select="h264_decoder" h264_mediacodec_hwaccel_deps="mediacodec" @@ -2630,6 +2640,8 @@ hevc_cuvid_hwaccel_select="hevc_cuvid_decoder" hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC" hevc_d3d11va_hwaccel_select="hevc_decoder" hevc_mediacodec_hwaccel_deps="mediacodec" +hevc_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_HEVC" +hevc_d3d11va2_hwaccel_select="hevc_decoder" hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC" hevc_dxva2_hwaccel_select="hevc_decoder" hevc_qsv_hwaccel_deps="libmfx" @@ -2653,8 +2665,11 @@ mpeg2_cuvid_hwaccel_deps="cuda cuvid" mpeg2_cuvid_hwaccel_select="mpeg2_cuvid_decoder" mpeg2_d3d11va_hwaccel_deps="d3d11va" mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder" +mpeg2_d3d11va2_hwaccel_deps="d3d11va" +mpeg2_d3d11va2_hwaccel_select="mpeg2video_decoder" mpeg2_dxva2_hwaccel_deps="dxva2" mpeg2_dxva2_hwaccel_select="mpeg2video_decoder" +mpeg2_mediacodec_hwaccel_deps="mediacodec" mpeg2_mmal_hwaccel_deps="mmal" mpeg2_qsv_hwaccel_deps="libmfx" mpeg2_qsv_hwaccel_select="qsvdec_mpeg2" @@ -2680,6 +2695,8 @@ vc1_cuvid_hwaccel_deps="cuda cuvid" vc1_cuvid_hwaccel_select="vc1_cuvid_decoder" vc1_d3d11va_hwaccel_deps="d3d11va" vc1_d3d11va_hwaccel_select="vc1_decoder" +vc1_d3d11va2_hwaccel_deps="d3d11va" +vc1_d3d11va2_hwaccel_select="vc1_decoder" vc1_dxva2_hwaccel_deps="dxva2" vc1_dxva2_hwaccel_select="vc1_decoder" vc1_mmal_hwaccel_deps="mmal" @@ -2697,12 +2714,15 @@ vp8_mediacodec_hwaccel_deps="mediacodec" vp8_qsv_hwaccel_deps="libmfx" vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9" vp9_d3d11va_hwaccel_select="vp9_decoder" +vp9_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_VP9" +vp9_d3d11va2_hwaccel_select="vp9_decoder" vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9" vp9_dxva2_hwaccel_select="vp9_decoder" vp9_mediacodec_hwaccel_deps="mediacodec" vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth" vp9_vaapi_hwaccel_select="vp9_decoder" wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel" +wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel" wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel" wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel" @@ -2717,6 +2737,7 @@ vaapi_encode_deps="vaapi" hwupload_cuda_filter_deps="cuda" scale_npp_filter_deps="cuda libnpp" +scale_cuda_filter_deps="cuda_sdk" nvenc_deps="cuda" nvenc_deps_any="dlopen LoadLibrary" @@ -2760,6 +2781,7 @@ mpeg1_vdpau_decoder_select="mpeg1video_decoder" mpeg2_crystalhd_decoder_select="crystalhd" mpeg2_cuvid_decoder_deps="cuda cuvid" mpeg2_mmal_decoder_deps="mmal" +mpeg2_mediacodec_decoder_deps="mediacodec" mpeg2_qsv_decoder_deps="libmfx" mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel" mpeg2_qsv_encoder_deps="libmfx" @@ -2791,6 +2813,8 @@ vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8" vp8_vaapi_encoder_select="vaapi_encode" vp9_cuvid_decoder_deps="cuda cuvid" vp9_mediacodec_decoder_deps="mediacodec" +vp9_vaapi_encoder_deps="VAEncPictureParameterBufferVP9" +vp9_vaapi_encoder_select="vaapi_encode" wmv3_crystalhd_decoder_select="crystalhd" wmv3_vdpau_decoder_select="vc1_vdpau_decoder" @@ -2869,8 +2893,7 @@ libopenmpt_demuxer_deps="libopenmpt" libopus_decoder_deps="libopus" libopus_encoder_deps="libopus" libopus_encoder_select="audio_frame_queue" -libschroedinger_decoder_deps="libschroedinger" -libschroedinger_encoder_deps="libschroedinger" +librsvg_decoder_deps="librsvg" libshine_encoder_deps="libshine" libshine_encoder_select="audio_frame_queue" libspeex_decoder_deps="libspeex" @@ -2932,8 +2955,6 @@ image2_alias_pix_demuxer_select="image2_demuxer" image2_brender_pix_demuxer_select="image2_demuxer" ipod_muxer_select="mov_muxer" ismv_muxer_select="mov_muxer" -libnut_demuxer_deps="libnut" -libnut_muxer_deps="libnut" matroska_audio_muxer_select="matroska_muxer" matroska_demuxer_select="iso_media riffdec" matroska_demuxer_suggest="bzlib lzo zlib" @@ -2995,6 +3016,10 @@ decklink_indev_deps="decklink threads" decklink_indev_extralibs="-lstdc++" decklink_outdev_deps="decklink threads" decklink_outdev_extralibs="-lstdc++" +libndi_newtek_indev_deps="libndi_newtek" +libndi_newtek_indev_extralibs="-lndi" +libndi_newtek_outdev_deps="libndi_newtek" +libndi_newtek_outdev_extralibs="-lndi" dshow_indev_deps="IBaseFilter" dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid -loleaut32 -lshlwapi" dv1394_indev_deps="dv1394" @@ -3083,6 +3108,8 @@ unix_protocol_select="network" # filters afftfilt_filter_deps="avcodec" afftfilt_filter_select="fft" +afir_filter_deps="avcodec" +afir_filter_select="fft" amovie_filter_deps="avcodec avformat" aresample_filter_deps="swresample" ass_filter_deps="libass" @@ -3153,7 +3180,7 @@ showspectrumpic_filter_deps="avcodec" showspectrumpic_filter_select="fft" signature_filter_deps="gpl avcodec avformat" smartblur_filter_deps="gpl swscale" -sofalizer_filter_deps="netcdf avcodec" +sofalizer_filter_deps="libmysofa avcodec" sofalizer_filter_select="fft" spectrumsynth_filter_deps="avcodec" spectrumsynth_filter_select="fft" @@ -3170,6 +3197,7 @@ uspp_filter_deps="gpl avcodec" vaguedenoiser_filter_deps="gpl" vidstabdetect_filter_deps="libvidstab" vidstabtransform_filter_deps="libvidstab" +libvmaf_filter_deps="libvmaf" zmq_filter_deps="libzmq" zoompan_filter_deps="swscale" zscale_filter_deps="libzimg" @@ -3188,6 +3216,7 @@ filter_audio_example_deps="avfilter avutil" filtering_audio_example_deps="avfilter avcodec avformat avutil" filtering_video_example_deps="avfilter avcodec avformat avutil" http_multiclient_example_deps="avformat avutil fork" +hw_decode_example_deps="avcodec avformat avutil" metadata_example_deps="avformat avutil" muxing_example_deps="avcodec avformat avutil swscale" qsvdec_example_deps="avcodec avutil libmfx h264_qsv_decoder" @@ -3250,13 +3279,14 @@ doxygen_default="doxygen" install="install" ln_s_default="ln -s -f" nm_default="nm -g" -objformat="elf" pkg_config_default=pkg-config ranlib_default="ranlib" strip_default="strip" version_script='--version-script' -yasmexe_default="yasm" +x86asmexe_default="nasm" windres_default="windres" +nvcc_default="nvcc" +nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2" # OS target_os_default=$(tolower $(uname -s)) @@ -3323,6 +3353,7 @@ CXX_O='-o $@' OBJCC_C='-c' OBJCC_E='-E -o $@' OBJCC_O='-o $@' +X86ASM_O='-o $@' LD_O='-o $@' LD_LIB='-l%' LD_PATH='-L' @@ -3330,6 +3361,8 @@ HOSTCC_C='-c' HOSTCC_E='-E -o $@' HOSTCC_O='-o $@' HOSTLD_O='-o $@' +NVCC_C='-c' +NVCC_O='-o $@' host_extralibs='-lm' host_cflags_filter=echo @@ -3342,6 +3375,8 @@ target_path='$(CURDIR)' DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>/dev/null | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(@F),$(@D)/$(@F)," > $(@:.o=.d)' DEPFLAGS='-MM' +mkdir -p ffbuild + # find source path if test -f configure; then source_path=. @@ -3498,6 +3533,16 @@ for opt do [ "$list" = "" ] && warn "Option $opt did not match anything" $action $list ;; + --enable-yasm|--disable-yasm) + warn "The ${opt} option is only provided for compatibility and will be\n"\ + "removed in the future. Use --enable-x86asm / --disable-x86asm instead." + test $opt = --enable-yasm && x86asm=yes || x86asm=no + ;; + --yasmexe=*) + warn "The --yasmexe option is only provided for compatibility and will be\n"\ + "removed in the future. Use --x86asmexe instead." + x86asmexe="$optval" + ;; --enable-?*|--disable-?*) eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g') if is_in $option $COMPONENT_LIST; then @@ -3587,7 +3632,6 @@ disable_components(){ map 'disable_components $v' $LIBRARY_LIST -mkdir -p ffbuild echo "# $0 $FFMPEG_CONFIGURATION" > $logfile set >> $logfile @@ -3717,7 +3761,7 @@ windres_default="${cross_prefix}${windres_default}" sysinclude_default="${sysroot}/usr/include" set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ - target_exec target_os yasmexe + target_exec target_os x86asmexe nvcc enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -3751,25 +3795,32 @@ HOSTEXESUF=$(exesuf $host_os) if [ -n "$tempprefix" ] ; then mktemp(){ - echo $tempprefix.${HOSTNAME}.${UID} + tmpname="$tempprefix.${HOSTNAME}.${UID}" + echo "$tmpname" + mkdir "$tmpname" } elif ! check_cmd mktemp -u XXXXXX; then # simple replacement for missing mktemp # NOT SAFE FOR GENERAL USE mktemp(){ - echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$" + tmpname="${2%%XXX*}.${HOSTNAME}.${UID}.$$" + echo "$tmpname" + mkdir "$tmpname" } fi +FFTMPDIR=$(mktemp -d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev/null) || + die "Unable to create temporary directory in $TMPDIR." + tmpfile(){ - tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 && - (set -C; exec > $tmp) 2>/dev/null || - die "Unable to create temporary file in $TMPDIR." - append TMPFILES $tmp + tmp="${FFTMPDIR}/test"$2 + (set -C; exec > $tmp) 2> /dev/null || + die "Unable to create temporary file in $FFTMPDIR." eval $1=$tmp } -trap 'rm -f -- $TMPFILES' EXIT +trap 'rm -rf -- "$FFTMPDIR"' EXIT +trap 'exit 2' INT tmpfile TMPASM .asm tmpfile TMPC .c @@ -3847,6 +3898,7 @@ msvc_common_flags(){ # specific filters, they must be specified here as well or else the # generic catch all at the bottom will print the original flag. -Wall) ;; + -Wextra) ;; -std=c99) ;; # Common flags -fomit-frame-pointer) ;; @@ -3872,7 +3924,9 @@ msvc_flags(){ msvc_common_flags "$@" for flag; do case $flag in - -Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \ + -Wall) echo -W3 -wd4018 -wd4146 -wd4244 -wd4305 \ + -wd4554 ;; + -Wextra) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \ -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \ -wd4152 -wd4324 -we4013 -wd4100 -wd4214 \ -wd4307 \ @@ -4210,6 +4264,7 @@ set_ccvars CXX probe_cc hostcc "$host_cc" host_cflags_filter=$_flags_filter +host_cflags_speed=$_cflags_speed add_host_cflags $_flags $_cflags set_ccvars HOSTCC @@ -4713,7 +4768,7 @@ EOF add_host_cppflags -D_ISOC99_SOURCE check_host_cflags -std=c99 check_host_cflags -Wall -check_host_cflags -O3 +check_host_cflags $host_cflags_speed check_64bit(){ arch32=$1 @@ -4766,6 +4821,8 @@ esac enable $subarch enabled spic && enable_weak pic +enabled x86_64 && objformat=elf64 || objformat="elf32" + # OS specific case $target_os in aix) @@ -4836,7 +4893,7 @@ case $target_os in SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' objformat="macho" - enabled x86_64 && objformat="macho64" + enabled x86_64 && objformat="macho64" || objformat="macho32" enabled_any pic shared x86_64 || { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } check_header dispatch/dispatch.h && @@ -4853,8 +4910,6 @@ case $target_os in else target_os=mingw32 fi - decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32" - decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32" LIBTARGET=i386 if enabled x86_64; then LIBTARGET="i386:x86-64" @@ -4882,7 +4937,7 @@ case $target_os in SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.orig.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--disable-auto-image-base' - objformat="win32" + enabled x86_64 && objformat="win64" || objformat="win32" ranlib=: enable dos_paths check_ldflags -Wl,--nxcompat,--dynamicbase @@ -4922,7 +4977,7 @@ case $target_os in SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' - objformat="win32" + enabled x86_64 && objformat="win64" || objformat="win32" ranlib=: enable dos_paths ;; @@ -4937,7 +4992,7 @@ case $target_os in SLIB_INSTALL_LINKS= SLIB_INSTALL_EXTRA_LIB='lib$(FULLNAME).dll.a' SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a' - objformat="win32" + enabled x86_64 && objformat="win64" || objformat="win32" enable dos_paths enabled shared && ! enabled small && check_cmd $windres --version && enable gnu_windres add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 @@ -4960,7 +5015,7 @@ case $target_os in strip="lxlite -CS" objformat="aout" add_cppflags -D_GNU_SOURCE - add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap + add_ldflags -Zomf -Zbin-files -Zargs-wild -Zhigh-mem -Zmap SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' LIBSUF="_s.a" SLIBPREF="" @@ -5068,7 +5123,7 @@ probe_libc(){ add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 check_${pfx}cpp_condition _mingw.h "defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0502" || add_${pfx}cppflags -D_WIN32_WINNT=0x0502 - check_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700__" && + check_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700" && add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700 eval test \$${pfx_no_}cc_type = "gcc" && add_${pfx}cppflags -D__printf__=__gnu_printf__ @@ -5348,7 +5403,8 @@ EOF EOF # llvm's integrated assembler supports .object_arch from llvm 3.5 - [ "$objformat" = elf ] && check_as <= 0x0a060100" || die "ERROR: Decklink API version must be >= 10.6.1."; } } +enabled libndi_newtek && { check_header Processing.NDI.Lib.h || die "ERROR: Processing.NDI.Lib.h header not found"; } enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; } enabled gmp && require gmp gmp.h mpz_export -lgmp enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init -enabled jni && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads && - check_lib jni "dlfcn.h" dlopen -ldl || die "ERROR: jni not found"; } +enabled jni && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads || die "ERROR: jni not found"; } enabled ladspa && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; } enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 enabled libass && require_pkg_config libass ass/ass.h ass_library_init @@ -5787,17 +5857,27 @@ enabled fontconfig && enable libfontconfig enabled libfontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit enabled libfreetype && require_pkg_config freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType enabled libfribidi && require_pkg_config fribidi fribidi.h fribidi_version_info -enabled libgme && require libgme gme/gme.h gme_new_emu -lgme -lstdc++ +enabled libgme && { use_pkg_config libgme gme/gme.h gme_new_emu || + require libgme gme/gme.h gme_new_emu -lgme -lstdc++; } enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break; done || die "ERROR: libgsm not found"; } enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc enabled libkvazaar && require_pkg_config "kvazaar >= 0.8.1" kvazaar.h kvz_api_get -enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit +# While it may appear that require is being used as a pkg-config +# fallback for libmfx, it is actually being used to detect a different +# installation route altogether. If libmfx is installed via the Intel +# Media SDK or Intel Media Server Studio, these don't come with +# pkg-config support. Instead, users should make sure that the build +# can find the libraries and headers through other means. +enabled libmfx && { use_pkg_config libmfx "mfx/mfxvideo.h" MFXInit || + { require libmfx "mfx/mfxvideo.h" MFXInit -llibmfx && warn "using libmfx without pkg-config"; } } enabled libmodplug && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame -enabled libnut && require libnut libnut.h nut_demuxer_init -lnut -enabled libnpp && require libnpp npp.h nppGetLibVersion -lnppi -lnppc +enabled libmysofa && require libmysofa "mysofa.h" mysofa_load -lmysofa +enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc || + check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppc || + die "ERROR: libnpp not found"; } enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && { check_header opencv2/core/core_c.h && @@ -5805,7 +5885,9 @@ enabled libopencv && { check_header opencv2/core/core_c.h && require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; } enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion -enabled libopenjpeg && { { check_lib libopenjpeg openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || +enabled libopenjpeg && { { check_lib libopenjpeg openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || + check_lib libopenjpeg openjpeg-2.2/openjpeg.h opj_version -lopenjp2 || + { check_lib libopenjpeg openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || check_lib libopenjpeg openjpeg-2.1/openjpeg.h opj_version -lopenjp2 || { check_lib libopenjpeg openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || { check_lib libopenjpeg openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || @@ -5821,9 +5903,9 @@ enabled libopus && { } } enabled libpulse && require_pkg_config libpulse pulse/pulseaudio.h pa_context_new +enabled librsvg && require_pkg_config librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket enabled librubberband && require_pkg_config "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer enabled libsmbclient && { use_pkg_config smbclient libsmbclient.h smbc_init || require smbclient libsmbclient.h smbc_init -lsmbclient; } @@ -5838,8 +5920,10 @@ enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; } enabled libv4l2 && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl enabled libvidstab && require_pkg_config "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit +enabled libvmaf && require_pkg_config libvmaf libvmaf.h compute_vmaf enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc -enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg +enabled libvorbis && require_pkg_config vorbis vorbis/codec.h vorbis_info_init && + require_pkg_config vorbisenc vorbis/vorbisenc.h vorbis_encode_init enabled libvpx && { enabled libvpx_vp8_decoder && { @@ -5894,7 +5978,6 @@ enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_co check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } || die "ERROR: mmal not found" && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } -enabled netcdf && require_pkg_config netcdf netcdf.h nc_inq_libvers enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do check_lib openal 'AL/al.h' alGetError "${al_extralibs}" && break; done } || die "ERROR: openal not found"; } && @@ -5959,6 +6042,15 @@ if ! disabled sdl2; then fi enabled sdl2 && enable sdl && add_cflags $sdl2_cflags && add_extralibs $sdl2_extralibs +if enabled decklink; then + case $target_os in + mingw32*|mingw64*|win32|win64) + decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32" + decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32" + ;; + esac +fi + disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security"; } @@ -6051,19 +6143,21 @@ fi check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs" -enabled dxva2api_h && - check_cc < -#include -#include -int main(void) { IDirectXVideoDecoder *o = NULL; IDirectXVideoDecoder_Release(o); return 0; } +# d3d11va requires linking directly to dxgi and d3d11 if not building for +# the desktop api partition +check_cpp < +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#error desktop, not uwp +#else +// WINAPI_FAMILY_APP, WINAPI_FAMILY_PHONE_APP => UWP +#endif +#else +#error no family set +#endif EOF -enabled dxva2 && - check_lib dxva2_lib windows.h CoTaskMemFree -lole32 - enabled vaapi && check_lib vaapi va/va.h vaInitialize -lva @@ -6148,6 +6242,10 @@ check_disable_warning_headers(){ check_disable_warning_headers -Wno-deprecated-declarations check_disable_warning_headers -Wno-unused-variable +check_cc <>$TMPH -if enabled yasm; then +if enabled x86asm; then append config_files $TMPASM printf '' >$TMPASM fi @@ -6834,7 +6952,7 @@ echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild/config.mak cp_if_changed $TMPH config.h touch ffbuild/.config -enabled yasm && cp_if_changed $TMPASM config.asm +enabled x86asm && cp_if_changed $TMPASM config.asm cat > $TMPH <