From: "Rémi Denis-Courmont" <remi@remlab.net> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] WIP: lavc/flacdsp: R-V Zvl256b lpc33 Date: Fri, 24 May 2024 23:05:24 +0300 Message-ID: <2730366.mvXUDI8C0e@basile.remlab.net> (raw) In-Reply-To: <20240524200440.37456-1-remi@remlab.net> Le perjantaina 24. toukokuuta 2024, 23.04.40 EEST Rémi Denis-Courmont a écrit : > flac_lpc_33_13_c: 499.7 > flac_lpc_33_13_rvv_i64: 197.7 > flac_lpc_33_16_c: 601.5 > flac_lpc_33_16_rvv_i64: 195.2 > flac_lpc_33_29_c: 1011.5 > flac_lpc_33_29_rvv_i64: 300.7 > flac_lpc_33_32_c: 1099.0 > flac_lpc_33_32_rvv_i64: 296.7 Ignore the "WIP: " in the subject. > --- > libavcodec/riscv/flacdsp_init.c | 7 +++++-- > libavcodec/riscv/flacdsp_rvv.S | 27 +++++++++++++++++++++++++++ > 2 files changed, 32 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/riscv/flacdsp_init.c > b/libavcodec/riscv/flacdsp_init.c index 830ae36534..861276be28 100644 > --- a/libavcodec/riscv/flacdsp_init.c > +++ b/libavcodec/riscv/flacdsp_init.c > @@ -31,6 +31,8 @@ void ff_flac_lpc32_rvv(int32_t *decoded, const int > coeffs[32], int pred_order, int qlevel, int len); > void ff_flac_lpc32_rvv_simple(int32_t *decoded, const int coeffs[32], > int pred_order, int qlevel, int len); > +void ff_flac_lpc33_rvv(int64_t *, const int32_t *, const int coeffs[32], > + int pred_order, int qlevel, int len); > void ff_flac_wasted32_rvv(int32_t *, int shift, int len); > void ff_flac_wasted33_rvv(int64_t *, const int32_t *, int shift, int len); > void ff_flac_decorrelate_indep2_16_rvv(uint8_t **out, int32_t **in, > @@ -76,9 +78,10 @@ av_cold void ff_flacdsp_init_riscv(FLACDSPContext *c, > enum AVSampleFormat fmt, > > # if (__riscv_xlen >= 64) > if (flags & AV_CPU_FLAG_RVV_I64) { > - if (vlenb > 16) > + if (vlenb > 16) { > c->lpc32 = ff_flac_lpc32_rvv_simple; > - else > + c->lpc33 = ff_flac_lpc33_rvv; > + } else > c->lpc32 = ff_flac_lpc32_rvv; > } > # endif > diff --git a/libavcodec/riscv/flacdsp_rvv.S b/libavcodec/riscv/flacdsp_rvv.S > index 0e10940f74..ea42f8bea4 100644 > --- a/libavcodec/riscv/flacdsp_rvv.S > +++ b/libavcodec/riscv/flacdsp_rvv.S > @@ -103,6 +103,33 @@ func ff_flac_lpc32_rvv_simple, zve64x, zbb > > ret > endfunc > + > +func ff_flac_lpc33_rvv, zve64x, zbb > + vtype_vli t0, a3, t1, e64, ta, ma > + vsetvl zero, a3, t0 > + vmv.s.x v0, zero > + sh2add a1, a3, a1 > + vle32.v v24, (a2) > + sub a5, a5, a3 > + vle64.v v16, (a0) > + sh3add a0, a3, a0 > + vsext.vf2 v8, v24 > +1: > + vmul.vv v24, v8, v16 > + lw t0, (a1) > + addi a1, a1, 4 > + vredsum.vs v24, v24, v0 > + addi a5, a5, -1 > + vmv.x.s t1, v24 > + sra t1, t1, a4 > + add t0, t0, t1 > + vslide1down.vx v16, v16, t0 > + sd t0, (a0) > + addi a0, a0, 8 > + bnez a5, 1b > + > + ret > +endfunc > #endif > > func ff_flac_wasted32_rvv, zve32x -- Rémi Denis-Courmont http://www.remlab.net/ _______________________________________________ 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".
prev parent reply other threads:[~2024-05-24 20:05 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-24 20:04 Rémi Denis-Courmont 2024-05-24 20:05 ` Rémi Denis-Courmont [this message]
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=2730366.mvXUDI8C0e@basile.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