aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/ac3dsp.c
diff options
context:
space:
mode:
authorGeoff Hill <geoff@geoffhill.org>2024-04-06 07:26:06 -0700
committerMartin Storsjö <martin@martin.st>2024-04-08 13:36:40 +0300
commit42e88f18f30c275f52cea001b33ca62d8a3ff2d1 (patch)
tree8e6a310b28be1590d02090c7963912cea44007ba /tests/checkasm/ac3dsp.c
parent69cb34f8859ed62fd1c46d3612912a334542fe28 (diff)
downloadffmpeg-42e88f18f30c275f52cea001b33ca62d8a3ff2d1.tar.gz
avcodec/ac3: Implement sum_square_butterfly_int32 for aarch64 NEON
Signed-off-by: Geoff Hill <geoff@geoffhill.org> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests/checkasm/ac3dsp.c')
-rw-r--r--tests/checkasm/ac3dsp.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/checkasm/ac3dsp.c b/tests/checkasm/ac3dsp.c
index dc1b169e68..573a76c764 100644
--- a/tests/checkasm/ac3dsp.c
+++ b/tests/checkasm/ac3dsp.c
@@ -139,6 +139,32 @@ static void check_float_to_fixed24(AC3DSPContext *c) {
report("float_to_fixed24");
}
+static void check_ac3_sum_square_butterfly_int32(AC3DSPContext *c) {
+#define ELEMS 240
+ LOCAL_ALIGNED_16(int32_t, lt, [ELEMS]);
+ LOCAL_ALIGNED_16(int32_t, rt, [ELEMS]);
+ LOCAL_ALIGNED_16(uint64_t, v1, [4]);
+ LOCAL_ALIGNED_16(uint64_t, v2, [4]);
+
+ declare_func(void, int64_t[4], const int32_t *, const int32_t *, int);
+
+ randomize_i24(lt, ELEMS);
+ randomize_i24(rt, ELEMS);
+
+ if (check_func(c->sum_square_butterfly_int32,
+ "ac3_sum_square_bufferfly_int32")) {
+ call_ref(v1, lt, rt, ELEMS);
+ call_new(v2, lt, rt, ELEMS);
+
+ if (memcmp(v1, v2, sizeof(int64_t[4])) != 0)
+ fail();
+
+ bench_new(v2, lt, rt, ELEMS);
+ }
+
+ report("ac3_sum_square_butterfly_int32");
+}
+
void checkasm_check_ac3dsp(void)
{
AC3DSPContext c;
@@ -147,4 +173,5 @@ void checkasm_check_ac3dsp(void)
check_ac3_exponent_min(&c);
check_ac3_extract_exponents(&c);
check_float_to_fixed24(&c);
+ check_ac3_sum_square_butterfly_int32(&c);
}