Jonathan Lennox
2015-Nov-20 16:51 UTC
[opus] [PATCH] Fix x86 build if we presume SSE4.1 (and earlier), but not AVX.
--- celt/cpu_support.h | 3 ++- celt/x86/x86cpu.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/celt/cpu_support.h b/celt/cpu_support.h index 133abbf..68fc606 100644 --- a/celt/cpu_support.h +++ b/celt/cpu_support.h @@ -45,7 +45,8 @@ #elif (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ - (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) + (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ + (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) #include "x86/x86cpu.h" /* We currently support 5 x86 variants: diff --git a/celt/x86/x86cpu.c b/celt/x86/x86cpu.c index 1a73dd1..555a576 100644 --- a/celt/x86/x86cpu.c +++ b/celt/x86/x86cpu.c @@ -37,7 +37,8 @@ #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ - (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) + (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ + (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) #if defined(_MSC_VER) -- 2.4.9 (Apple Git-60)
Jean-Marc Valin
2015-Nov-23 03:25 UTC
[opus] [PATCH] Fix x86 build if we presume SSE4.1 (and earlier), but not AVX.
r+, merged. On 11/20/2015 11:51 AM, Jonathan Lennox wrote:> --- > celt/cpu_support.h | 3 ++- > celt/x86/x86cpu.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/celt/cpu_support.h b/celt/cpu_support.h > index 133abbf..68fc606 100644 > --- a/celt/cpu_support.h > +++ b/celt/cpu_support.h > @@ -45,7 +45,8 @@ > > #elif (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ > (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ > - (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) > + (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ > + (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) > > #include "x86/x86cpu.h" > /* We currently support 5 x86 variants: > diff --git a/celt/x86/x86cpu.c b/celt/x86/x86cpu.c > index 1a73dd1..555a576 100644 > --- a/celt/x86/x86cpu.c > +++ b/celt/x86/x86cpu.c > @@ -37,7 +37,8 @@ > > #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ > (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ > - (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) > + (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ > + (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) > > > #if defined(_MSC_VER) >