From: flow gg <hlefthleft@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 2/9] lavc/vp8dsp: R-V V put_bilin_h v
Date: Wed, 8 May 2024 00:07:46 +0800
Message-ID: <CAEa-L+sH50JyK0xrXhi0q93hSj=Vr2gJHvdnRU4A_CZxbkKriA@mail.gmail.com> (raw)
In-Reply-To: <2746443.mvXUDI8C0e@basile.remlab.net>
I didn't understand what you mean... What does judging whether the type is
'h' or 'v' have to do with the number?
Rémi Denis-Courmont <remi@remlab.net> 于2024年5月8日周三 00:00写道:
> Le maanantaina 6. toukokuuta 2024, 6.38.02 EEST uk7b@foxmail.com a écrit :
> > From: sunyuechi <sunyuechi@iscas.ac.cn>
> >
> > C908:
> > vp8_put_bilin4_h_c: 367.0
> > vp8_put_bilin4_h_rvv_i32: 137.7
> > vp8_put_bilin4_v_c: 377.0
> > vp8_put_bilin4_v_rvv_i32: 137.7
> > vp8_put_bilin8_h_c: 1431.0
> > vp8_put_bilin8_h_rvv_i32: 297.5
> > vp8_put_bilin8_v_c: 1449.0
> > vp8_put_bilin8_v_rvv_i32: 297.5
> > vp8_put_bilin16_h_c: 2839.0
> > vp8_put_bilin16_h_rvv_i32: 344.7
> > vp8_put_bilin16_v_c: 2857.0
> > vp8_put_bilin16_v_rvv_i32: 344.7
> > ---
> > libavcodec/riscv/vp8dsp_init.c | 21 +++++++++++++++
> > libavcodec/riscv/vp8dsp_rvv.S | 49 ++++++++++++++++++++++++++++++++++
> > 2 files changed, 70 insertions(+)
> >
> > diff --git a/libavcodec/riscv/vp8dsp_init.c
> b/libavcodec/riscv/vp8dsp_init.c
> > index fa3feeacf7..afffa6de2f 100644
> > --- a/libavcodec/riscv/vp8dsp_init.c
> > +++ b/libavcodec/riscv/vp8dsp_init.c
> > @@ -34,6 +34,10 @@ VP8_EPEL(16, rvi);
> > VP8_EPEL(8, rvi);
> > VP8_EPEL(4, rvi);
> >
> > +VP8_BILIN(16, rvv);
> > +VP8_BILIN(8, rvv);
> > +VP8_BILIN(4, rvv);
> > +
> > av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c)
> > {
> > #if HAVE_RV
> > @@ -48,6 +52,23 @@ av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c)
> > c->put_vp8_epel_pixels_tab[2][0][0] = ff_put_vp8_pixels4_rvi;
> > c->put_vp8_bilinear_pixels_tab[2][0][0] =
> ff_put_vp8_pixels4_rvi;
> > }
> > +#if HAVE_RVV
> > + if (flags & AV_CPU_FLAG_RVV_I32 && ff_get_rv_vlenb() >= 16) {
> > + 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; +
> > + c->put_vp8_bilinear_pixels_tab[0][1][0] =
> ff_put_vp8_bilin16_v_rvv;
> > + c->put_vp8_bilinear_pixels_tab[0][2][0] =
> > ff_put_vp8_bilin16_v_rvv; +
> c->put_vp8_bilinear_pixels_tab[1][1][0]
> > = ff_put_vp8_bilin8_v_rvv; +
> c->put_vp8_bilinear_pixels_tab[1][2][0]
> > = ff_put_vp8_bilin8_v_rvv; +
> c->put_vp8_bilinear_pixels_tab[2][1][0]
> > = ff_put_vp8_bilin4_v_rvv; +
> c->put_vp8_bilinear_pixels_tab[2][2][0]
> > = ff_put_vp8_bilin4_v_rvv; + }
> > +#endif
> > #endif
> > }
> >
> > diff --git a/libavcodec/riscv/vp8dsp_rvv.S
> b/libavcodec/riscv/vp8dsp_rvv.S
> > index 8a0773f964..9bf969d794 100644
> > --- a/libavcodec/riscv/vp8dsp_rvv.S
> > +++ b/libavcodec/riscv/vp8dsp_rvv.S
> > @@ -20,6 +20,18 @@
> >
> > #include "libavutil/riscv/asm.S"
> >
> > +.macro vsetvlstatic8 len
> > +.if \len <= 4
> > + vsetivli zero, \len, e8, mf4, ta, ma
> > +.elseif \len <= 8
> > + vsetivli zero, \len, e8, mf2, ta, ma
> > +.elseif \len <= 16
> > + vsetivli zero, \len, e8, m1, ta, ma
> > +.elseif \len <= 31
> > + vsetivli zero, \len, e8, m2, ta, ma
> > +.endif
> > +.endm
> > +
> > .macro vp8_idct_dc_add
> > vlse32.v v0, (a0), a2
> > lh a5, 0(a1)
> > @@ -71,3 +83,40 @@ func ff_vp8_idct_dc_add4uv_rvv, zve32x
> >
> > ret
> > endfunc
> > +
> > +.macro bilin_load dst len type mn
> > +.ifc \type,v
> > + add t5, a2, a3
> > +.elseif \type == h
>
> h is not a number so that's not a valid condition.
>
> > + addi t5, a2, 1
> > +.endif
> > + vle8.v \dst, (a2)
> > + vle8.v v2, (t5)
> > + vwmulu.vx v28, \dst, t1
> > + vwmaccu.vx v28, \mn, v2
> > + vwaddu.wx v24, v28, t4
> > + vnsra.wi \dst, v24, 3
> > +.endm
> > +
> > +.macro put_vp8_bilin_h_v len type mn
> > +func ff_put_vp8_bilin\len\()_\type\()_rvv, zve32x
> > + vsetvlstatic8 \len
> > + li t1, 8
> > + li t4, 4
> > + sub t1, t1, \mn
> > +1:
> > + addi a4, a4, -1
> > + bilin_load v0, \len, \type, \mn
> > + vse8.v v0, (a0)
> > + add a2, a2, a3
> > + add a0, a0, a1
> > + bnez a4, 1b
> > +
> > + ret
> > +endfunc
> > +.endm
> > +
> > +.irp len 16,8,4
> > +put_vp8_bilin_h_v \len h a5
> > +put_vp8_bilin_h_v \len v a6
> > +.endr
>
>
> --
> 雷米‧德尼-库尔蒙
> 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".
>
_______________________________________________
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-07 16:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240506033809.3790245-1-uk7b@foxmail.com>
2024-05-06 3:38 ` uk7b
2024-05-06 3:44 ` flow gg
2024-05-07 15:59 ` Rémi Denis-Courmont
2024-05-07 16:07 ` flow gg [this message]
2024-05-07 16:10 ` Rémi Denis-Courmont
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 3/9] lavc/vp8dsp: R-V V put_bilin_hv uk7b
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 4/9] lavc/vp8dsp: R-V V put_epel h uk7b
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 5/9] lavc/vp8dsp: R-V V put_epel v uk7b
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 6/9] lavc/vp8dsp: R-V V put_epel hv uk7b
2024-05-06 19:24 ` Rémi Denis-Courmont
2024-05-07 2:27 ` [FFmpeg-devel] [PATCH " uk7b
2024-05-07 2:31 ` [FFmpeg-devel] [PATCH v3 " flow gg
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 7/9] lavc/vp8dsp: R-V V loop_filter_simple uk7b
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 8/9] lavc/vp8dsp: R-V V loop_filter_inner uk7b
2024-05-06 3:38 ` [FFmpeg-devel] [PATCH v3 9/9] lavc/vp8dsp: R-V V loop_filter uk7b
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+sH50JyK0xrXhi0q93hSj=Vr2gJHvdnRU4A_CZxbkKriA@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