PR #25950 opened by Baptiste Coudurier (bcoudurier)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25950
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25950.patch

`check_scene_sad()` halves the width for depths above 8, so that a row of 
16-bit samples fits in the stride, and randomizes and checks `width * HEIGHT` 
samples. The benchmark call passed `WIDTH` instead, which for these depths is 
twice the row size in bytes: each row ran into the next one, and the last rows 
read past the randomized data into the uninitialized second half of the 
buffers. The benchmark thus measured a different workload than the one checked.

Pass `width`, as the `call_ref()` and `call_new()` calls do.

🤖 Generated with [Claude Code](https://claude.com/claude-code)



From 59090abadff4989da9c9c95c0077e6787e9e1f14 Mon Sep 17 00:00:00 2001
From: Baptiste Coudurier <[email protected]>
Date: Wed, 11 Nov 2026 12:05:58 -0800
Subject: [PATCH] tests/checkasm/scene_sad: benchmark the width that is tested

check_scene_sad() halves the width for depths above 8, so that a row
of 16-bit samples fits in the stride, and randomizes and checks
width * HEIGHT samples. The benchmark call passed WIDTH instead, which
for these depths is twice the row size in bytes: each row ran into the
next one, and the last rows read past the randomized data into the
uninitialized second half of the buffers. The benchmark thus measured
a different workload than the one checked.

Pass width, as the call_ref() and call_new() calls do.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
---
 tests/checkasm/scene_sad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/checkasm/scene_sad.c b/tests/checkasm/scene_sad.c
index bc33c428c63..b15df3087cb 100644
--- a/tests/checkasm/scene_sad.c
+++ b/tests/checkasm/scene_sad.c
@@ -59,7 +59,7 @@ static void check_scene_sad(int depth)
                     depth, (unsigned long long) sum1, (unsigned long long) 
sum2);
             fail();
         }
-        bench_new(src1, STRIDE, src2, STRIDE, WIDTH, HEIGHT, &sum2);
+        bench_new(src1, STRIDE, src2, STRIDE, width, HEIGHT, &sum2);
     }
 }
 
-- 
2.54.0

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

Reply via email to