From: "Rémi Denis-Courmont" <remi@remlab.net>
To: ffmpeg-devel@ffmpeg.org
Cc: sunyuechi <sunyuechi@iscas.ac.cn>
Subject: Re: [FFmpeg-devel] [PATCH 02/10] lavc/vp8dsp: R-V V put_bilin_h
Date: Sat, 04 May 2024 21:06:32 +0300
Message-ID: <2767114.lVOpIxzWh6@basile.remlab.net> (raw)
In-Reply-To: <2269548.yX4BBXVblC@basile.remlab.net>
Le lauantaina 4. toukokuuta 2024, 21.02.25 EEST Rémi Denis-Courmont a écrit :
> Le lauantaina 4. toukokuuta 2024, 17.48.31 EEST uk7b@foxmail.com a écrit :
> > From: sunyuechi <sunyuechi@iscas.ac.cn>
> >
> > C908:
> > vp8_put_bilin4_h_c: 373.5
> > vp8_put_bilin4_h_rvv_i32: 158.7
> > vp8_put_bilin8_h_c: 1437.7
> > vp8_put_bilin8_h_rvv_i32: 318.7
> > vp8_put_bilin16_h_c: 2845.7
> > vp8_put_bilin16_h_rvv_i32: 374.7
> > ---
> >
> > libavcodec/riscv/vp8dsp_init.c | 11 +++++++
> > libavcodec/riscv/vp8dsp_rvv.S | 54 ++++++++++++++++++++++++++++++++++
> > 2 files changed, 65 insertions(+)
> >
> > diff --git a/libavcodec/riscv/vp8dsp_init.c
> > b/libavcodec/riscv/vp8dsp_init.c index c364de3dc9..32cb4893a4 100644
> > --- a/libavcodec/riscv/vp8dsp_init.c
> > +++ b/libavcodec/riscv/vp8dsp_init.c
> > @@ -34,6 +34,10 @@ VP8_EPEL(16, rvv);
> >
> > VP8_EPEL(8, rvv);
> > VP8_EPEL(4, rvv);
> >
> > +VP8_BILIN(16, rvv);
> > +VP8_BILIN(8, rvv);
> > +VP8_BILIN(4, rvv);
> > +
> >
> > av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c)
> > {
> > #if HAVE_RVV
> >
> > @@ -47,6 +51,13 @@ av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c)
> >
> > c->put_vp8_bilinear_pixels_tab[0][0][0] =
> > ff_put_vp8_pixels16_rvv;
> > c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_rvv;
> > c->put_vp8_bilinear_pixels_tab[2][0][0] = ff_put_vp8_pixels4_rvv;
> >
> > +
> > + c->put_vp8_bilinear_pixels_tab[0][0][1] =
> > ff_put_vp8_bilin16_h_rvv; +
> > c->put_vp8_bilinear_pixels_tab[0][0][2] =
> > ff_put_vp8_bilin16_h_rvv; + c->put_vp8_bilinear_pixels_tab[1][0][1]
> > = ff_put_vp8_bilin8_h_rvv; +
> > c->put_vp8_bilinear_pixels_tab[1][0][2]
> > = ff_put_vp8_bilin8_h_rvv; +
> > c->put_vp8_bilinear_pixels_tab[2][0][1]
> > = ff_put_vp8_bilin4_h_rvv; +
> > c->put_vp8_bilinear_pixels_tab[2][0][2]
> > = ff_put_vp8_bilin4_h_rvv; }
> >
> > #endif
> > }
> >
> > diff --git a/libavcodec/riscv/vp8dsp_rvv.S b/libavcodec/riscv/vp8dsp_rvv.S
> > index 063ab7110c..c8d265e516 100644
> > --- a/libavcodec/riscv/vp8dsp_rvv.S
> > +++ b/libavcodec/riscv/vp8dsp_rvv.S
> > @@ -98,3 +98,57 @@ func ff_put_vp8_pixels4_rvv, zve32x
> >
> > vsetivli zero, 4, e8, mf4, ta, ma
> > put_vp8_pixels
> >
> > endfunc
> >
> > +
> > +.macro bilin_h_load dst len
> > +.ifc \len,4
> > + vsetivli zero, 5, e8, mf2, ta, ma
> > +.elseif \len == 8
> > + vsetivli zero, 9, e8, m1, ta, ma
> > +.else
> > + vsetivli zero, 17, e8, m2, ta, ma
> > +.endif
>
> It might be worth defining a pseudo-instruction macro in asm.S that would
> statically compute the minimal LMUL from just the AVL and SEW. Then we don't
> to repeat these if blocks times and again, we can just do:
>
> vsetvlstatic \len + 1, e8
>
> or something like that
On second thought, concealing the LMUL from the programmer is perhaps not the
smartest idea, since it heavily constrains register allocation.
--
雷米‧德尼-库尔蒙
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".
next prev parent reply other threads:[~2024-05-04 18:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240504144840.2411603-1-uk7b@foxmail.com>
2024-05-04 14:48 ` uk7b
2024-05-04 18:02 ` Rémi Denis-Courmont
2024-05-04 18:06 ` Rémi Denis-Courmont [this message]
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 03/10] lavc/vp8dsp: R-V V put_bilin_v uk7b
2024-05-05 9:05 ` Rémi Denis-Courmont
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 04/10] lavc/vp8dsp: R-V V put_bilin_hv uk7b
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 05/10] lavc/vp8dsp: R-V V put_epel h uk7b
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 06/10] lavc/vp8dsp: R-V V put_epel v uk7b
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 07/10] lavc/vp8dsp: R-V V put_epel hv uk7b
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 08/10] lavc/vp8dsp: R-V V loop_filter_simple uk7b
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 09/10] lavc/vp8dsp: R-V V loop_filter_inner uk7b
2024-05-04 14:48 ` [FFmpeg-devel] [PATCH 10/10] lavc/vp8dsp: R-V V loop_filter uk7b
[not found] <20240505164536.872683-1-uk7b@foxmail.com>
2024-05-05 16:45 ` [FFmpeg-devel] [PATCH 02/10] lavc/vp8dsp: R-V V put_bilin_h uk7b
2024-05-05 19:06 ` Rémi Denis-Courmont
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=2767114.lVOpIxzWh6@basile.remlab.net \
--to=remi@remlab.net \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=sunyuechi@iscas.ac.cn \
/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