This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 8c9e73143904edd3300da571eb0ae84d15a36bec
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Mon Aug 31 17:25:12 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Wed Sep 2 22:31:34 2026 +0200

    tests/checkasm/ac3dsp: Add test for compute_mantissa_size
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 tests/checkasm/ac3dsp.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/tests/checkasm/ac3dsp.c b/tests/checkasm/ac3dsp.c
index f49a5b2281..75a2b1d7ac 100644
--- a/tests/checkasm/ac3dsp.c
+++ b/tests/checkasm/ac3dsp.c
@@ -22,9 +22,9 @@
 #include <stdint.h>
 #include <string.h>
 
-#include "libavutil/mem.h"
 #include "libavutil/mem_internal.h"
 
+#include "libavcodec/ac3defs.h"
 #include "libavcodec/ac3dsp.h"
 
 #include "checkasm.h"
@@ -139,6 +139,29 @@ static void check_float_to_fixed24(AC3DSPContext *c) {
     report("float_to_fixed24");
 }
 
+static void check_compute_mantissa_size(AC3DSPContext *const c)
+{
+    declare_func(int, const uint16_t mant_cnt[6][16]);
+
+    if (!check_func(c->compute_mantissa_size, "compute_mantissa_size"))
+        return;
+
+    DECLARE_ALIGNED_16(uint16_t, mant_cnt)[AC3_MAX_BLOCKS][16];
+
+    // The maximum of a single value is 3*60 (max_bandwith_code) + 73 + 2
+    checkasm_randomize_mask16((uint16_t*)mant_cnt, AC3_MAX_BLOCKS*16, 0xFF);
+
+    int size_ref = call_ref(mant_cnt);
+    int size_new = call_new(mant_cnt);
+
+    if (size_ref != size_new)
+        fail();
+
+    bench_new(mant_cnt);
+
+    report("compute_mantissa_size");
+}
+
 static void check_ac3_sum_square_butterfly_int32(AC3DSPContext *c) {
 #define ELEMS 240
     LOCAL_ALIGNED_16(int32_t, lt, [ELEMS]);
@@ -198,6 +221,7 @@ void checkasm_check_ac3dsp(void)
     check_ac3_exponent_min(&c);
     check_ac3_extract_exponents(&c);
     check_float_to_fixed24(&c);
+    check_compute_mantissa_size(&c);
     check_ac3_sum_square_butterfly_int32(&c);
     check_ac3_sum_square_butterfly_float(&c);
 }

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to