* [FFmpeg-devel] [PR] tests/checkasm/sw_ops: Switch to opaques for deciding when to test (PR #22309)
@ 2026-02-27 13:16 Martin Storsjö via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Martin Storsjö via ffmpeg-devel @ 2026-02-27 13:16 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Martin Storsjö
PR #22309 opened by Martin Storsjö (mstorsjo)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22309
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22309.patch
This uses the new mechanisms introduced in
cf7e2b67735d500768b06c6f411826bfef923b0f, as used by the crc test
in 0629ebb5ffda39add5f1fbce524bbc989ba5d6c6.
From 489ff8126a03fdaddf139f8bc582c28eada431ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Wed, 25 Feb 2026 15:45:23 +0200
Subject: [PATCH] tests/checkasm/sw_ops: Switch to opaques for deciding when to
test
This uses the new mechanisms introduced in
cf7e2b67735d500768b06c6f411826bfef923b0f, as used by the crc test
in 0629ebb5ffda39add5f1fbce524bbc989ba5d6c6.
---
tests/checkasm/sw_ops.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/tests/checkasm/sw_ops.c b/tests/checkasm/sw_ops.c
index bd70adc212..6615f63354 100644
--- a/tests/checkasm/sw_ops.c
+++ b/tests/checkasm/sw_ops.c
@@ -190,18 +190,14 @@ static void check_ops(const char *report, const unsigned ranges[NB_PLANES],
uintptr_t id = (uintptr_t) backend_new;
id ^= (id << 6) + (id >> 2) + 0x9e3779b97f4a7c15 + comp_new.cpu_flags;
- checkasm_save_context();
- if (checkasm_check_func((void *) id, "%s", report)) {
- func_new = comp_new.func;
- func_ref = comp_ref.func;
-
+ if (check_key((void*) id, "%s", report)) {
exec.block_size_in = comp_ref.block_size * rw_pixel_bits(read_op) >> 3;
exec.block_size_out = comp_ref.block_size * rw_pixel_bits(write_op) >> 3;
for (int i = 0; i < NB_PLANES; i++) {
exec.in[i] = (void *) src0[i];
exec.out[i] = (void *) dst0[i];
}
- call_ref(&exec, comp_ref.priv, 0, 0, PIXELS / comp_ref.block_size, LINES);
+ checkasm_call(comp_ref.func, &exec, comp_ref.priv, 0, 0, PIXELS / comp_ref.block_size, LINES);
exec.block_size_in = comp_new.block_size * rw_pixel_bits(read_op) >> 3;
exec.block_size_out = comp_new.block_size * rw_pixel_bits(write_op) >> 3;
@@ -209,7 +205,7 @@ static void check_ops(const char *report, const unsigned ranges[NB_PLANES],
exec.in[i] = (void *) src1[i];
exec.out[i] = (void *) dst1[i];
}
- call_new(&exec, comp_new.priv, 0, 0, PIXELS / comp_new.block_size, LINES);
+ checkasm_call_checked(comp_new.func, &exec, comp_new.priv, 0, 0, PIXELS / comp_new.block_size, LINES);
for (int i = 0; i < NB_PLANES; i++) {
const char *name = FMT("%s[%d]", report, i);
@@ -242,7 +238,7 @@ static void check_ops(const char *report, const unsigned ranges[NB_PLANES],
break;
}
- bench_new(&exec, comp_new.priv, 0, 0, PIXELS / comp_new.block_size, LINES);
+ bench(comp_new.func, &exec, comp_new.priv, 0, 0, PIXELS / comp_new.block_size, LINES);
}
if (comp_new.func != comp_ref.func && comp_new.free)
--
2.52.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-27 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-27 13:16 [FFmpeg-devel] [PR] tests/checkasm/sw_ops: Switch to opaques for deciding when to test (PR #22309) Martin Storsjö via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git