diff options
author | Geoff Hill <geoff@geoffhill.org> | 2024-04-06 07:26:13 -0700 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2024-04-08 13:36:40 +0300 |
commit | ee1bc723de4cc7038cd414964471888e384de492 (patch) | |
tree | c7c0b2d04831294851af4f7833ecf3323a51367d /tests/checkasm/ac3dsp.c | |
parent | 42e88f18f30c275f52cea001b33ca62d8a3ff2d1 (diff) | |
download | ffmpeg-ee1bc723de4cc7038cd414964471888e384de492.tar.gz |
avcodec/ac3: Implement sum_square_butterfly_float 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.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/checkasm/ac3dsp.c b/tests/checkasm/ac3dsp.c index 573a76c764..442e965f3b 100644 --- a/tests/checkasm/ac3dsp.c +++ b/tests/checkasm/ac3dsp.c @@ -165,6 +165,31 @@ static void check_ac3_sum_square_butterfly_int32(AC3DSPContext *c) { report("ac3_sum_square_butterfly_int32"); } +static void check_ac3_sum_square_butterfly_float(AC3DSPContext *c) { + LOCAL_ALIGNED_32(float, lt, [ELEMS]); + LOCAL_ALIGNED_32(float, rt, [ELEMS]); + LOCAL_ALIGNED_16(float, v1, [4]); + LOCAL_ALIGNED_16(float, v2, [4]); + + declare_func(void, float[4], const float *, const float *, int); + + randomize_float(lt, ELEMS); + randomize_float(rt, ELEMS); + + if (check_func(c->sum_square_butterfly_float, + "ac3_sum_square_bufferfly_float")) { + call_ref(v1, lt, rt, ELEMS); + call_new(v2, lt, rt, ELEMS); + + if (!float_near_ulp_array(v1, v2, 10, 4)) + fail(); + + bench_new(v2, lt, rt, ELEMS); + } + + report("ac3_sum_square_butterfly_float"); +} + void checkasm_check_ac3dsp(void) { AC3DSPContext c; @@ -174,4 +199,5 @@ void checkasm_check_ac3dsp(void) check_ac3_extract_exponents(&c); check_float_to_fixed24(&c); check_ac3_sum_square_butterfly_int32(&c); + check_ac3_sum_square_butterfly_float(&c); } |