[FFmpeg-devel] [PATCH] lavc/vc1dsp: R-V V inv_trans

flow gg hlefthleft at gmail.com
Mon Dec 4 23:14:34 EET 2023


I found that in the case of nosplat, an additional vset can be removed, and
the time is basically the same, so I updated the patch.

Rémi Denis-Courmont <remi at remlab.net> 于2023年12月4日周一 23:15写道:

> Le maanantaina 4. joulukuuta 2023, 10.48.56 EET flow gg a écrit :
> > > Probably missing VLENB checks.
> >
> > Changed.
> >
> > > You can multiply by 3, 5 or 9 with shift-and-add. By 12 with
> shift-and-add
> > > then shift, and by 17 with shift then add. You don't need
> multiplications.
> >
> > Changed.
> >
> > > Do you really need to splat? Can't .vx or .wx be used instead?
> >
> > Okay, for example in ff_vc1_inv_trans_8x8_dc_rvv
> >
> > + vsetvli      zero, t0, e8, m2, ta, ma
> > + vwaddu.vx    v4, v0, zero
> > + vsetvli      zero, t0, e16, m4, ta, ma
> > + vadd.vx      v4, v4, t2
> > - vsetvli      zero, t0, e16, m4, ta, ma
> > - vmv.v.x      v4, t2
> > - vsetvli      zero, t0, e8, m2, ta, ma
> > - vwaddu.wv    v4, v4, v0
> >
> > But the speed has slowed down slightly on the c910,
> > I'm not sure if I should modify it.
>
> OK, unfortunately, there is no widening addition with wide scalar operand.
> But
> you can do zero-extension then addition here. In the end, I doubt that you
> can
> reasonably optimise whilst working with a C910-based board. This function
> deviates too much on non-conformant hardware.
>
> --
> レミ・デニ-クールモン
> http://www.remlab.net/
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lavc-vc1dsp-R-V-V-inv_trans_nosplat.patch
Type: text/x-patch
Size: 8988 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231205/cb98ec6e/attachment.bin>


More information about the ffmpeg-devel mailing list