[FFmpeg-devel] [PATCH 2/4] swscale/rgb2rgb: improve chroma conversion in ff_rgb24toyv12_c

Ramiro Polla ramiro.polla at gmail.com
Sat Sep 7 00:15:29 EEST 2024


On Tue, Sep 3, 2024 at 5:40 PM Ramiro Polla <ramiro.polla at gmail.com> wrote:
> On Wed, Aug 28, 2024 at 10:43 PM Ramiro Polla <ramiro.polla at gmail.com> wrote:
> >
> > The current code subsamples by dropping 3/4 pixels to calculate the
> > chroma components. This commit calculates the average of 4 rgb pixels
> > before calculating the chroma components, putting it in line with the
> > mmxext implementation.
> > ---
> >  libswscale/rgb2rgb_template.c | 88 ++++++++++++++++-------------------
> >  1 file changed, 41 insertions(+), 47 deletions(-)
>
> New patch attached removes another occurrence of the comment about
> chrominance data only being taken from every second line.
> It also flips the patch order so this is the first one in the patchset
> (and therefore checkasm doesn't fail on x86).
>
> I'll push the patchset in a couple of days if there are no more comments.

Pushed.


More information about the ffmpeg-devel mailing list