From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 2/2] tests/checkasm/lpc: randomize buffer length Date: Thu, 22 Sep 2022 15:58:34 -0300 Message-ID: <20220922185834.5700-2-jamrial@gmail.com> (raw) In-Reply-To: <20220922185834.5700-1-jamrial@gmail.com> Simplifies the test, while trying more values and preventing pointlessly running benchmarks in a loop. Signed-off-by: James Almer <jamrial@gmail.com> --- tests/checkasm/lpc.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/tests/checkasm/lpc.c b/tests/checkasm/lpc.c index da5364def0..8528fd6e20 100644 --- a/tests/checkasm/lpc.c +++ b/tests/checkasm/lpc.c @@ -54,31 +54,18 @@ static void test_window(int len) void checkasm_check_lpc(void) { LPCContext ctx; + int len = rnd() % 5000; ff_lpc_init(&ctx, 32, 16, FF_LPC_TYPE_DEFAULT); if (check_func(ctx.lpc_apply_welch_window, "apply_welch_window_even")) { - for (int i = 0; i < 64; i += 2) - test_window(i); + test_window(len & ~1); } report("apply_welch_window_even"); if (check_func(ctx.lpc_apply_welch_window, "apply_welch_window_odd")) { - for (int i = 1; i < 64; i += 2) - test_window(i); + test_window(len | 1); } report("apply_welch_window_odd"); - if (check_func(ctx.lpc_apply_welch_window, "apply_welch_window_2560")) - test_window(2560); - report("apply_welch_window_2560"); - - if (check_func(ctx.lpc_apply_welch_window, "apply_welch_window_4096")) - test_window(4096); - report("apply_welch_window_4096"); - - if (check_func(ctx.lpc_apply_welch_window, "apply_welch_window_4097")) - test_window(4097); - report("apply_welch_window_4097"); - ff_lpc_end(&ctx); } -- 2.37.3 _______________________________________________ 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".
next prev parent reply other threads:[~2022-09-22 18:59 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-22 18:58 [FFmpeg-devel] [PATCH 1/2] avcodec/lpc: zero the middle odd sample in the output James Almer 2022-09-22 18:58 ` James Almer [this message] 2022-09-22 20:12 ` [FFmpeg-devel] [PATCH 3/3] x86/lpc: use fused negative multiply-add instructions where useful James Almer
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=20220922185834.5700-2-jamrial@gmail.com \ --to=jamrial@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