From 942fab5a2de6780c3b08c86fc457e9fbef3f9de3 Mon Sep 17 00:00:00 2001 From: sunyuechi <sunyue...@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
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".