This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 934742548a3c3f34ceaef2116dda2810bacdf625 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Thu Jul 30 10:58:05 2026 +0200 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Mon Aug 3 09:20:39 2026 +0200 tests/checkasm/huffyuvencdsp: Avoid using static variable This has been done in order to use the same width for benchmarks of different instruction sets to make the benchmarks comparable. Yet it has a downside: Only one width would ever be executed when using --repeat. Luckily libcheckasm makes it easy to fix this: At the start of every test function, the internal state of rnd() is reset, so that it produces the same sequence of random values. So just removing the static variable works. This would also make this test trivially parallelizable. Signed-off-by: Andreas Rheinhardt <[email protected]> --- tests/checkasm/huffyuvencdsp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/checkasm/huffyuvencdsp.c b/tests/checkasm/huffyuvencdsp.c index b5d02cda6d..8f31172321 100644 --- a/tests/checkasm/huffyuvencdsp.c +++ b/tests/checkasm/huffyuvencdsp.c @@ -72,14 +72,8 @@ static void check_sub_hfyu_median_pred_int16(const char *aligned, unsigned width void checkasm_check_huffyuvencdsp(void) { - static unsigned width = 0; - - if (!width) { - width = rnd() % MAX_WIDTH; - width = width ? width : 1; - } - const size_t align = av_cpu_max_align(); + unsigned width = 1 + rnd() % MAX_WIDTH; check_sub_hfyu_median_pred_int16("_aligned", FFALIGN(width, align / sizeof(uint16_t))); report("sub_hfyu_median_pred_int16_aligned"); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
