X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=0c907ff80553f48d3d5457e076077f28f1a4ebac;hb=e1ec9c7fb6ba57f0ce5e6f51703b09b9d550406c;hp=2e820cb910b06cc658e26ac39429f013a67c3b13;hpb=511638151102462627ad54e3dffb9aa9cc9afe5e;p=ffmpeg diff --git a/configure b/configure index 2e820cb910b..0c907ff8055 100755 --- a/configure +++ b/configure @@ -269,7 +269,7 @@ External library support: --disable-lzma disable lzma [autodetect] --enable-decklink enable Blackmagick DeckLink I/O support [no] --enable-mmal enable decoding via MMAL [no] - --enable-nvenc enable encoding via NVENC [no] + --enable-nvenc enable NVIDIA NVENC support [no] --enable-openal enable OpenAL 1.1 capture support [no] --enable-opencl enable OpenCL code --enable-opengl enable OpenGL rendering [no] @@ -1673,7 +1673,6 @@ HEADERS_LIST=" asm_types_h cdio_paranoia_h cdio_paranoia_paranoia_h - cuda_h dev_bktr_ioctl_bt848_h dev_bktr_ioctl_meteor_h dev_ic_bt8xx_h @@ -1772,7 +1771,6 @@ SYSTEM_FUNCS=" isatty jack_port_get_latency_range kbhit - LoadLibrary localtime_r lzo1x_999_compress mach_absolute_time @@ -2116,8 +2114,6 @@ mpegaudio_select="mpegaudiodsp" mpegaudiodsp_select="dct" mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp me_cmp videodsp" mpegvideoenc_select="me_cmp mpegvideo pixblockdsp qpeldsp" -nvenc_deps_any="dlopen LoadLibrary" -nvenc_extralibs='$ldl' qsvdec_select="qsv" qsvenc_select="qsv" @@ -2195,13 +2191,11 @@ h263p_decoder_select="h263_decoder" h263p_encoder_select="h263_encoder" h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel startcode videodsp" h264_decoder_suggest="error_resilience" -h264_nvenc_encoder_deps="nvenc cuda_h" h264_qsv_decoder_deps="libmfx" h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec h264_qsv_hwaccel" h264_qsv_encoder_deps="libmfx" h264_qsv_encoder_select="qsvenc" hevc_decoder_select="bswapdsp cabac golomb videodsp" -hevc_nvenc_encoder_deps="nvenc cuda_h" huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp" huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llviddsp" iac_decoder_select="imc_decoder" @@ -2334,7 +2328,7 @@ zmbv_encoder_select="zlib" # hardware accelerators crystalhd_deps="libcrystalhd_libcrystalhd_if_h" d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder" -dxva2_deps="dxva2api_h LPDIRECT3DSURFACE9" +dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode" vaapi_deps="va_va_h" vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore" @@ -2491,7 +2485,8 @@ libutvideo_decoder_deps="libutvideo" libutvideo_encoder_deps="libutvideo" libzvbi_teletext_decoder_deps="libzvbi" nvenc_encoder_deps="nvenc" -nvenc_h265_encoder_deps="nvenc" +nvenc_h264_encoder_deps="nvenc" +nvenc_hevc_encoder_deps="nvenc" # demuxers / muxers ac3_demuxer_select="ac3_parser" @@ -3601,9 +3596,6 @@ probe_cc(){ # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency # with MSVC which enables it by default. _cflags='-D_USE_MATH_DEFINES -FIstdlib.h -Dstrtoll=_strtoi64 -Qms0 -Qvec- -Qsimd- -GS -fp:precise' - if [ $pfx = hostcc ]; then - append _cflags -Dsnprintf=_snprintf - fi disable stripping elif $_cc 2>&1 | grep -q Microsoft; then _type=msvc @@ -3624,11 +3616,6 @@ probe_cc(){ _ld_path='-libpath:' _flags='-nologo' _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64' - if [ $pfx = hostcc ]; then - if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then - append _cflags -Dsnprintf=_snprintf - fi - fi disable stripping elif $_cc --version 2>/dev/null | grep -q ^cparser; then _type=cparser @@ -4046,6 +4033,9 @@ elif enabled ppc; then disable altivec disable dcbzl ;; + *) + disable vsx + ;; esac elif enabled sparc; then @@ -4443,6 +4433,16 @@ probe_libc(){ add_${pfx}cppflags -D__printf__=__gnu_printf__ elif check_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then eval ${pfx}libc_type=msvcrt + if check_${pfx}cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION < 14"; then + if [ "$pfx" = host_ ]; then + add_host_cppflags -Dsnprintf=_snprintf + else + add_compat strtod.o strtod=avpriv_strtod + add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \ + _snprintf=avpriv_snprintf \ + vsnprintf=avpriv_vsnprintf + fi + fi # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to # 0x601 by default unless something else is set by the user. # This can easily lead to us detecting functions only present @@ -4479,14 +4479,6 @@ case $libc_type in bionic) add_compat strtod.o strtod=avpriv_strtod ;; - msvcrt) - if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then - add_compat strtod.o strtod=avpriv_strtod - add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \ - _snprintf=avpriv_snprintf \ - vsnprintf=avpriv_vsnprintf - fi - ;; esac # hacks for compiler/libc/os combinations @@ -4943,6 +4935,8 @@ check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()" check_builtin MemoryBarrier windows.h "MemoryBarrier()" check_builtin sarestart signal.h "SA_RESTART" check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)" +check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)" +check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)" check_func_headers malloc.h _aligned_malloc && enable aligned_malloc check_func ${malloc_prefix}memalign && enable memalign @@ -4956,9 +4950,7 @@ check_func gethrtime check_func getopt check_func getrusage check_func gettimeofday -check_func gmtime_r check_func isatty -check_func localtime_r check_func mach_absolute_time check_func mkstemp check_func mmap @@ -4982,7 +4974,6 @@ check_func_headers windows.h CoTaskMemFree -lole32 check_func_headers windows.h GetProcessAffinityMask check_func_headers windows.h GetProcessTimes check_func_headers windows.h GetSystemTimeAsFileTime -check_func_headers windows.h LoadLibrary check_func_headers windows.h MapViewOfFile check_func_headers windows.h PeekNamedPipe check_func_headers windows.h SetConsoleTextAttribute @@ -4993,7 +4984,6 @@ check_func_headers glob.h glob enabled xlib && check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext -check_header cuda.h check_header direct.h check_header dlfcn.h check_header d3d11.h @@ -5029,7 +5019,7 @@ 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" -check_type d3d9.h LPDIRECT3DSURFACE9 +check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0600 if ! disabled w32threads && ! enabled pthreads; then check_func_headers "windows.h process.h" _beginthreadex && @@ -5181,6 +5171,10 @@ enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect check_lib interface/mmal/mmal.h mmal_port_connect ; } check_lib interface/mmal/mmal.h mmal_port_connect ; } || die "ERROR: mmal not found"; } +enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } && + { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" || + die "ERROR: NVENC API version 4 or older is not supported"; } && + { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; } enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || die "ERROR: openal not found"; } && @@ -5217,14 +5211,6 @@ if enabled libdc1394; then enable libdc1394_1; } || die "ERROR: No version of libdc1394 found " fi - -if enabled nvenc; then - check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; - check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" || - die "ERROR: NVENC API version 4 or older is not supported"; - { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; } -fi - if ! disabled sdl; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then