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

Git pushed a commit to branch master
in repository ffmpeg.

commit dd8730cfe354b84d60b1d70ac36c5fe23425f9dc
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Tue Jul 28 17:11:29 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sun Aug 2 02:00:49 2026 +0200

    tests/checkasm/huffyuvdsp: Actually test masks
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 tests/checkasm/huffyuvdsp.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tests/checkasm/huffyuvdsp.c b/tests/checkasm/huffyuvdsp.c
index 5e6dad7ea7..0cee315c24 100644
--- a/tests/checkasm/huffyuvdsp.c
+++ b/tests/checkasm/huffyuvdsp.c
@@ -35,6 +35,15 @@
             buf[j] = rnd() & 0xFFFF;       \
     } while (0)
 
+#define randomize_buffer_mask(buf, width, mask)        \
+    do {                                               \
+        unsigned mask2 = mask | (mask << 16);          \
+        for (size_t i = 0; i < (width & ~1); i += 2)   \
+            AV_WN32A((buf) + i, rnd() & mask2);        \
+        if (width & 1)                                 \
+            buf[width - 1] = rnd() & mask;             \
+    } while (0)
+
 static void check_add_int16(HuffYUVDSPContext *c, unsigned mask, int width, 
const char * name)
 {
     if (!check_func(c->add_int16, "%s", name))
@@ -99,12 +108,15 @@ void checkasm_check_huffyuvdsp(void)
 
     ff_huffyuvdsp_init(&c, AV_PIX_FMT_YUV422P);
 
+    unsigned bps  = 9 + rnd() % 8;
+    unsigned mask = (1 << bps) - 1;
+
     /*! test width not multiple of mmsize */
-    check_add_int16(&c, 65535, width, "add_int16_rnd_width");
+    check_add_int16(&c, mask, width, "add_int16_rnd_width");
     report("add_int16_rnd_width");
 
     /*! test always with the same size (for perf test) */
-    check_add_int16(&c, 65535, 16*128, "add_int16_128");
+    check_add_int16(&c, mask, 16*128, "add_int16_128");
     report("add_int16_128");
 
     check_add_hfyu_left_pred_bgr32(&c);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to