]> git.sesse.net Git - ffmpeg/blobdiff - configure
hwcontext_vaapi: Return all formats for constraints without config
[ffmpeg] / configure
index 2cd676a109ffd3c6eab4bcd4e5403c2852f65b26..1a58a4c2936b41b9dc53779600ce8b8b4d4b5423 100755 (executable)
--- a/configure
+++ b/configure
@@ -132,13 +132,6 @@ Component options:
   --disable-fft            disable FFT code
   --disable-faan           disable floating point AAN (I)DCT code
 
-Hardware accelerators:
-  --enable-d3d11va         enable D3D11VA code
-  --enable-dxva2           enable DXVA2 code
-  --enable-vaapi           enable VAAPI code
-  --enable-vda             enable VDA code
-  --enable-vdpau           enable VDPAU code
-
 Individual component options:
   --disable-everything     disable all components listed below
   --disable-encoder=NAME   disable encoder NAME
@@ -177,57 +170,79 @@ Individual component options:
   --disable-filters        disable all filters
 
 External library support:
-  --enable-avisynth        enable reading of AviSynth script files [no]
-  --enable-bzlib           enable bzlib [autodetect]
-  --enable-cuda            enable dynamically linked CUDA [no]
-  --enable-frei0r          enable frei0r video filtering
-  --enable-gnutls          enable gnutls [no]
-  --enable-libbs2b         enable bs2b DSP library [no]
-  --enable-libcdio         enable audio CD grabbing with libcdio
-  --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
-                           and libraw1394 [no]
-  --enable-libdcadec       enable DCA decoding via libdcadec [no]
-  --enable-libfaac         enable AAC encoding via libfaac [no]
-  --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
-  --enable-libfreetype     enable libfreetype [no]
-  --enable-libgsm          enable GSM de/encoding via libgsm [no]
-  --enable-libilbc         enable iLBC de/encoding via libilbc [no]
-  --enable-libkvazaar      enable HEVC encoding via libkvazaar [no]
-  --enable-libmfx          enable HW acceleration through libmfx
-  --enable-libmp3lame      enable MP3 encoding via libmp3lame [no]
-  --enable-libnpp          enable NVIDIA Performance Primitives-based code [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]
-  --enable-libopenh264     enable H.264 encoding via OpenH264 [no]
-  --enable-libopenjpeg     enable JPEG 2000 de/encoding via OpenJPEG [no]
-  --enable-libopus         enable Opus de/encoding via libopus [no]
-  --enable-libpulse        enable Pulseaudio input via libpulse [no]
-  --enable-librtmp         enable RTMP[E] support via librtmp [no]
-  --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
-  --enable-libsnappy       enable Snappy compression [no]
-  --enable-libspeex        enable Speex de/encoding via libspeex [no]
-  --enable-libtheora       enable Theora encoding via libtheora [no]
-  --enable-libtwolame      enable MP2 encoding via libtwolame [no]
-  --enable-libvo-aacenc    enable AAC encoding via libvo-aacenc [no]
-  --enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
-  --enable-libvorbis       enable Vorbis encoding via libvorbis [no]
-  --enable-libvpx          enable VP8 and VP9 de/encoding via libvpx [no]
-  --enable-libwavpack      enable wavpack encoding via libwavpack [no]
-  --enable-libwebp         enable WebP encoding via libwebp [no]
-  --enable-libx264         enable H.264 encoding via x264 [no]
-  --enable-libx265         enable HEVC encoding via x265 [no]
-  --enable-libxavs         enable AVS encoding via xavs [no]
-  --enable-libxcb          enable X11 grabbing using XCB [no]
-  --enable-libxcb-shm      enable X11 grabbing shm communication [auto]
-  --enable-libxcb-xfixes   enable X11 grabbing mouse rendering [auto]
-  --enable-libxvid         enable Xvid encoding via xvidcore,
-                           native MPEG-4/Xvid encoder exists [no]
-  --enable-mmal            enable decoding via MMAL [no]
-  --enable-nvenc           enable encoding via NVENC [no]
-  --enable-openssl         enable openssl [no]
-  --enable-x11grab         enable X11 grabbing (legacy) [no]
-  --enable-zlib            enable zlib [autodetect]
+
+  Using any of the following switches will allow Libav to link to the
+  corresponding external library. All the components depending on that library
+  will become enabled, if all their other dependencies are met and they are not
+  explicitly disabled. E.g. --enable-libwavpack will enable linking to
+  libwavpack and allow the libwavpack encoder to be built, unless it is
+  specifically disabled with --disable-encoder=libwavpack.
+
+  Note that only the system libraries are auto-detected. All the other external
+  libraries must be explicitly enabled.
+
+  Also note that the following help text describes the purpose of the libraries
+  themselves, not all their features will necessarily be usable by Libav.
+
+  --enable-avisynth          video frameserver
+  --enable-bzlib             bzip2 compression [autodetect]
+  --enable-frei0r            video filtering plugins
+  --enable-gnutls            crypto
+  --enable-libbs2b           Bauer stereophonic-to-binaural DSP
+  --enable-libcdio           audio CD input
+  --enable-libdc1394         IEEE 1394/Firewire camera input
+  --enable-libdcadec         DCA audio decoding
+  --enable-libfaac           AAC audio encoding
+  --enable-libfdk-aac        AAC audio encoding/decoding
+  --enable-libfontconfig     font configuration and management
+  --enable-libfreetype       font rendering
+  --enable-libgsm            GSM audio encoding/decoding
+  --enable-libilbc           ILBC audio encoding/decoding
+  --enable-libkvazaar        HEVC video encoding
+  --enable-libmp3lame        MP3 audio encoding
+  --enable-libopencore-amrnb AMR-NB audio encoding/decoding
+  --enable-libopencore-amrwb AMR-WB audio decoding
+  --enable-libopencv         computer vision
+  --enable-libopenh264       H.264 video encoding/decoding
+  --enable-libopenjpeg       JPEG 2000 image encoding/decoding
+  --enable-libopus           Opus audio encoding/decoding
+  --enable-libpulse          Pulseaudio sound server
+  --enable-librtmp           RTMP streaming
+  --enable-libschroedinger   Dirac video encoding/decoding
+  --enable-libsnappy         snappy compression
+  --enable-libspeex          Speex audio encoding/decoding
+  --enable-libtheora         Theora video encoding/decoding
+  --enable-libtwolame        MP2 audio encoding
+  --enable-libvo-aacenc      AAC audio encoding
+  --enable-libvo-amrwbenc    AMR-WB audio encoding
+  --enable-libvorbis         Vorbis audio encoding/decoding
+  --enable-libvpx            VP* video encoding/decoding
+  --enable-libwavpack        Wavpack audio encoding/decoding
+  --enable-libwebp           WebP image encoding/decoding
+  --enable-libx264           H.264 video encoding
+  --enable-libx265           HEVC video encoding
+  --enable-libxavs           Chinese AVS video encoding
+  --enable-libxcb            X window system protocol communication
+  --enable-libxcb-shm        X11 shm communication [auto]
+  --enable-libxcb-xfixes     X11 mouse rendering [auto]
+  --enable-libxvid           MPEG-4 ASP video encoding
+  --enable-openssl           crypto
+  --enable-x11grab           X11 grabbing through xlib (legacy, use xcb instead)
+  --enable-zlib              compression [autodetect]
+
+  The following libraries provide various hardware acceleration features:
+  --enable-cuda    Nvidia CUDA (dynamically linked)
+  --enable-d3d11va Microsoft Direct3D 11 video acceleration [auto]
+  --enable-dxva2   Microsoft DirectX 9 video acceleration [auto]
+  --enable-libmfx  Intel MediaSDK (AKA Quick Sync Video)
+  --enable-libnpp  Nvidia CUDA processing
+  --enable-mmal    Broadcom Multi-Media Abstraction Layer (Raspberry Pi)
+  --enable-nvenc   Nvidia video encoding
+  --enable-omx     OpenMAX IL
+  --enable-omx-rpi OpenMAX IL for Raspberry Pi
+  --enable-vaapi   Video Acceleration API (mainly Unix/Intel)
+  --enable-vda     Apple Video Decode Acceleration [auto]
+  --enable-vdpau   Nvidia Video Decode and Presentation API for Unix [auto]
 
 Toolchain options:
   --arch=ARCH              select architecture [$arch]
@@ -666,7 +681,7 @@ print_enabled(){
     suf=$1
     shift
     for v; do
-        enabled $v && printf "%s\n" ${v%$suf};
+        enabled $v && printf "%s\n" ${v%$suf}
     done
 }
 
@@ -1204,10 +1219,23 @@ EXAMPLE_LIST="
     transcode_aac_example
 "
 
+HWACCEL_LIBRARY_LIST="
+    cuda
+    d3d11va
+    dxva2
+    libmfx
+    libnpp
+    mmal
+    nvenc
+    omx
+    vaapi
+    vda
+    vdpau
+"
+
 EXTERNAL_LIBRARY_LIST="
     avisynth
     bzlib
-    cuda
     frei0r
     gnutls
     libbs2b
@@ -1221,9 +1249,7 @@ EXTERNAL_LIBRARY_LIST="
     libgsm
     libilbc
     libkvazaar
-    libmfx
     libmp3lame
-    libnpp
     libopencore_amrnb
     libopencore_amrwb
     libopencv
@@ -1250,8 +1276,6 @@ EXTERNAL_LIBRARY_LIST="
     libxcb_shm
     libxcb_xfixes
     libxvid
-    mmal
-    nvenc
     openssl
     x11grab
     zlib
@@ -1260,6 +1284,7 @@ EXTERNAL_LIBRARY_LIST="
 FEATURE_LIST="
     gray
     hardcoded_tables
+    omx_rpi
     runtime_cpudetect
     safe_bitstream_reader
     shared
@@ -1269,14 +1294,6 @@ FEATURE_LIST="
     swscale_alpha
 "
 
-HWACCEL_LIST="
-    d3d11va
-    dxva2
-    vaapi
-    vda
-    vdpau
-"
-
 LIBRARY_LIST="
     avcodec
     avdevice
@@ -1316,8 +1333,8 @@ CONFIG_LIST="
     $COMPONENT_LIST
     $EXAMPLE_LIST
     $EXTERNAL_LIBRARY_LIST
+    $HWACCEL_LIBRARY_LIST
     $FEATURE_LIST
-    $HWACCEL_LIST
     $LICENSE_LIST
     $LIBRARY_LIST
     $PROGRAM_LIST
@@ -1447,6 +1464,7 @@ BUILTIN_LIST="
     MemoryBarrier
     mm_empty
     rdtsc
+    sem_timedwait
     sync_val_compare_and_swap
 "
 HAVE_LIST_CMDLINE="
@@ -1467,6 +1485,7 @@ HEADERS_LIST="
     arpa_inet_h
     cdio_paranoia_h
     cdio_paranoia_paranoia_h
+    dispatch_dispatch_h
     dev_bktr_ioctl_bt848_h
     dev_bktr_ioctl_meteor_h
     dev_ic_bt8xx_h
@@ -1633,6 +1652,7 @@ HAVE_LIST="
     libc_msvcrt
     libdc1394_1
     libdc1394_2
+    MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
     sdl
     section_data_rel_ro
     threads
@@ -1874,11 +1894,6 @@ mpegaudio_select="mpegaudiodsp"
 mpegaudiodsp_select="dct"
 mpegvideo_select="blockdsp hpeldsp idctdsp me_cmp mpeg_er videodsp"
 mpegvideoenc_select="me_cmp mpegvideo pixblockdsp qpeldsp"
-nvenc_deps_any="dlopen LoadLibrary"
-nvenc_extralibs='$ldl'
-qsvdec_select="qsv"
-qsvenc_select="qsv"
-vaapi_encode_deps="vaapi"
 vc1dsp_select="h264chroma qpeldsp startcode"
 
 # decoders / encoders
@@ -1951,24 +1966,10 @@ h263i_decoder_select="h263_decoder"
 h263p_encoder_select="h263_encoder"
 h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel videodsp"
 h264_decoder_suggest="error_resilience"
-h264_nvenc_encoder_deps="nvenc"
-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"
-h264_vaapi_encoder_deps="VAEncPictureParameterBufferH264"
-h264_vaapi_encoder_select="vaapi_encode golomb"
 hap_decoder_select="snappy texturedsp"
 hap_encoder_deps="libsnappy"
 hap_encoder_select="texturedspenc"
 hevc_decoder_select="bswapdsp cabac golomb videodsp"
-hevc_nvenc_encoder_deps="nvenc"
-hevc_qsv_encoder_deps="libmfx"
-hevc_qsv_decoder_deps="libmfx"
-hevc_qsv_decoder_select="hevc_mp4toannexb_bsf hevc_parser qsvdec hevc_qsv_hwaccel"
-hevc_qsv_encoder_select="qsvenc"
-hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC"
-hevc_vaapi_encoder_select="vaapi_encode golomb"
 huffyuv_decoder_select="bswapdsp huffyuvdsp"
 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp"
 iac_decoder_select="imc_decoder"
@@ -1983,6 +1984,7 @@ jv_decoder_select="blockdsp"
 lagarith_decoder_select="huffyuvdsp"
 ljpeg_encoder_select="aandcttables idctdsp jpegtables"
 loco_decoder_select="golomb"
+magicyuv_decoder_select="huffyuvdsp"
 mdec_decoder_select="blockdsp idctdsp mpegvideo"
 metasound_decoder_select="lsp mdct sinewin"
 mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp"
@@ -2011,10 +2013,6 @@ mpeg1video_decoder_select="error_resilience mpeg_er mpegvideo"
 mpeg1video_encoder_select="aandcttables mpegvideoenc"
 mpeg2video_decoder_select="error_resilience mpeg_er mpegvideo"
 mpeg2video_encoder_select="aandcttables mpegvideoenc"
-mpeg2_qsv_decoder_deps="libmfx"
-mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel mpegvideo_parser"
-mpeg2_qsv_encoder_deps="libmfx"
-mpeg2_qsv_encoder_select="qsvenc"
 mpeg4_decoder_select="h263_decoder mpeg4video_parser"
 mpeg4_encoder_select="h263_encoder"
 msa1_decoder_select="mss34dsp"
@@ -2029,8 +2027,6 @@ mxpeg_decoder_select="mjpeg_decoder"
 nellymoser_decoder_select="mdct sinewin"
 nellymoser_encoder_select="audio_frame_queue mdct sinewin"
 nuv_decoder_select="idctdsp lzo"
-nvenc_h264_encoder_deps="nvenc"
-nvenc_hevc_encoder_deps="nvenc"
 on2avc_decoder_select="mdct"
 opus_decoder_deps="avresample"
 opus_decoder_select="imdct15"
@@ -2120,9 +2116,9 @@ h264_d3d11va_hwaccel_select="h264_decoder"
 h264_dxva2_hwaccel_deps="dxva2"
 h264_dxva2_hwaccel_select="h264_decoder"
 h264_mmal_decoder_deps="mmal"
+h264_mmal_decoder_select="mmal"
 h264_mmal_hwaccel_deps="mmal"
-h264_mmal_decoder_select="h264_decoder"
-h264_mmal_encoder_deps="mmal"
+h264_omx_encoder_deps="omx"
 h264_qsv_hwaccel_deps="libmfx"
 h264_vaapi_hwaccel_deps="vaapi"
 h264_vaapi_hwaccel_select="h264_decoder"
@@ -2145,11 +2141,15 @@ mpeg2_d3d11va_hwaccel_deps="d3d11va"
 mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
 mpeg2_dxva2_hwaccel_deps="dxva2"
 mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
+mpeg2_mmal_decoder_deps="mmal"
+mpeg2_mmal_decoder_select="mmal"
+mpeg2_mmal_hwaccel_deps="mmal"
 mpeg2_qsv_hwaccel_deps="libmfx"
 mpeg2_vaapi_hwaccel_deps="vaapi"
 mpeg2_vaapi_hwaccel_select="mpeg2video_decoder"
 mpeg2_vdpau_hwaccel_deps="vdpau"
 mpeg2_vdpau_hwaccel_select="mpeg2video_decoder"
+mpeg4_omx_encoder_deps="omx"
 mpeg4_vaapi_hwaccel_deps="vaapi"
 mpeg4_vaapi_hwaccel_select="mpeg4_decoder"
 mpeg4_vdpau_hwaccel_deps="vdpau"
@@ -2158,6 +2158,9 @@ vc1_d3d11va_hwaccel_deps="d3d11va"
 vc1_d3d11va_hwaccel_select="vc1_decoder"
 vc1_dxva2_hwaccel_deps="dxva2"
 vc1_dxva2_hwaccel_select="vc1_decoder"
+vc1_mmal_decoder_deps="mmal"
+vc1_mmal_decoder_select="mmal"
+vc1_mmal_hwaccel_deps="mmal"
 vc1_vaapi_hwaccel_deps="vaapi"
 vc1_vaapi_hwaccel_select="vc1_decoder"
 vc1_vdpau_hwaccel_deps="vdpau"
@@ -2167,8 +2170,43 @@ wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
 wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
 wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
 
+# hardware-accelerated codecs
+nvenc_deps_any="dlopen LoadLibrary"
+nvenc_extralibs='$ldl'
+omx_deps="dlopen pthreads"
+omx_extralibs='$ldl'
+qsvdec_select="qsv"
+qsvenc_select="qsv"
+vaapi_encode_deps="vaapi"
+
+hwupload_cuda_filter_deps="cuda"
+scale_npp_filter_deps="cuda libnpp"
+
+h264_nvenc_encoder_deps="nvenc"
+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"
+h264_vaapi_encoder_deps="VAEncPictureParameterBufferH264"
+h264_vaapi_encoder_select="vaapi_encode golomb"
+
+hevc_nvenc_encoder_deps="nvenc"
+hevc_qsv_decoder_deps="libmfx"
+hevc_qsv_encoder_deps="libmfx"
+hevc_qsv_decoder_select="hevc_mp4toannexb_bsf hevc_parser hevc_qsv_hwaccel qsvdec"
+hevc_qsv_encoder_select="qsvenc"
+hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC"
+hevc_vaapi_encoder_select="vaapi_encode golomb"
+mpeg2_qsv_decoder_deps="libmfx"
+mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel mpegvideo_parser"
+mpeg2_qsv_encoder_deps="libmfx"
+mpeg2_qsv_encoder_select="qsvenc"
+
+nvenc_h264_encoder_deps="nvenc"
+nvenc_hevc_encoder_deps="nvenc"
+
 # parsers
-h264_parser_select="h264_decoder"
+h264_parser_select="golomb h264dsp"
 hevc_parser_select="golomb"
 mpegvideo_parser_select="mpegvideo"
 mpeg4video_parser_select="error_resilience h263dsp mpegvideo qpeldsp"
@@ -2300,7 +2338,8 @@ bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr
 dv1394_indev_deps="dv1394"
 dv1394_indev_select="dv_demuxer"
 fbdev_indev_deps="linux_fb_h"
-jack_indev_deps="jack_jack_h pthreads"
+jack_indev_deps="jack_jack_h"
+jack_indev_deps_any="sem_timedwait dispatch_dispatch_h"
 libcdio_indev_deps="libcdio"
 libdc1394_indev_deps="libdc1394"
 oss_indev_deps_any="soundcard_h sys_soundcard_h"
@@ -2366,12 +2405,11 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_deps="frei0r dlopen"
 frei0r_src_filter_extralibs='$ldl'
 hqdn3d_filter_deps="gpl"
-hwupload_cuda_filter_deps="cuda"
 interlace_filter_deps="gpl"
 ocv_filter_deps="libopencv"
 resample_filter_deps="avresample"
 scale_filter_deps="swscale"
-scale_npp_filter_deps="cuda libnpp"
+scale_qsv_filter_deps="libmfx"
 scale_vaapi_filter_deps="vaapi VAProcPipelineParameterBuffer"
 
 # examples
@@ -2429,6 +2467,7 @@ objformat="elf"
 pkg_config_default=pkg-config
 ranlib="ranlib"
 strip="strip"
+version_script='--version-script'
 yasmexe="yasm"
 
 # machine
@@ -2470,6 +2509,7 @@ SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
 LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
 SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
 SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
+VERSION_SCRIPT_POSTPROCESS_CMD="cat"
 
 asflags_filter=echo
 cflags_filter=echo
@@ -3424,26 +3464,26 @@ elif enabled arm; then
     }
 
     probe_arm_arch() {
-        if   check_arm_arch 4;        then echo armv4;
-        elif check_arm_arch 4T;       then echo armv4t;
-        elif check_arm_arch 5;        then echo armv5;
-        elif check_arm_arch 5E;       then echo armv5e;
-        elif check_arm_arch 5T;       then echo armv5t;
-        elif check_arm_arch 5TE;      then echo armv5te;
-        elif check_arm_arch 5TEJ;     then echo armv5te;
-        elif check_arm_arch 6;        then echo armv6;
-        elif check_arm_arch 6J;       then echo armv6j;
-        elif check_arm_arch 6K;       then echo armv6k;
-        elif check_arm_arch 6Z;       then echo armv6z;
-        elif check_arm_arch 6ZK;      then echo armv6zk;
-        elif check_arm_arch 6T2;      then echo armv6t2;
-        elif check_arm_arch 7;        then echo armv7;
-        elif check_arm_arch 7A  7_A;  then echo armv7-a;
-        elif check_arm_arch 7S;       then echo armv7-a;
-        elif check_arm_arch 7R  7_R;  then echo armv7-r;
-        elif check_arm_arch 7M  7_M;  then echo armv7-m;
-        elif check_arm_arch 7EM 7E_M; then echo armv7-m;
-        elif check_arm_arch 8A  8_A;  then echo armv8-a;
+        if   check_arm_arch 4;        then echo armv4
+        elif check_arm_arch 4T;       then echo armv4t
+        elif check_arm_arch 5;        then echo armv5
+        elif check_arm_arch 5E;       then echo armv5e
+        elif check_arm_arch 5T;       then echo armv5t
+        elif check_arm_arch 5TE;      then echo armv5te
+        elif check_arm_arch 5TEJ;     then echo armv5te
+        elif check_arm_arch 6;        then echo armv6
+        elif check_arm_arch 6J;       then echo armv6j
+        elif check_arm_arch 6K;       then echo armv6k
+        elif check_arm_arch 6Z;       then echo armv6z
+        elif check_arm_arch 6ZK;      then echo armv6zk
+        elif check_arm_arch 6T2;      then echo armv6t2
+        elif check_arm_arch 7;        then echo armv7
+        elif check_arm_arch 7A  7_A;  then echo armv7-a
+        elif check_arm_arch 7S;       then echo armv7-a
+        elif check_arm_arch 7R  7_R;  then echo armv7-r
+        elif check_arm_arch 7M  7_M;  then echo armv7-m
+        elif check_arm_arch 7EM 7E_M; then echo armv7-m
+        elif check_arm_arch 8A  8_A;  then echo armv8-a
         fi
     }
 
@@ -3712,7 +3752,8 @@ case $target_os in
             echo "hwcap_1 = OVERRIDE;" > mapfile &&
             add_ldflags -Wl,-M,mapfile
         nm_default='nm -P -g'
-        SLIB_CREATE_DEF_CMD='$(Q)perl $(SRC_PATH)/compat/solaris/make_sunver.pl $$(filter %.ver,$$^) $(OBJS) | grep -v @ > $(SUBDIR)lib$(NAME).ver-sol2'
+        version_script='-M'
+        VERSION_SCRIPT_POSTPROCESS_CMD='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)'
         ;;
     netbsd)
         disable symver
@@ -3747,9 +3788,11 @@ case $target_os in
         enabled x86_64 && objformat="macho64"
         enabled_any pic shared ||
             { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
+        check_header dispatch/dispatch.h &&
+            add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
         ;;
     msys*)
-        die "Native MSYS builds are discouraged, please use the MINGW environment.";
+        die "Native MSYS builds are discouraged, please use the MINGW environment."
         ;;
     mingw32*|mingw64*)
         if test $target_os = "mingw32ce"; then
@@ -4020,7 +4063,7 @@ Specify --enable-static to build the static libraries or --enable-shared to
 build the shared libraries as well. To only build the shared libraries specify
 --disable-static in addition to --enable-shared.
 EOF
-    exit 1;
+    exit 1
 fi
 
 die_license_disabled() {
@@ -4038,7 +4081,6 @@ die_license_disabled nonfree cuda
 die_license_disabled nonfree libfaac
 die_license_disabled nonfree libfdk_aac
 die_license_disabled nonfree libnpp
-die_license_disabled nonfree nvenc
 die_license_disabled nonfree openssl
 
 die_license_disabled version3 libopencore_amrnb
@@ -4503,6 +4545,9 @@ if ! disabled pthreads && ! enabled w32threads; then
     fi
 fi
 
+enabled pthreads &&
+    check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)"
+
 disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
 disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
 
@@ -4595,6 +4640,13 @@ 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 mmal && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"
+enabled omx_rpi && enable omx
+enabled omx               && { check_header OMX_Core.h ||
+                                { ! enabled cross_compile && enabled omx_rpi && {
+                                    add_cflags -isystem/opt/vc/include/IL ; }
+                                check_header OMX_Core.h ; } ||
+                               die "ERROR: OpenMAX IL headers not found"; }
 enabled openssl           && { check_pkg_config openssl openssl/ssl.h SSL_library_init && {
                                add_cflags $openssl_cflags && add_extralibs $openssl_libs; }||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
@@ -4617,10 +4669,9 @@ if enabled libdc1394; then
 fi
 
 if enabled nvenc; then
-    enabled cuda || check_header cuda.h || die "ERROR: cuda.h not found.";
-    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";
+    check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."
+    check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" ||
+        die "ERROR: NVENC API version 5 or older is not supported"
 fi
 
 if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
@@ -4720,8 +4771,7 @@ enabled vdpau &&
     disable vdpau
 
 enabled vdpau && enabled xlib &&
-    check_func_headers "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau &&
-    prepend avconv_libs $($ldflags_filter "-lvdpau") &&
+    check_lib2 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau &&
     enable vdpau_x11
 
 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
@@ -4783,21 +4833,26 @@ enabled xmm_clobber_test &&
                   -Wl,--wrap,sws_scale ||
     disable xmm_clobber_test
 
-echo "X { local: *; };" > $TMPV
-if test_ldflags -Wl,--version-script,$TMPV; then
-    append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
-elif test_ldflags -Wl,-M,$TMPV; then
-    append SHFLAGS '-Wl,-M,\$(SUBDIR)lib\$(NAME).ver-sol2'
-fi
+check_ld <<EOF && enable proper_dce
+extern const int array[512];
+static inline int func(void) { return array[0]; }
+int main(void) { return 0; }
+EOF
 
-check_cc <<EOF && enable symver_asm_label
+if enabled proper_dce; then
+    echo "X { local: *; };" > $TMPV
+    if test_ldflags -Wl,${version_script},$TMPV; then
+        append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
+        check_cc <<EOF && enable symver_asm_label
 void ff_foo(void) __asm__ ("av_foo@VERSION");
 void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
 EOF
-    check_cc <<EOF && enable symver_gnu_asm
+        check_cc <<EOF && enable symver_gnu_asm
 __asm__(".symver ff_foo,av_foo@VERSION");
 void ff_foo(void) {}
 EOF
+    fi
+fi
 
 if [ -z "$optflags" ]; then
     if enabled small; then
@@ -5061,6 +5116,9 @@ echo
 echo "External libraries:"
 print_enabled '' $EXTERNAL_LIBRARY_LIST | print_3_columns
 echo
+echo "External libraries providing hardware acceleration:"
+print_enabled '' $HWACCEL_LIBRARY_LIST | print_3_columns
+echo
 
 echo "Libraries:"
 print_enabled '' $LIBRARY_LIST | print_3_columns
@@ -5195,6 +5253,7 @@ SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME}
 SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
 SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
 SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
+VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
 SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
 EOF
 
@@ -5272,6 +5331,23 @@ cp_if_changed $TMPH libavutil/avconfig.h
 
 test -n "$WARNINGS" && printf "\n$WARNINGS"
 
+# generate the lists of enabled components
+print_enabled_components(){
+    file=$1
+    struct_name=$2
+    name=$3
+    shift 3
+    echo "static const $struct_name *$name[] = {" > $TMPH
+    for c in $*; do
+        enabled $c && printf "    &ff_%s,\n" $c >> $TMPH
+    done
+    echo "    NULL };" >> $TMPH
+    cp_if_changed $TMPH $file
+}
+
+print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
+print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $PROTOCOL_LIST
+
 # build pkg-config files
 
 lib_version(){