]> git.sesse.net Git - ffmpeg/blobdiff - configure
Add libx265 encoder
[ffmpeg] / configure
index 4c649063b2cccf555940d63c95a86bd2ffaae8f7..6d53530fda4ca3ab4b60cb61d6c8b03d64408f04 100755 (executable)
--- a/configure
+++ b/configure
@@ -244,13 +244,16 @@ External library support:
   --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-libxvid         enable Xvid encoding via xvidcore,
                            native MPEG-4/Xvid encoder exists [no]
   --enable-libzmq          enable message passing via libzmq [no]
   --enable-libzvbi         enable teletext support via libzvbi [no]
+  --enable-decklink        enable Blackmagick DeckLink output [no]
   --enable-openal          enable OpenAL 1.1 capture support [no]
   --enable-opencl          enable OpenCL code
+  --enable-opengl          enable OpenGL rendering [no]
   --enable-openssl         enable openssl [no]
   --enable-x11grab         enable X11 grabbing [no]
   --disable-zlib           disable zlib [autodetect]
@@ -319,6 +322,7 @@ Optimization options (experts only):
   --disable-sse4           disable SSE4 optimizations
   --disable-sse42          disable SSE4.2 optimizations
   --disable-avx            disable AVX optimizations
+  --disable-xop            disable XOP optimizations
   --disable-fma4           disable FMA4 optimizations
   --disable-avx2           disable AVX2 optimizations
   --disable-armv5te        disable armv5te optimizations
@@ -1240,6 +1244,7 @@ COMPONENT_LIST="
 "
 
 EXAMPLE_LIST="
+    avio_reading_example
     decoding_encoding_example
     demuxing_decoding_example
     filtering_audio_example
@@ -1256,6 +1261,7 @@ EXTERNAL_LIBRARY_LIST="
     avisynth
     bzlib
     crystalhd
+    decklink
     fontconfig
     frei0r
     gnutls
@@ -1305,12 +1311,14 @@ EXTERNAL_LIBRARY_LIST="
     libwavpack
     libwebp
     libx264
+    libx265
     libxavs
     libxvid
     libzmq
     libzvbi
     openal
     opencl
+    opengl
     openssl
     x11grab
     zlib
@@ -1446,6 +1454,7 @@ ARCH_EXT_LIST_X86='
     amd3dnowext
     avx
     avx2
+    xop
     fma4
     i686
     mmx
@@ -1554,6 +1563,7 @@ HAVE_LIST="
     dxva_h
     ebp_available
     ebx_available
+    ES2_gl_h
     fast_64bit
     fast_clz
     fast_cmov
@@ -1570,6 +1580,7 @@ HAVE_LIST="
     getservbyport
     gettimeofday
     glob
+    glXGetProcAddress
     gnu_as
     gnu_windres
     gsm_h
@@ -1603,6 +1614,7 @@ HAVE_LIST="
     mprotect
     nanosleep
     openjpeg_1_5_openjpeg_h
+    OpenGL_gl3_h
     PeekNamedPipe
     perl
     pod2man
@@ -1656,6 +1668,7 @@ HAVE_LIST="
     vdpau_x11
     vfp_args
     VirtualAlloc
+    wglGetProcAddress
     windows_h
     winsock2_h
     xform_asm
@@ -1814,6 +1827,7 @@ ssse3_deps="sse3"
 sse4_deps="ssse3"
 sse42_deps="sse4"
 avx_deps="sse42"
+xop_deps="avx"
 fma4_deps="avx"
 avx2_deps="avx"
 
@@ -1908,6 +1922,7 @@ ffv1_decoder_select="dsputil golomb rangecoder"
 ffv1_encoder_select="dsputil rangecoder"
 ffvhuff_decoder_select="dsputil llviddsp"
 ffvhuff_encoder_select="dsputil huffman llviddsp"
+fic_decoder_select="dsputil golomb"
 flac_decoder_select="golomb"
 flac_encoder_select="dsputil golomb lpc"
 flashsv_decoder_select="zlib"
@@ -1998,8 +2013,8 @@ shorten_decoder_select="golomb"
 sipr_decoder_select="lsp"
 snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder"
 snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rangecoder"
-sonic_decoder_select="golomb"
-sonic_encoder_select="golomb"
+sonic_decoder_select="golomb rangecoder"
+sonic_encoder_select="golomb rangecoder"
 sonic_ls_encoder_select="golomb"
 sp5x_decoder_select="dsputil hpeldsp exif"
 svq1_decoder_select="hpeldsp"
@@ -2176,6 +2191,7 @@ libwavpack_encoder_deps="libwavpack"
 libwebp_encoder_deps="libwebp"
 libx264_encoder_deps="libx264"
 libx264rgb_encoder_deps="libx264"
+libx265_encoder_deps="libx265"
 libxavs_encoder_deps="libxavs"
 libxvid_encoder_deps="libxvid"
 libutvideo_decoder_deps="libutvideo"
@@ -2241,6 +2257,7 @@ wav_demuxer_select="riffdec"
 wav_muxer_select="riffenc"
 webm_muxer_select="riffenc"
 wtv_demuxer_select="riffdec"
+wtv_muxer_select="riffenc"
 xmv_demuxer_select="riffdec"
 xwma_demuxer_select="riffdec"
 
@@ -2249,6 +2266,8 @@ alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
 alsa_outdev_deps="alsa_asoundlib_h"
 bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
 caca_outdev_deps="libcaca"
+decklink_outdev_deps="decklink pthreads"
+decklink_outdev_extralibs="-lstdc++"
 dshow_indev_deps="IBaseFilter"
 dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
 dv1394_indev_deps="dv1394"
@@ -2262,6 +2281,7 @@ libcdio_indev_deps="libcdio"
 libdc1394_indev_deps="libdc1394"
 libv4l2_indev_deps="libv4l2"
 openal_indev_deps="openal"
+opengl_outdev_deps="opengl"
 oss_indev_deps_any="soundcard_h sys_soundcard_h"
 oss_outdev_deps_any="soundcard_h sys_soundcard_h"
 pulse_indev_deps="libpulse"
@@ -2382,6 +2402,7 @@ tinterlace_pad_test_deps="tinterlace_filter"
 zmq_filter_deps="libzmq"
 
 # examples
+avio_reading="avformat avcodec avutil"
 decoding_encoding_example_deps="avcodec avutil"
 demuxing_decoding_example_deps="avcodec avformat avutil"
 filtering_audio_example_deps="avfilter avcodec avformat avutil"
@@ -3993,6 +4014,7 @@ die_license_disabled gpl libcdio
 die_license_disabled gpl libutvideo
 die_license_disabled gpl libvidstab
 die_license_disabled gpl libx264
+die_license_disabled gpl libx265
 die_license_disabled gpl libxavs
 die_license_disabled gpl libxvid
 die_license_disabled gpl libzvbi
@@ -4137,7 +4159,8 @@ elif enabled ppc; then
 
     enable local_aligned_8 local_aligned_16
 
-    check_inline_asm dcbzl     '"dcbzl 0, %0" :: "r"(0)'
+    [ $cpu != e500 -a $cpu != e500v2 ] &&
+     check_inline_asm dcbzl    '"dcbzl 0, %0" :: "r"(0)'
     check_inline_asm ibm_asm   '"add 0, 0, 0"'
     check_inline_asm ppc4xx    '"maclhw r10, r11, r12"'
     check_inline_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)'
@@ -4217,6 +4240,7 @@ EOF
         check_yasm "movbe ecx, [5]" && enable yasm ||
             die "yasm/nasm not found or too old. Use --disable-yasm for a crippled build."
         check_yasm "vextractf128 xmm0, ymm0, 0"      || disable avx_external avresample
+        check_yasm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
         check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
         check_yasm "CPU amdnop" && enable cpunop
     fi
@@ -4414,6 +4438,7 @@ done
 enabled avisynth          && { { check_lib2 "windows.h" LoadLibrary; } ||
                                { check_lib2 "dlfcn.h" dlopen -ldl; } ||
                                die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
+enabled decklink          && { check_header DeckLinkAPI.h || die "ERROR: DeckLinkAPI.h header not found"; }
 enabled fontconfig        && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
 enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
 enabled gnutls            && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
@@ -4427,9 +4452,7 @@ enabled libcelt           && require libcelt celt/celt.h celt_decode -lcelt0 &&
                                die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
 enabled libcaca           && require_pkg_config caca caca.h caca_create_canvas
 enabled libfaac           && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
-enabled libfdk_aac        && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
-                             { check_cpp_condition fdk-aac/aacenc_lib.h "AACENCODER_LIB_VL0 >= 3 && AACENCODER_LIB_VL1 >= 4 && AACENCODER_LIB_VL2 >= 12" ||
-                               die "ERROR: libfdk_aac must be installed and version must be >= 3.4.12."; }
+enabled libfdk_aac        && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
 flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
 enabled libflite          && require2 libflite "flite/flite.h" flite_init $flite_libs
 enabled libfreetype       && require_libfreetype
@@ -4481,6 +4504,9 @@ enabled libwebp           && require_pkg_config libwebp webp/encode.h WebPGetEnc
 enabled libx264           && require libx264 x264.h x264_encoder_encode -lx264 &&
                              { check_cpp_condition x264.h "X264_BUILD >= 118" ||
                                die "ERROR: libx264 must be installed and version must be >= 0.118."; }
+enabled libx265           && require_pkg_config x265 x265.h x265_encoder_encode &&
+                             { check_cpp_condition x265.h "X265_BUILD >= 5" ||
+                               die "ERROR: libx265 version must be >= 5."; }
 enabled libxavs           && require libxavs xavs.h xavs_encoder_encode -lxavs
 enabled libxvid           && require libxvid xvid.h xvid_global -lxvidcore
 enabled libzmq            && require_pkg_config libzmq zmq.h zmq_ctx_new
@@ -4498,6 +4524,12 @@ enabled opencl            && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl
                              { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
                                check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
                                die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
+enabled opengl            && { check_lib GL/glx.h glXGetProcAddress "-lGL" ||
+                               check_lib2 windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
+                               check_lib2 OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
+                               check_lib2 ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
+                               die "ERROR: opengl not found."
+                             }
 enabled openssl           && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                                check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
@@ -4795,6 +4827,18 @@ elif enabled_any msvc icl; then
     fi
 fi
 
+case $as_type in
+    clang)
+        add_asflags -Qunused-arguments
+    ;;
+esac
+
+case $ld_type in
+    clang)
+        check_ldflags -Qunused-arguments
+    ;;
+esac
+
 case $target_os in
     osf1)
         enabled ccc && add_ldflags '-Wl,-expect_unresolved,*'
@@ -4880,6 +4924,7 @@ if enabled x86; then
     echo "SSE enabled               ${sse-no}"
     echo "SSSE3 enabled             ${ssse3-no}"
     echo "AVX enabled               ${avx-no}"
+    echo "XOP enabled               ${xop-no}"
     echo "FMA4 enabled              ${fma4-no}"
     echo "i686 features enabled     ${i686-no}"
     echo "CMOV is fast              ${fast_cmov-no}"