Author: reimar Date: Thu Sep 1 15:21:18 2022 New Revision: 38401 Log: configure: update for latest FFmpeg. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Tue Aug 30 23:40:03 2022 (r38400) +++ trunk/configure Thu Sep 1 15:21:18 2022 (r38401) @@ -576,6 +576,7 @@ Miscellaneous options: --with-install=PATH path to a custom install program Advanced options: + --enable-openmp-simd enable code optimization via OpenMP SIMD [disabled] --enable-mmx enable MMX [autodetect] --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect] --enable-3dnow enable 3DNow! [autodetect] @@ -635,6 +636,7 @@ exit 0 # GOTCHA: the variables below defines the default behavior for autodetection # and have - unless stated otherwise - at least 2 states : yes no # If autodetection is available then the third state is: auto +openmp_simd=no _mmx=auto _3dnow=auto _3dnowext=auto @@ -1430,6 +1432,8 @@ for ac_option do --enable-win32dll) _win32dll=yes ;; --disable-win32dll) _win32dll=no ;; + --enable-openmp-simd) openmp_simd=yes ;; + --disable-openmp-simd) openmp_simd=no ;; --enable-sse) _sse=yes ;; --disable-sse) _sse=no ;; --enable-sse2) _sse2=yes ;; @@ -1592,8 +1596,8 @@ list_subparts_filters() { } echocheck "ffmpeg/libavcodec/allcodecs.c" -libavdecoders_all=$(list_subparts_extern FFCodec decoder codec/allcodecs.c) -libavencoders_all=$(list_subparts_extern FFCodec encoder codec/allcodecs.c) +libavdecoders_all=$(list_subparts_extern AVCodec decoder codec/allcodecs.c) +libavencoders_all=$(list_subparts_extern AVCodec encoder codec/allcodecs.c) libavparsers_all=$(list_subparts_extern AVCodecParser parser codec/parsers.c) test $? -eq 0 && _list_subparts=found || _list_subparts="not found" echores "$_list_subparts" @@ -1611,7 +1615,7 @@ test $? -eq 0 && _list_subparts=found || echores "$_list_subparts" echocheck "ffmpeg/libavcodec/bitsteram_filters.c" -libavbsfs_all=$(list_subparts_extern FFBitStreamFilter bsf codec/bitstream_filters.c) +libavbsfs_all=$(list_subparts_extern AVBitStreamFilter bsf codec/bitstream_filters.c) test $? -eq 0 && _list_subparts_extern=found || _list_subparts_extern="not found" echores "$_list_subparts_extern" @@ -5744,7 +5748,9 @@ inc_tmp="" ld_tmp="" def_sdl_sdl_h="#undef CONFIG_SDL_SDL_H" if test -z "$_sdlconfig" ; then - if ( sdl-config --version ) >>"$TMPLOG" 2>&1 ; then + if false && ( sdl2-config --version ) >>"$TMPLOG" 2>&1 ; then + _sdlconfig="sdl2-config" + elif ( sdl-config --version ) >>"$TMPLOG" 2>&1 ; then _sdlconfig="sdl-config" else _sdlconfig=false @@ -5854,7 +5860,11 @@ int main(int argc, char *argv[]) { HDC dc; wglCreateContext(dc); #elif defined(GL_SDL) +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_GL_SwapWindow(NULL); +#else SDL_GL_SwapBuffers(); +#endif #elif defined(GL_EGL_X11) || defined(GL_EGL_ANDROID) EGLDisplay eglDisplay = EGL_NO_DISPLAY; eglInitialize(eglDisplay, NULL, NULL); @@ -8273,6 +8283,46 @@ else fi fi +# Adding -fopenmp might interfere with some tests like pthread. +# Could also be worked around by adding -fopenmp to the linking +# step, but we'd like to avoid that. +echocheck "OpenMP SIMD" +if test "$openmp_simd" = auto || test "$openmp_simd" = yes; then + cat > $TMPC << EOF +#ifndef _OPENMP +#error _OPENMP is not defined +#endif +void test(unsigned char *c) +{ + _Pragma("omp simd") + for (int i = 0; i < 256; i++) + { + c[i] *= 16; + } +} +int main() +{ + return 0; +} +EOF + if cc_check -fopenmp ; then + CFLAGS="$CFLAGS -fopenmp" + openmp_simd="yes" + elif cc_check -Xpreprocessor -fopenmp ; then + CFLAGS="$CFLAGS -Xpreprocessor -fopenmp" + openmp_simd="yes" + else + test "$openmp_simd" = auto || die "Could not enable OpenMP SIMD support" + openmp_simd="no" + fi +fi +if test "$openmp_simd" = yes ; then + def_openmp_simd='#define HAVE_OPENMP_SIMD 1' +else + def_openmp_simd='#define HAVE_OPENMP_SIMD 0' +fi +echores "$openmp_simd" + ############################################################################# echocheck "automatic gdb attach" @@ -9509,6 +9559,7 @@ $def_x264_lavc $def_xvid_lavc /* system features */ +$def_openmp_simd $def_fast_64bit $def_fast_unaligned $def_gnu_as @@ -9594,6 +9645,7 @@ $def_openssl #define CONFIG_MEMORY_POISONING 0 #define CONFIG_POWERPC_PERF 0 #define CONFIG_MACOS_KPERF 0 +#define CONFIG_OSSFUZZ 0 /* For now prefer speed over avoiding potential invalid reads */ #define CONFIG_SAFE_BITSTREAM_READER 0 #define CONFIG_SHARED 0 @@ -9835,9 +9887,9 @@ print_enabled_filters(){ cp $TMPH ffmpeg/$file } -print_enabled_components libavcodec/codec_list.c FFCodec codec_list $libavdecoders $libavencoders +print_enabled_components libavcodec/codec_list.c AVCodec codec_list $libavdecoders $libavencoders print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $libavparsers -print_enabled_components libavcodec/bsf_list.c FFBitStreamFilter bitstream_filters $libavbsfs +print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $libavbsfs print_enabled_components libavdevice/indev_list.c AVInputFormat indev_list "" print_enabled_components libavdevice/outdev_list.c AVOutputFormat outdev_list "" print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $libavdemuxers
participants (1)
-
reimar