* [FFmpeg-devel] [PATCH 3/4] checkasm/rv34dsp: add rv34_idct_dc_add test
@ 2024-01-31 12:00 flow gg
2024-01-31 12:09 ` flow gg
0 siblings, 1 reply; 2+ messages in thread
From: flow gg @ 2024-01-31 12:00 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0003-checkasm-rv34dsp-add-rv34_idct_dc_add-test.patch --]
[-- Type: text/x-patch, Size: 1393 bytes --]
From 942fab5a2de6780c3b08c86fc457e9fbef3f9de3 Mon Sep 17 00:00:00 2001
From: sunyuechi <sunyuechi@iscas.ac.cn>
Date: Wed, 31 Jan 2024 19:01:25 +0800
Subject: [PATCH 3/4] checkasm/rv34dsp: add rv34_idct_dc_add test
---
tests/checkasm/rv34dsp.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/checkasm/rv34dsp.c b/tests/checkasm/rv34dsp.c
index 56167d2569..f4403b650f 100644
--- a/tests/checkasm/rv34dsp.c
+++ b/tests/checkasm/rv34dsp.c
@@ -56,10 +56,34 @@ static void test_rv34_inv_transform_dc(RV34DSPContext *s) {
report("rv34_inv_transform_dc");
}
+static void test_rv34_idct_dc_add_c(RV34DSPContext *s) {
+ declare_func(void, uint8_t *dst, ptrdiff_t stride, int dc);
+
+ if (check_func(s->rv34_idct_dc_add, "rv34_idct_dc_add")) {
+ LOCAL_ALIGNED_16(uint8_t, p1, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, p2, [BUF_SIZE]);
+
+ randomize(p1, BUF_SIZE);
+ memcpy(p2, p1, BUF_SIZE * sizeof(*p1));
+
+ call_ref(p1, 4, 5);
+ call_new(p2, 4, 5);
+
+ if (memcmp(p1, p2, BUF_SIZE * sizeof (*p1)) != 0) {
+ fail();
+ }
+
+ bench_new(p1, 4, 5);
+ }
+
+ report("rv34_idct_dc_add");
+}
+
void checkasm_check_rv34dsp(void)
{
RV34DSPContext s = { 0 };
ff_rv34dsp_init(&s);
test_rv34_inv_transform_dc(&s);
+ test_rv34_idct_dc_add_c(&s);
}
--
2.43.0
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] checkasm/rv34dsp: add rv34_idct_dc_add test
2024-01-31 12:00 [FFmpeg-devel] [PATCH 3/4] checkasm/rv34dsp: add rv34_idct_dc_add test flow gg
@ 2024-01-31 12:09 ` flow gg
0 siblings, 0 replies; 2+ messages in thread
From: flow gg @ 2024-01-31 12:09 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
The name was written incorrectly by mistake.. It has been corrected in this
response.
flow gg <hlefthleft@gmail.com> 于2024年1月31日周三 20:00写道:
>
>
[-- Attachment #2: 0003-checkasm-rv34dsp-add-rv34_idct_dc_add-test.patch --]
[-- Type: text/x-patch, Size: 1389 bytes --]
From 126f0b52cb8dd2f8fd5b881a4b166d1680562a0f Mon Sep 17 00:00:00 2001
From: sunyuechi <sunyuechi@iscas.ac.cn>
Date: Wed, 31 Jan 2024 19:01:25 +0800
Subject: [PATCH 3/4] checkasm/rv34dsp: add rv34_idct_dc_add test
---
tests/checkasm/rv34dsp.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/checkasm/rv34dsp.c b/tests/checkasm/rv34dsp.c
index 56167d2569..5382d5926b 100644
--- a/tests/checkasm/rv34dsp.c
+++ b/tests/checkasm/rv34dsp.c
@@ -56,10 +56,34 @@ static void test_rv34_inv_transform_dc(RV34DSPContext *s) {
report("rv34_inv_transform_dc");
}
+static void test_rv34_idct_dc_add(RV34DSPContext *s) {
+ declare_func(void, uint8_t *dst, ptrdiff_t stride, int dc);
+
+ if (check_func(s->rv34_idct_dc_add, "rv34_idct_dc_add")) {
+ LOCAL_ALIGNED_16(uint8_t, p1, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, p2, [BUF_SIZE]);
+
+ randomize(p1, BUF_SIZE);
+ memcpy(p2, p1, BUF_SIZE * sizeof(*p1));
+
+ call_ref(p1, 4, 5);
+ call_new(p2, 4, 5);
+
+ if (memcmp(p1, p2, BUF_SIZE * sizeof (*p1)) != 0) {
+ fail();
+ }
+
+ bench_new(p1, 4, 5);
+ }
+
+ report("rv34_idct_dc_add");
+}
+
void checkasm_check_rv34dsp(void)
{
RV34DSPContext s = { 0 };
ff_rv34dsp_init(&s);
test_rv34_inv_transform_dc(&s);
+ test_rv34_idct_dc_add(&s);
}
--
2.43.0
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-31 12:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 12:00 [FFmpeg-devel] [PATCH 3/4] checkasm/rv34dsp: add rv34_idct_dc_add test flow gg
2024-01-31 12:09 ` flow gg
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