From: "Martin Storsjö via ffmpeg-devel" <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: "Martin Storsjö" <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] tests/checkasm/sw_ops: Switch to opaques for deciding when to test (PR #22309)
Date: Fri, 27 Feb 2026 13:16:13 -0000
Message-ID: <177219817367.25.18331898683893478491@29965ddac10e> (raw)
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
reply other threads:[~2026-02-27 13:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=177219817367.25.18331898683893478491@29965ddac10e \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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