ref: 7423ce59e5ac9aebf8ad6d87b268f62461f34afb
parent: a93b09e2417ed191d87788d0dbf8b09d053fd59f
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Fri Nov 17 11:59:45 EST 2023
Use celt_pitch_xcorr_avx2() when guaranteed No RTCD yet
--- a/celt/x86/pitch_avx.c
+++ b/celt/x86/pitch_avx.c
@@ -81,7 +81,7 @@
_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);
--- a/celt/x86/pitch_sse.h
+++ b/celt/x86/pitch_sse.h
@@ -187,6 +187,15 @@
#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
--
⑨