--enable-jni enable JNI support [no]
--enable-ladspa enable LADSPA audio filtering [no]
--enable-libaom enable AV1 video encoding/decoding via libaom [no]
+ --enable-libaribb24 enable ARIB text and caption decoding via libaribb24 [no]
--enable-libass enable libass subtitles rendering,
needed for subtitles and ass filter [no]
--enable-libbluray enable BluRay reading using libbluray [no]
--enable-lv2 enable LV2 audio filtering [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-mbedtls enable mbedTLS, needed for https support
if openssl, gnutls or libtls is not used [no]
--enable-mediacodec enable Android MediaCodec support [no]
--enable-opengl enable OpenGL rendering [no]
--enable-openssl enable openssl, needed for https support
if gnutls, libtls or mbedtls is not used [no]
+ --enable-pocketsphinx enable PocketSphinx, needed for asr filter [no]
--disable-sndio disable sndio support [autodetect]
--disable-schannel disable SChannel SSP, needed for TLS support on
Windows if openssl and gnutls are not used [autodetect]
The following libraries provide various hardware acceleration features:
--disable-amf disable AMF video encoding code [autodetect]
--disable-audiotoolbox disable Apple AudioToolbox code [autodetect]
- --enable-cuda-sdk enable CUDA features that require the CUDA SDK [no]
+ --enable-cuda-nvcc enable Nvidia CUDA compiler [no]
+ --disable-cuda-llvm disable CUDA compilation using clang [autodetect]
--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]
--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]
+ --nvcc=NVCC use Nvidia CUDA compiler NVCC or clang [$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 []
--disable-mipsdsp disable MIPS DSP ASE R1 optimizations
--disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
--disable-msa disable MSA optimizations
+ --disable-msa2 disable MSA2 optimizations
--disable-mipsfpu disable floating point MIPS optimizations
--disable-mmi disable Loongson SIMD optimizations
--disable-fast-unaligned consider unaligned accesses slow
}
log_file(){
- log BEGIN $1
- pr -n -t $1 >> $logfile
- log END $1
+ log BEGIN "$1"
+ log_file_i=1
+ while IFS= read -r log_file_line; do
+ printf '%5d\t%s\n' "$log_file_i" "$log_file_line"
+ log_file_i=$(($log_file_i+1))
+ done < "$1" >> "$logfile"
+ log END "$1"
}
warn(){
done
}
+warn_if_gets_disabled(){
+ for var in $*; do
+ WARN_IF_GETS_DISABLED_LIST="$WARN_IF_GETS_DISABLED_LIST $var"
+ done
+}
+
enable(){
set_all yes $*
}
set_all no $*
}
+disable_with_reason(){
+ disable $1
+ eval "${1}_disable_reason=\"$2\""
+ if requested $1; then
+ die "ERROR: $1 requested, but $2"
+ fi
+}
+
enable_weak(){
set_weak yes $*
}
[ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; }
[ -n "$dep_ifn" ] && { enabled_any $dep_ifn && enable_weak $cfg; }
- enabled_all $dep_all || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not all dependencies are satisfied: $dep_all"; }
- enabled_any $dep_any || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not any dependency is satisfied: $dep_any"; }
- disabled_all $dep_con || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some conflicting dependencies are unsatisfied: $dep_con"; }
- disabled_any $dep_sel && { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some selected dependency is unsatisfied: $dep_sel"; }
+ enabled_all $dep_all || { disable_with_reason $cfg "not all dependencies are satisfied: $dep_all"; }
+ enabled_any $dep_any || { disable_with_reason $cfg "not any dependency is satisfied: $dep_any"; }
+ disabled_all $dep_con || { disable_with_reason $cfg "some conflicting dependencies are unsatisfied: $dep_con"; }
+ disabled_any $dep_sel && { disable_with_reason $cfg "some selected dependency is unsatisfied: $dep_sel"; }
enabled $cfg && enable_deep_weak $dep_sel $dep_sgs
eval printf '%s\\n' $HOSTCC_O
}
+nvcc_o(){
+ eval printf '%s\\n' $NVCC_O
+}
+
test_cc(){
log test_cc "$@"
cat > $TMPC
test_cmd $objcc -Werror=missing-prototypes $CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $(cc_o $TMPO) $TMPM
}
+test_nvcc(){
+ log test_nvcc "$@"
+ cat > $TMPCU
+ log_file $TMPCU
+ tmpcu_=$TMPCU
+ tmpo_=$TMPO
+ [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_)
+ test_cmd $nvcc $nvccflags "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_
+}
+
+check_nvcc() {
+ log check_nvcc "$@"
+ name=$1
+ shift 1
+ disabled $name && return
+ disable $name
+ test_nvcc "$@" <<EOF && enable $name
+extern "C" {
+ __global__ void hello(unsigned char *data) {}
+}
+EOF
+}
+
test_cpp(){
log test_cpp "$@"
cat > $TMPC
EXTERNAL_LIBRARY_NONFREE_LIST="
decklink
- libndi_newtek
libfdk_aac
openssl
libtls
EXTERNAL_LIBRARY_VERSION3_LIST="
gmp
+ libaribb24
liblensfun
libopencore_amrnb
libopencore_amrwb
mediacodec
openal
opengl
+ pocketsphinx
vapoursynth
"
audiotoolbox
crystalhd
cuda
+ cuda_llvm
cuvid
d3d11va
dxva2
"
HWACCEL_LIBRARY_NONFREE_LIST="
+ cuda_nvcc
cuda_sdk
libnpp
"
mipsdsp
mipsdspr2
msa
+ msa2
"
ARCH_EXT_LIST_LOONGSON="
TYPES_LIST="
kCMVideoCodecType_HEVC
+ kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
+ kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ
+ kCVImageBufferTransferFunction_ITU_R_2100_HLG
+ kCVImageBufferTransferFunction_Linear
socklen_t
struct_addrinfo
struct_group_source_req
mipsdspr2_deps="mips"
mmi_deps="mips"
msa_deps="mipsfpu"
+msa2_deps="msa"
cpunop_deps="i686"
x86_64_select="i686"
# subsystems
cbs_av1_select="cbs"
-cbs_h264_select="cbs golomb"
-cbs_h265_select="cbs golomb"
+cbs_h264_select="cbs"
+cbs_h265_select="cbs"
cbs_jpeg_select="cbs"
cbs_mpeg2_select="cbs"
cbs_vp9_select="cbs"
jv_decoder_select="blockdsp"
lagarith_decoder_select="llviddsp"
ljpeg_encoder_select="idctdsp jpegtables mpegvideoenc"
+lscr_decoder_deps="zlib"
magicyuv_decoder_select="llviddsp"
magicyuv_encoder_select="llvidencdsp"
mdec_decoder_select="blockdsp idctdsp mpegvideo"
mjpeg_encoder_select="jpegtables mpegvideoenc"
mjpegb_decoder_select="mjpeg_decoder"
mlp_decoder_select="mlp_parser"
-mlp_encoder_select="lpc"
+mlp_encoder_select="lpc audio_frame_queue"
motionpixels_decoder_select="bswapdsp"
mp1_decoder_select="mpegaudio"
mp1float_decoder_select="mpegaudio"
tiff_decoder_suggest="zlib lzma"
tiff_encoder_suggest="zlib"
truehd_decoder_select="mlp_parser"
-truehd_encoder_select="lpc"
+truehd_encoder_select="lpc audio_frame_queue"
truemotion2_decoder_select="bswapdsp"
truespeech_decoder_select="bswapdsp"
tscc_decoder_deps="zlib"
vorbis_decoder_select="mdct"
vorbis_encoder_select="audio_frame_queue mdct"
vp3_decoder_select="hpeldsp vp3dsp videodsp"
+vp4_decoder_select="vp3_decoder"
vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp vp56dsp"
vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp vp56dsp"
vp6a_decoder_select="vp6_decoder"
hwupload_cuda_filter_deps="ffnvcodec"
scale_npp_filter_deps="ffnvcodec libnpp"
-scale_cuda_filter_deps="cuda_sdk"
-thumbnail_cuda_filter_deps="cuda_sdk"
+scale_cuda_filter_deps="ffnvcodec"
+scale_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+thumbnail_cuda_filter_deps="ffnvcodec"
+thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
transpose_npp_filter_deps="ffnvcodec libnpp"
amf_deps_any="libdl LoadLibrary"
h264_mmal_decoder_deps="mmal"
h264_nvenc_encoder_deps="nvenc"
h264_omx_encoder_deps="omx"
-h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec"
+h264_qsv_decoder_select="h264_mp4toannexb_bsf qsvdec"
h264_qsv_encoder_select="qsvenc"
h264_rkmpp_decoder_deps="rkmpp"
h264_rkmpp_decoder_select="h264_mp4toannexb_bsf"
hevc_mediacodec_decoder_deps="mediacodec"
hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser"
hevc_nvenc_encoder_deps="nvenc"
-hevc_qsv_decoder_select="hevc_mp4toannexb_bsf hevc_parser qsvdec"
+hevc_qsv_decoder_select="hevc_mp4toannexb_bsf qsvdec"
hevc_qsv_encoder_select="hevcparse qsvenc"
hevc_rkmpp_decoder_deps="rkmpp"
hevc_rkmpp_decoder_select="hevc_mp4toannexb_bsf"
hevc_v4l2m2m_decoder_select="hevc_mp4toannexb_bsf"
hevc_v4l2m2m_encoder_deps="v4l2_m2m hevc_v4l2_m2m"
mjpeg_cuvid_decoder_deps="cuvid"
+mjpeg_qsv_decoder_select="qsvdec"
mjpeg_qsv_encoder_deps="libmfx"
mjpeg_qsv_encoder_select="qsvenc"
mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG"
mpeg2_cuvid_decoder_deps="cuvid"
mpeg2_mmal_decoder_deps="mmal"
mpeg2_mediacodec_decoder_deps="mediacodec"
-mpeg2_qsv_decoder_select="qsvdec mpegvideo_parser"
+mpeg2_qsv_decoder_select="qsvdec"
mpeg2_qsv_encoder_select="qsvenc"
mpeg2_vaapi_encoder_select="cbs_mpeg2 vaapi_encode"
mpeg2_v4l2m2m_decoder_deps="v4l2_m2m mpeg2_v4l2_m2m"
vc1_crystalhd_decoder_select="crystalhd"
vc1_cuvid_decoder_deps="cuvid"
vc1_mmal_decoder_deps="mmal"
-vc1_qsv_decoder_select="qsvdec vc1_parser"
+vc1_qsv_decoder_select="qsvdec"
vc1_v4l2m2m_decoder_deps="v4l2_m2m vc1_v4l2_m2m"
vp8_cuvid_decoder_deps="cuvid"
vp8_mediacodec_decoder_deps="mediacodec"
-vp8_qsv_decoder_select="qsvdec vp8_parser"
+vp8_qsv_decoder_select="qsvdec"
vp8_rkmpp_decoder_deps="rkmpp"
vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8"
vp8_vaapi_encoder_select="vaapi_encode"
vp8_v4l2m2m_encoder_deps="v4l2_m2m vp8_v4l2_m2m"
vp9_cuvid_decoder_deps="cuvid"
vp9_mediacodec_decoder_deps="mediacodec"
+vp9_qsv_decoder_select="qsvdec"
vp9_rkmpp_decoder_deps="rkmpp"
vp9_vaapi_encoder_deps="VAEncPictureParameterBufferVP9"
vp9_vaapi_encoder_select="vaapi_encode"
# bitstream_filters
aac_adtstoasc_bsf_select="adts_header"
+av1_frame_split_bsf_select="cbs_av1"
av1_metadata_bsf_select="cbs_av1"
eac3_core_bsf_select="ac3_parser"
filter_units_bsf_select="cbs"
mjpeg2jpeg_bsf_select="jpegtables"
mpeg2_metadata_bsf_select="cbs_mpeg2"
trace_headers_bsf_select="cbs"
-truehd_core_bsf_select="mlp_parser"
vp9_metadata_bsf_select="cbs_vp9"
# external libraries
libaom_av1_decoder_deps="libaom"
libaom_av1_encoder_deps="libaom"
libaom_av1_encoder_select="extract_extradata_bsf"
+libaribb24_decoder_deps="libaribb24"
libcelt_decoder_deps="libcelt"
libcodec2_decoder_deps="libcodec2"
libcodec2_encoder_deps="libcodec2"
decklink_outdev_deps="decklink threads"
decklink_outdev_suggest="libklvanc"
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"
fbdev_indev_deps="linux_fb_h"
afir_filter_select="fft"
amovie_filter_deps="avcodec avformat"
aresample_filter_deps="swresample"
+asr_filter_deps="pocketsphinx"
ass_filter_deps="libass"
atempo_filter_deps="avcodec"
atempo_filter_select="rdft"
boxblur_filter_deps="gpl"
boxblur_opencl_filter_deps="opencl gpl"
bs2b_filter_deps="libbs2b"
+colorkey_opencl_filter_deps="opencl"
colormatrix_filter_deps="gpl"
convolution_opencl_filter_deps="opencl"
convolve_filter_deps="avcodec"
deinterlace_vaapi_filter_deps="vaapi"
delogo_filter_deps="gpl"
denoise_vaapi_filter_deps="vaapi"
+derain_filter_select="dnn"
deshake_filter_select="pixelutils"
dilation_opencl_filter_deps="opencl"
drawtext_filter_deps="libfreetype"
minterpolate_filter_select="scene_sad"
mptestsrc_filter_deps="gpl"
negate_filter_deps="lut_filter"
+nlmeans_opencl_filter_deps="opencl"
nnedi_filter_deps="gpl"
ocr_filter_deps="libtesseract"
ocv_filter_deps="libopencv"
scale_vaapi_filter_deps="vaapi"
vpp_qsv_filter_deps="libmfx"
vpp_qsv_filter_select="qsvvpp"
-yadif_cuda_filter_deps="cuda_sdk"
+yadif_cuda_filter_deps="ffnvcodec"
+yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
# examples
avio_dir_cmd_deps="avformat avutil"
# programs
ffmpeg_deps="avcodec avfilter avformat"
ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
- null_filter
- trim_filter"
+ hflip_filter null_filter
+ transpose_filter trim_filter vflip_filter"
ffmpeg_suggest="ole32 psapi shell32"
ffplay_deps="avcodec avformat swscale swresample sdl2"
ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter"
objformat="elf32"
x86asmexe_default="nasm"
windres_default="windres"
-nvcc_default="nvcc"
-nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2"
striptype="direct"
# OS
# find source path
if test -f configure; then
source_path=.
+elif test -f src/configure; then
+ source_path=src
else
source_path=$(cd $(dirname "$0"); pwd)
case "$source_path" in
}
print_in_columns() {
- cols=$(expr $ncols / 24)
- cat | tr ' ' '\n' | sort | pr -r "-$cols" -w $ncols -t
+ tr ' ' '\n' | sort | tr '\r\n' ' ' | awk -v col_width=24 -v width="$ncols" '
+ {
+ num_cols = width > col_width ? int(width / col_width) : 1;
+ num_rows = int((NF + num_cols-1) / num_cols);
+ y = x = 1;
+ for (y = 1; y <= num_rows; y++) {
+ i = y;
+ for (x = 1; x <= num_cols; x++) {
+ if (i <= NF) {
+ line = sprintf("%s%-" col_width "s", line, $i);
+ }
+ i = i + num_rows;
+ }
+ print line; line = "";
+ }
+ }' | sed 's/ *$//'
}
show_list() {
name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
list=$(filter "$name" $list)
[ "$list" = "" ] && warn "Option $opt did not match anything"
+ test $action = enable && warn_if_gets_disabled $list
$action $list
;;
--enable-yasm|--disable-yasm)
# behaviour if the regexp was unable to match anything, since this
# successfully parses the version number of existing supported
# versions that require the converter (MSVC 2010 and 2012).
- cl_major_ver=$(cl 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
+ cl_major_ver=$(cl.exe 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
if [ -z "$cl_major_ver" ] || [ $cl_major_ver -ge 18 ]; then
- cc_default="cl"
- cxx_default="cl"
+ cc_default="cl.exe"
+ cxx_default="cl.exe"
else
die "Unsupported MSVC version (2013 or newer required)"
fi
ld_default="$source_path/compat/windows/mslink"
- nm_default="dumpbin -symbols"
- ar_default="lib"
+ nm_default="dumpbin.exe -symbols"
+ ar_default="lib.exe"
case "$arch" in
aarch64|arm64)
- as_default="armasm64"
+ as_default="armasm64.exe"
;;
arm*)
- as_default="armasm"
+ as_default="armasm.exe"
;;
esac
target_os_default="win32"
sysinclude_default="${sysroot}/usr/include"
+if enabled cuda_sdk; then
+ warn "Option --enable-cuda-sdk is deprecated. Use --enable-cuda-nvcc instead."
+ enable cuda_nvcc
+fi
+
+if enabled cuda_nvcc; then
+ nvcc_default="nvcc"
+ nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2"
+else
+ nvcc_default="clang"
+ nvccflags_default="--cuda-gpu-arch=sm_30 -O2"
+ NVCC_C=""
+fi
+
set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
target_exec x86asmexe nvcc
enabled cross_compile || host_cc_default=$cc
tmpfile TMPE $EXESUF
tmpfile TMPH .h
tmpfile TMPM .m
+tmpfile TMPCU .cu
tmpfile TMPO .o
tmpfile TMPS .S
tmpfile TMPSH .sh
mkdir "$link_dest"
$ln_s "$link_dest" "$link_name"
touch "$link_dest/test_file"
-if [ "$source_path" != "." ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
+if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
# create link to source path
[ -e src ] && rm src
$ln_s "$source_path" src
add_${pfx}cppflags -D__printf__=__gnu_printf__
test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
add_${pfx}cppflags -D_WIN32_WINNT=0x0600
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
elif test_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION" ||
test_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
eval ${pfx}libc_type=mingw32
add_${pfx}cppflags -D_WIN32_WINNT=0x0600
eval test \$${pfx_no_}cc_type = "gcc" &&
add_${pfx}cppflags -D__printf__=__gnu_printf__
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
elif test_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
eval ${pfx}libc_type=msvcrt
if test_${pfx}cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION < 14"; then
enabled mipsfpu && enabled msa && check_inline_asm_flags msa '"addvi.b $w0, $w1, 1"' '-mmsa' && check_headers msa.h || disable msa
enabled mipsdsp && check_inline_asm_flags mipsdsp '"addu.qb $t0, $t1, $t2"' '-mdsp'
enabled mipsdspr2 && check_inline_asm_flags mipsdspr2 '"absq_s.qb $t0, $t1"' '-mdspr2'
+ enabled msa && enabled msa2 && check_inline_asm_flags msa2 '"nxbits.any.b $w0, $w0"' '-mmsa2' && check_headers msa2.h || disable msa2
if enabled bigendian && enabled msa; then
disable msa
enabled videotoolbox && {
check_lib coreservices CoreServices/CoreServices.h UTGetOSTypeFromString "-framework CoreServices"
check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVC "-framework CoreMedia"
+ check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange "-framework CoreVideo"
+ check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ "-framework CoreVideo"
+ check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2100_HLG "-framework CoreVideo"
+ check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_Linear "-framework CoreVideo"
}
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
check_type "windows.h d3d11.h" "ID3D11VideoContext"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
-check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
-check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
-check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags
-check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
-check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
-check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8"
-check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9"
-
check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
+if [ -z "$nvccflags" ]; then
+ nvccflags=$nvccflags_default
+fi
+
+if enabled x86_64 || enabled ppc64 || enabled aarch64; then
+ nvccflags="$nvccflags -m64"
+else
+ nvccflags="$nvccflags -m32"
+fi
+
+if enabled cuda_nvcc; then
+ nvccflags="$nvccflags -ptx"
+else
+ nvccflags="$nvccflags -S -nocudalib -nocudainc --cuda-device-only -include ${source_link}/compat/cuda/cuda_runtime.h"
+ check_nvcc cuda_llvm
+fi
+
if ! disabled ffnvcodec; then
- check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.2" \
- "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" "" || \
- check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.2 ffnvcodec < 8.1" \
- "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""
+ ffnv_hdr_list="ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h"
+ check_pkg_config ffnvcodec "ffnvcodec >= 9.0.18.0" "$ffnv_hdr_list" "" || \
+ check_pkg_config ffnvcodec "ffnvcodec >= 8.2.15.8 ffnvcodec < 8.3" "$ffnv_hdr_list" "" || \
+ check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.9 ffnvcodec < 8.2" "$ffnv_hdr_list" "" || \
+ check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.9 ffnvcodec < 8.1" "$ffnv_hdr_list" ""
fi
check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)"
done
# these are off by default, so fail if requested and not available
-enabled cuda_sdk && require cuda_sdk cuda.h cuCtxCreate -lcuda
+enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
enabled decklink && { require_headers DeckLinkAPI.h &&
{ test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink API version must be >= 10.9.5."; } }
-enabled libndi_newtek && require_headers Processing.NDI.Lib.h
enabled frei0r && require_headers "frei0r.h dlfcn.h"
enabled gmp && require gmp gmp.h mpz_export -lgmp
enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa && require_headers "ladspa.h dlfcn.h"
enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version
+enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new ||
+ { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
+ die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; }
enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new
enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
enabled libass && require_pkg_config libass libass ass/ass.h ass_library_init
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
-enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.1.0" "dav1d/dav1d.h" dav1d_version
+enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.4.0" "dav1d/dav1d.h" dav1d_version
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
enabled libvpx && {
enabled libvpx_vp8_decoder && {
check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
- check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx ||
- die "ERROR: libvpx decoder version must be >=1.4.0";
+ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
}
enabled libvpx_vp8_encoder && {
check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx ||
- check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx ||
- die "ERROR: libvpx encoder version must be >=1.4.0";
+ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
}
enabled libvpx_vp9_decoder && {
check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
- check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs"
+ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
}
enabled libvpx_vp9_encoder && {
check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
- check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs"
+ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
}
if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
die "libvpx enabled but no supported decoders found"
check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl not found"; }
+enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create &&
{ enabled libdrm ||
fi
check_cpp_condition vaapi_1 "va/va.h" "VA_CHECK_VERSION(1, 0, 0)"
+
+ check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
+ check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
+ check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags
+ check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
+ check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
+ check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8"
+ check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9"
fi
if enabled_all opencl libdrm ; then
fi
if enabled_all opencl vaapi ; then
- enabled opencl_drm_beignet && enable opencl_vaapi_beignet
- check_type "CL/cl.h CL/va_ext.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
- enable opencl_vaapi_intel_media
+ if enabled opencl_drm_beignet ; then
+ enable opencl_vaapi_beignet
+ else
+ check_type "CL/cl.h CL/cl_va_api_media_sharing_intel.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
+ enable opencl_vaapi_intel_media
+ fi
fi
if enabled_all opencl dxva2 ; then
disable ffnvcodec cuvid nvdec nvenc
;;
esac
+elif enabled ppc64 && ! enabled bigendian; then
+ case $target_os in
+ linux)
+ ;;
+ *)
+ disable ffnvcodec cuvid nvdec nvenc
+ ;;
+ esac
else
disable ffnvcodec cuvid nvdec nvenc
fi
fi
fi
-if [ -z "$nvccflags" ]; then
- nvccflags=$nvccflags_default
-fi
-
-if enabled x86_64 || enabled ppc64 || enabled aarch64; then
- nvccflags="$nvccflags -m64"
-else
- nvccflags="$nvccflags -m32"
-fi
-
check_optflags(){
check_cflags "$@"
enabled lto && check_ldflags "$@"
echo "MIPS DSP R1 enabled ${mipsdsp-no}"
echo "MIPS DSP R2 enabled ${mipsdspr2-no}"
echo "MIPS MSA enabled ${msa-no}"
+ echo "MIPS MSA2 enabled ${msa2-no}"
echo "LOONGSON MMI enabled ${mmi-no}"
fi
if enabled ppc; then
fi # test "$quiet" != "yes"
+if test -n "$WARN_IF_GETS_DISABLED_LIST"; then
+ for cfg in $WARN_IF_GETS_DISABLED_LIST; do
+ if disabled $cfg; then
+ varname=${cfg}_disable_reason
+ eval "warn \"Disabled $cfg because \$$varname\""
+ fi
+ done
+fi
+
if test -n "$WARNINGS"; then
printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
enabled fatal_warnings && exit 1