Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Tristan Matthews <tmatth@videolan.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Tristan Matthews <tmatth@videolan.org>
Subject: [FFmpeg-devel] [PATCH 1/2] checkasm: add checkasm_check_dctcoef
Date: Fri, 13 Jun 2025 10:04:45 -0400
Message-ID: <20250613140600.2875509-1-tmatth@videolan.org> (raw)
In-Reply-To: <e09c3e1c-f42d-2afc-aca6-6f1cd4790a8@martin.st>

This is useful for tests that compare dctcoefs which will be either 2 bytes or
4 bytes, depending on bitdepth.
---
 tests/checkasm/checkasm.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 146bfdec35..e829942d58 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -443,5 +443,16 @@ DECL_CHECKASM_CHECK_FUNC(int32_t);
 #define checkasm_check_pixel_padded_align(...) \
     checkasm_check_pixel2(__VA_ARGS__, 8)
 
+/* This assumes that there is a local variable named "bit_depth".
+ * For tests that don't have that and only operate on a single
+ * bitdepth, just call checkasm_check(uint8_t, ...) directly. */
+#define checkasm_check_dctcoef(buf1, stride1, buf2, stride2, ...) \
+    ((bit_depth > 8) ?                                        \
+     checkasm_check(int32_t, (const int32_t*)buf1, stride1,   \
+                             (const int32_t*)buf2, stride2,   \
+                             __VA_ARGS__) :                   \
+     checkasm_check(int16_t, (const int16_t*)buf1, stride1,   \
+                             (const int16_t*)buf2, stride2,   \
+                             __VA_ARGS__))
 
 #endif /* TESTS_CHECKASM_CHECKASM_H */
-- 
2.48.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2025-06-13 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 17:25 [FFmpeg-devel] [PATCH] checkasm: h264dsp: test luma_dc_dequant Tristan Matthews
2025-06-12 20:13 ` Martin Storsjö
2025-06-13  4:11   ` Tristan Matthews
2025-06-13  4:12     ` [FFmpeg-devel] [PATCH 1/1] " Tristan Matthews
2025-06-13  6:08     ` [FFmpeg-devel] [PATCH] " Martin Storsjö
2025-06-13 13:21       ` Tristan Matthews
2025-06-13 13:26         ` Martin Storsjö
2025-06-13 14:04           ` Tristan Matthews [this message]
2025-06-13 14:04             ` [FFmpeg-devel] [PATCH 2/2] " Tristan Matthews
2025-06-13 14:08               ` Martin Storsjö
2025-06-15 23:39                 ` Michael Niedermayer
2025-06-16  6:53                   ` Zhao Zhili
2025-06-16 13:58                     ` Michael Niedermayer

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=20250613140600.2875509-1-tmatth@videolan.org \
    --to=tmatth@videolan.org \
    --cc=ffmpeg-devel@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