[MPlayer-dev-eng] Adapt config.h's generation with some ffmpeg's commits

Etienne Buira etienne.buira at free.fr
Mon Jan 1 17:38:53 EET 2018


On Mon, Jan 01, 2018 at 12:19:24AM -0500, Compn wrote:
> On Sat, 30 Dec 2017 22:12:28 +0100, Etienne Buira
> <etienne.buira at free.fr> wrote:
> 
> probably you can put CONFIG_LINUX_PERF in the block above it
> next to this line
> #define CONFIG_POWERPC_PERF 0

Hi, thanks for reviewing

Done, also removed unconditional define HAVE_MACH_MACH_TIME_H 0 i did
not notice at first.

Regards

-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 38010)
+++ configure	(working copy)
@@ -177,6 +177,17 @@
   compile_check $TMPC $@
 }
 
+statement_check_3headers() {
+  cat > $TMPC << EOF
+#include <$1>
+#include <$2>
+#include <$3>
+int main(void) { $4; return 0; }
+EOF
+  shift 4
+  compile_check $TMPC $@
+}
+
 yasm_check() {
   echo >> "$TMPLOG"
   cat "$TMPS" >> "$TMPLOG"
@@ -573,6 +584,7 @@
   --enable-sse42            enable SSE4.2 [autodetect]
   --enable-avx              enable AVX [autodetect]
   --enable-avx2             enable AVX2 [autodetect]
+  --enable-avx512           enable AVX512 [autodetect]
   --enable-xop              enable XOP [autodetect]
   --enable-fma3             enable FMA3 [autodetect]
   --enable-fma4             enable FMA4 [autodetect]
@@ -632,6 +644,7 @@
 _sse4_2=auto
 _avx=auto
 _avx2=auto
+_avx512f=auto
 _xop=auto
 _fma3=auto
 _fma4=auto
@@ -870,6 +883,7 @@
 def_priority="#undef CONFIG_PRIORITY"
 def_pthread_cache="#undef PTHREAD_CACHE"
 def_simd_align_32='#define HAVE_SIMD_ALIGN_32 0'
+def_simd_align_64='#define HAVE_SIMD_ALIGN_64 0'
 shmem=no
 
 option_value(){
@@ -1420,6 +1434,8 @@
   --disable-avx) _avx=no;;
   --enable-avx2) _avx2=yes;;
   --disable-avx2) _avx2=no;;
+  --enable-avx512) _avx512f=yes;;
+  --disable-avx512) _avx512f=no;;
   --enable-xop) _xop=yes;;
   --disable-xop) _xop=no;;
   --enable-fma3) _fma3=yes;;
@@ -2031,6 +2047,7 @@
   extcheck $_sse4_2   'sse4_2'   'pcmpgtq %%xmm0, %%xmm0'
   extcheck $_avx      'avx'      'vpabsw %%xmm0, %%xmm0'
   extcheck $_avx2     'avx2'     'vextracti128 $0, %%ymm0, %%xmm0'
+  extcheck $_avx512f  'avx512'   'vmovdqa32 %%zmm0, %%zmm1{k1}{z}'
   extcheck $_xop      'xop'      'vpmacsdd %%xmm0, %%xmm1, %%xmm2, %%xmm3'
   extcheck $_fma3     'fma3'     'vfmadd132ps %%ymm0, %%ymm1, %%ymm2'
   extcheck $_fma4     'fma4'     'vfmaddps %%ymm0, %%ymm1, %%ymm2, %%ymm3'
@@ -2056,6 +2073,7 @@
 def_fast_64bit='#define HAVE_FAST_64BIT 0'
 def_fast_unaligned='#define HAVE_FAST_UNALIGNED 0'
 def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 0'
+def_local_aligned='#define HAVE_LOCAL_ALIGNED 0'
 def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 0'
 def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 0'
 def_local_aligned_32='#define HAVE_LOCAL_ALIGNED_32 0'
@@ -2068,6 +2086,7 @@
   subarch='x86_32'
   def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
   def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 1'
+  def_local_aligned='#define HAVE_LOCAL_ALIGNED 1'
   def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 1'
   def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 1'
   def_local_aligned_32='#define HAVE_LOCAL_ALIGNED_32 1'
@@ -2323,6 +2342,7 @@
     subarch='x86_64'
     def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
     def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 1'
+    def_local_aligned='#define HAVE_LOCAL_ALIGNED 1'
     def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 1'
     def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 1'
     def_local_aligned_32='#define HAVE_LOCAL_ALIGNED_32 1'
@@ -2493,6 +2513,7 @@
     def_vsx='#define HAVE_VSX 0'
     def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
     def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 1'
+    def_local_aligned='#define HAVE_LOCAL_ALIGNED 1'
     def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 1'
     def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 1'
     def_local_aligned_32='#define HAVE_LOCAL_ALIGNED_32 1'
@@ -2769,6 +2790,9 @@
 fi
 
 test "$_avx" != no && def_simd_align_32='#define HAVE_SIMD_ALIGN_32 1'
+def_avx512='#define HAVE_AVX512 0'
+test "$_avx512f" == yes &&
+  { def_simd_align_64='#define HAVE_SIMD_ALIGN_64 1'; def_avx512='#define HAVE_AVX512 1'; }
 
 # endian testing
 echocheck "byte order"
@@ -3300,6 +3324,7 @@
 test "$_sse4_2"    = yes && cpuexts="SSE42 $cpuexts"
 test "$_avx"       = yes && cpuexts="AVX $cpuexts"
 test "$_avx2"      = yes && cpuexts="AVX2 $cpuexts"
+test "$_avx512"    = yes && cpuexts="AVX512 $cpuexts"
 test "$_xop"       = yes && cpuexts="XOP $cpuexts"
 test "$_fma3"      = yes && cpuexts="FMA3 $cpuexts"
 test "$_fma4"      = yes && cpuexts="FMA4 $cpuexts"
@@ -4518,7 +4543,64 @@
 fi
 echores "$_smb"
 
+echocheck "mach/mach_time.h"
+_mach_mach_time_h=no
+def_mach_mach_time_h='#define HAVE_MACH_MACH_TIME_H 0'
+header_check 'mach/mach_time.h' &&
+  { _mach_mach_time_h=yes; def_mach_mach_time_h='#define HAVE_MACH_MACH_TIME_H 1'; }
+echores "$_mach_mach_time_h"
 
+echocheck "mach_absolute_time()"
+_mach_absolute_time=no
+def_mach_absolute_time='#define HAVE_MACH_ABSOLUTE_TIME 0'
+cat > "$TMPC" << EOF
+$def_have_mach_mach_time_h
+#if HAVE_MACH_MACH_TIME_H
+#include <mach/mach_time.h>
+#endif
+int main(void) { mach_absolute_time(); return 0; }
+EOF
+compile_check "$TMPC" &&
+  { _mach_absolute_time=yes; def_mach_absolute_time='#define HAVE_MACH_ABSOLUTE_TIME 1'; }
+echores "$_mach_absolute_time"
+
+echocheck "dirent.h"
+_dirent_h=no
+def_dirent_h='#define HAVE_DIRENT_H 0'
+header_check 'dirent.h' &&
+  { _dirent_h=yes; def_dirent_h='#define HAVE_DIRENT_H 1'; }
+echores "$_dirent_h"
+
+echocheck "access()"
+_access=no
+def_access='#define HAVE_ACCESS 0'
+statement_check 'unistd.h' 'access("", 0)' &&
+  { _access=yes; def_access='#define HAVE_ACCESS 1'; }
+echores "$_access"
+
+echocheck "lstat()"
+_lstat=no
+def_lstat='#define HAVE_LSTAT 0'
+statement_check_3headers 'sys/types.h' 'sys/stat.h' 'unistd.h' 'lstat("", NULL)' &&
+  { _lstat=yes; def_lstat='#define HAVE_LSTAT 1'; }
+echores "$_lstat"
+
+echocheck "struct stat.st_mtim.tv_nsec"
+_struct_stat_st_mtim_tv_nsec=no
+def_struct_stat_st_mtim_tv_nsec='#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 0'
+statement_check 'sys/stat.h' 'struct stat ss; ss.st_mtim.tv_nsec = 0;' &&
+  { _struct_stat_st_mtim_tv_nsec=yes; def_struct_stat_st_mtim_tv_nsec='#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1'; }
+echores "$_struct_stat_st_mtim_tv_nsec"
+
+echocheck "fcntl()"
+_fcntl=no
+def_fcntl='#define HAVE_FCNTL 0'
+statement_check_broken 'unistd.h' 'fcntl.h' 'fcntl(0, 0)' &&
+  { _fcntl=yes; def_fcntl='#define HAVE_FCNTL 1'; }
+echores "$_fcntl"
+
+
+
 #########
 # VIDEO #
 #########
@@ -8948,10 +9030,12 @@
 /* system headers */
 $def_alloca_h
 $def_altivec_h
+$def_dirent_h
 $def_malloc_h
 $def_mman_h
 $def_mman_has_map_failed
 $def_soundcard_h
+$def_struct_stat_st_mtim_tv_nsec
 $def_sys_soundcard_h
 $def_sys_sysinfo_h
 $def_sys_videoio_h
@@ -8963,13 +9047,16 @@
 
 
 /* system functions */
+$def_access
 $def_gethostbyname2
 $def_gettimeofday
 $def_clock_gettime
+$def_fcntl
 $def_glob
 $def_gmtime_r
 $def_langinfo
 $def_localtime_r
+$def_lstat
 $def_map_memalign
 $def_memalign
 $def_nanosleep
@@ -9032,6 +9119,7 @@
 $(ff_config_enable "$cpuexts_all" "$cpuexts" "#" "HAVE")
 $(ff_config_enable "$cpuexts_all" "$cpuexts_external" "#" "HAVE" "_EXTERNAL")
 $(ff_config_enable "$cpuexts_all" "$cpuexts" "#" "HAVE" "_INLINE")
+$def_avx512
 
 
 /* Blu-ray/DVD/VCD/CD */
@@ -9290,9 +9378,11 @@
 $def_fast_unaligned
 $def_gnu_as
 $def_ibm_asm
+$def_local_aligned
 $def_local_aligned_8
 $def_local_aligned_16
 $def_local_aligned_32
+$def_mach_mach_time_h
 $def_os2threads
 $def_pic
 $def_pthreads
@@ -9336,6 +9426,7 @@
 $def_log10f
 $def_lrint
 $def_lrintf
+$def_mach_absolute_time
 $def_mkstemp
 $def_mmap
 $def_posix_memalign
@@ -9367,6 +9458,7 @@
 #define CONFIG_LIBMODPLUG 0
 #define CONFIG_LIBVORBIS 0
 #define CONFIG_MEMORY_POISONING 0
+#define CONFIG_LINUX_PERF 0
 #define CONFIG_POWERPC_PERF 0
 /* For now prefer speed over avoiding potential invalid reads */
 #define CONFIG_SAFE_BITSTREAM_READER 0
@@ -9394,7 +9486,6 @@
 #define HAVE_ISATTY 0
 #define HAVE_LDBRX 0
 #define HAVE_LIBC_MSVCRT 0
-#define HAVE_MACH_MACH_TIME_H 0
 #define HAVE_MAPVIEWOFFILE 0
 #define HAVE_MIPSDSP 0
 #define HAVE_MIPSDSPR1 0
@@ -9405,6 +9496,7 @@
 #define HAVE_SECTION_DATA_REL_RO 0
 #define HAVE_SIMD_ALIGN_16 1
 $def_simd_align_32
+$def_simd_align_64
 #define HAVE_STRERROR_R 0
 #define HAVE_STRPTIME 0
 #define HAVE_STRUCT_POLLFD 0


More information about the MPlayer-dev-eng mailing list