Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH 2/2] configure: Define HAVE_SIMD_ALIGN_32




On 2017-04-03 01:04 +0200, Alexander Strasser wrote:
> The define is used since FFmpeg commit 6c4665d.
> 
> Fixes part of ticket #2318

As was reported on the mentioned ticket, I forgot about x86 runtime
cpu detection.

Different patch to replace this one attached.


  Alexander

> Signed-off-by: Alexander Strasser <eclipse7@xxxxxxx>
> ---
>  configure | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index fff44f5f1..2a09e0b75 100755
> --- a/configure
> +++ b/configure
> @@ -869,6 +869,7 @@ def_stream_cache="#define CONFIG_STREAM_CACHE 1"
>  def_path_max_check="#define CONFIG_PATH_MAX_CHECK 0"
>  def_priority="#undef CONFIG_PRIORITY"
>  def_pthread_cache="#undef PTHREAD_CACHE"
> +def_simd_align_32='#define HAVE_SIMD_ALIGN_32 0'
>  shmem=no
>  
>  option_value(){
> @@ -2014,7 +2015,7 @@ EOF
>    extcheck $_ssse3    'ssse3'    'pabsd %%xmm0, %%xmm0'
>    extcheck $_sse4_1   'sse4_1'   'pmaxsb %%xmm0, %%xmm0'
>    extcheck $_sse4_2   'sse4_2'   'pcmpgtq %%xmm0, %%xmm0'
> -  extcheck $_avx      'avx'      'vpabsw %%xmm0, %%xmm0'
> +  extcheck $_avx      'avx'      'vpabsw %%xmm0, %%xmm0' && def_simd_align_32='#define HAVE_SIMD_ALIGN_32 1'
>    extcheck $_avx2     'avx2'     'vextracti128 $0, %%ymm0, %%xmm0'
>    extcheck $_xop      'xop'      'vpmacsdd %%xmm0, %%xmm1, %%xmm2, %%xmm3'
>    extcheck $_fma3     'fma3'     'vfmadd132ps %%ymm0, %%ymm1, %%ymm2'
> @@ -9342,6 +9343,7 @@ $def_openssl
>  #define HAVE_RDTSC 0
>  #define HAVE_SECTION_DATA_REL_RO 0
>  #define HAVE_SIMD_ALIGN_16 1
> +$def_simd_align_32
>  #define HAVE_STRERROR_R 0
>  #define HAVE_STRPTIME 0
>  #define HAVE_STRUCT_POLLFD 0
> -- 
> 2.11.0
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng@xxxxxxxxxxxx
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>From c804dcd4e8207748799c6258c12911792c69966e Mon Sep 17 00:00:00 2001
From: Alexander Strasser <eclipse7@xxxxxxx>
Date: Mon, 3 Apr 2017 00:00:27 +0200
Subject: [PATCH] configure: Define HAVE_SIMD_ALIGN_32

The define is used since FFmpeg commit 6c4665d.

Fixes part of ticket #2318
---
 configure | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure b/configure
index b583474..1f33570 100755
--- a/configure
+++ b/configure
@@ -869,6 +869,7 @@ def_stream_cache="#define CONFIG_STREAM_CACHE 1"
 def_path_max_check="#define CONFIG_PATH_MAX_CHECK 0"
 def_priority="#undef CONFIG_PRIORITY"
 def_pthread_cache="#undef PTHREAD_CACHE"
+def_simd_align_32='#define HAVE_SIMD_ALIGN_32 0'
 shmem=no
 
 option_value(){
@@ -2753,6 +2754,7 @@ if test "$_runtime_cpudetection" = yes ; then
   fi
 fi
 
+test "$_avx" != no && def_simd_align_32='#define HAVE_SIMD_ALIGN_32 1'
 
 # endian testing
 echocheck "byte order"
@@ -9342,6 +9344,7 @@ $def_openssl
 #define HAVE_RDTSC 0
 #define HAVE_SECTION_DATA_REL_RO 0
 #define HAVE_SIMD_ALIGN_16 1
+$def_simd_align_32
 #define HAVE_STRERROR_R 0
 #define HAVE_STRPTIME 0
 #define HAVE_STRUCT_POLLFD 0
-- 
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng