PR #25987 opened by Baptiste Coudurier (bcoudurier) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25987 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25987.patch
`check_scene_sad()` halves the width for depths above 8 and checks `width * HEIGHT` samples, but the benchmark call passed `WIDTH`. For those depths that is twice the row size in bytes, so each row ran into the next and the last rows read past the randomized data into the uninitialized half of the buffers: the benchmark measured a different workload than the one checked. Pass `width`, as the `call_ref()` / `call_new()` calls do. Found while reviewing #25530. It touches the line next to the checkasm change in #25986, so whichever lands second needs a trivial rebase. Testing: `checkasm --test=scene_sad` and `--bench` run clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) From d5e6ac60fdbd937c8594e6457b198457988d2db8 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]
