From: flow gg <hlefthleft@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH 1/2] checkasm/vc1dsp: add mspel_pixels test Date: Sat, 2 Mar 2024 20:05:42 +0800 Message-ID: <CAEa-L+uzHchDAWOfUgFx3rCNRNjV5j5Ni6xTHU6UC4_MkPsWDQ@mail.gmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 1 bytes --] [-- Attachment #2: 0001-checkasm-vc1dsp-add-mspel_pixels-test.patch --] [-- Type: text/x-patch, Size: 2040 bytes --] From efcb91959cb373145f2fc9fcbfcc6659610172cc Mon Sep 17 00:00:00 2001 From: sunyuechi <sunyuechi@iscas.ac.cn> Date: Fri, 1 Mar 2024 19:45:53 +0800 Subject: [PATCH 1/2] checkasm/vc1dsp: add mspel_pixels test --- tests/checkasm/vc1dsp.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/checkasm/vc1dsp.c b/tests/checkasm/vc1dsp.c index 570785776f..42e9c626e0 100644 --- a/tests/checkasm/vc1dsp.c +++ b/tests/checkasm/vc1dsp.c @@ -438,6 +438,40 @@ static void check_unescape(void) } } +static void check_mspel_pixels(void) +{ + LOCAL_ALIGNED_8(uint8_t, src0, [32 * 32]); + LOCAL_ALIGNED_8(uint8_t, src1, [32 * 32]); + LOCAL_ALIGNED_8(uint8_t, dst0, [32 * 32]); + LOCAL_ALIGNED_8(uint8_t, dst1, [32 * 32]); + + VC1DSPContext h; + + const test tests[] = { + VC1DSP_SIZED_TEST(put_vc1_mspel_pixels_tab[0][0], 16, 16) + VC1DSP_SIZED_TEST(put_vc1_mspel_pixels_tab[1][0], 8, 8) + VC1DSP_SIZED_TEST(avg_vc1_mspel_pixels_tab[0][0], 16, 16) + VC1DSP_SIZED_TEST(avg_vc1_mspel_pixels_tab[1][0], 8, 8) + }; + + ff_vc1dsp_init(&h); + + for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) { + void (*func)(uint8_t *, const uint8_t*, ptrdiff_t, int) = *(void **)((intptr_t) &h + tests[t].offset); + if (check_func(func, "vc1dsp.%s", tests[t].name)) { + declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, const uint8_t*, ptrdiff_t, int); + RANDOMIZE_BUFFER8(dst, 32 * 32); + RANDOMIZE_BUFFER8(src, 32 * 32); + call_ref(dst0, src0, 32, 0); + call_new(dst1, src1, 32, 0); + if (memcmp(dst0, dst1, 32 * 32)) { + fail(); + } + bench_new(dst1, src0, 32, 0); + } + } +} + void checkasm_check_vc1dsp(void) { check_inv_trans_inplace(); @@ -449,4 +483,7 @@ void checkasm_check_vc1dsp(void) check_unescape(); report("unescape_buffer"); + + check_mspel_pixels(); + report("mspel_pixels"); } -- 2.44.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".
reply other threads:[~2024-03-02 12:06 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=CAEa-L+uzHchDAWOfUgFx3rCNRNjV5j5Ni6xTHU6UC4_MkPsWDQ@mail.gmail.com \ --to=hlefthleft@gmail.com \ --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