Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH] checkasm/huffyuvdsp: test for add_hfyu_left_pred_bgr32
Date: Sun, 12 Nov 2023 15:42:02 +0200
Message-ID: <20231112134202.16832-1-remi@remlab.net> (raw)

---
 tests/checkasm/huffyuvdsp.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tests/checkasm/huffyuvdsp.c b/tests/checkasm/huffyuvdsp.c
index 6ba27e267f..a08f5a8391 100644
--- a/tests/checkasm/huffyuvdsp.c
+++ b/tests/checkasm/huffyuvdsp.c
@@ -64,6 +64,34 @@ static void check_add_int16(HuffYUVDSPContext *c, unsigned mask, int width, cons
     av_free(dst1);
 }
 
+static void check_add_hfyu_left_pred_bgr32(HuffYUVDSPContext *c)
+{
+#define BUF_SIZE 1080
+    uint8_t src[4 * BUF_SIZE], dst0[4 * BUF_SIZE], dst1[4 * BUF_SIZE];
+    uint8_t left[4], left0[4], left1[4];
+
+    declare_func(void, uint8_t *d, const uint8_t *s, intptr_t w, uint8_t *l);
+
+    randomize_buffers(src, sizeof (src));
+    randomize_buffers(left, sizeof (left));
+    memcpy(left0, left, sizeof (left));
+    memcpy(left1, left, sizeof (left));
+
+    if (check_func(c->add_hfyu_left_pred_bgr32, "add_hfyu_left_pred_bgr32")) {
+        call_ref(dst0, src, BUF_SIZE, left0);
+        call_new(dst1, src, BUF_SIZE, left1);
+
+        if (memcmp(dst0, dst1, sizeof (dst0)) != 0 ||
+            memcmp(left0, left1, sizeof (left0)) != 0) {
+            fail();
+        }
+
+        bench_new(dst1, src, BUF_SIZE, left);
+    }
+
+    report("add_hfyu_left_pred_bgr32");
+}
+
 void checkasm_check_huffyuvdsp(void)
 {
     HuffYUVDSPContext c;
@@ -78,4 +106,6 @@ void checkasm_check_huffyuvdsp(void)
     /*! test always with the same size (for perf test) */
     check_add_int16(&c, 65535, 16*128, "add_int16_128");
     report("add_int16_128");
+
+    check_add_hfyu_left_pred_bgr32(&c);
 }
-- 
2.42.0

_______________________________________________
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:[~2023-11-12 13:42 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=20231112134202.16832-1-remi@remlab.net \
    --to=remi@remlab.net \
    --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