Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-11-18 00:59:45 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-11-18 00:59:45 +0300
commit7423ce59e5ac9aebf8ad6d87b268f62461f34afb (patch)
treed5b9fbc52ed8c22fdf1f81bc20f61f5e82755070
parenta93b09e2417ed191d87788d0dbf8b09d053fd59f (diff)
Use celt_pitch_xcorr_avx2() when guaranteed
No RTCD yet
-rw-r--r--celt/x86/pitch_avx.c2
-rw-r--r--celt/x86/pitch_sse.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/celt/x86/pitch_avx.c b/celt/x86/pitch_avx.c
index 63dea97f..7bb4ac18 100644
--- a/celt/x86/pitch_avx.c
+++ b/celt/x86/pitch_avx.c
@@ -81,7 +81,7 @@ static void xcorr_kernel_avx(const float *x, const float *y, float sum[8], int l
_mm256_storeu_ps(sum, xsum0);
}
-void celt_pitch_xcorr_avx(const float *_x, const float *_y, float *xcorr, int len, int max_pitch, int arch)
+void celt_pitch_xcorr_avx2(const float *_x, const float *_y, float *xcorr, int len, int max_pitch, int arch)
{
int i;
celt_assert(max_pitch>0);
diff --git a/celt/x86/pitch_sse.h b/celt/x86/pitch_sse.h
index 964aef50..5baae804 100644
--- a/celt/x86/pitch_sse.h
+++ b/celt/x86/pitch_sse.h
@@ -187,6 +187,15 @@ extern void (*const COMB_FILTER_CONST_IMPL[OPUS_ARCHMASK + 1])(
#define NON_STATIC_COMB_FILTER_CONST_C
#endif
-#endif
+
+#if defined(OPUS_X86_PRESUME_AVX2)
+
+void celt_pitch_xcorr_avx2(const float *_x, const float *_y, float *xcorr, int len, int max_pitch, int arch);
+#define OVERRIDE_PITCH_XCORR
+# define celt_pitch_xcorr celt_pitch_xcorr_avx2
+
+#endif /* OPUS_X86_PRESUME_AVX2 */
+
+#endif /* OPUS_X86_MAY_HAVE_SSE && !FIXED_POINT */
#endif