[FFmpeg-devel] [PATCH 6/6] swscale/yuv2rgb/x86: remove mmx/mmxext yuv2rgb functions

Ramiro Polla ramiro.polla at gmail.com
Thu Jun 20 17:50:27 EEST 2024


On Mon, Jun 17, 2024 at 2:46 PM Ramiro Polla <ramiro.polla at gmail.com> wrote:
> On Mon, Jun 17, 2024 at 1:16 AM James Almer <jamrial at gmail.com> wrote:
> > On 6/16/2024 7:28 PM, Ramiro Polla wrote:
> > > These functions are either slower or barely faster than the C LUT
> > > yuv2rgb code.
> > > ---
> > >   libswscale/x86/yuv2rgb.c          | 51 -----------------
> > >   libswscale/x86/yuv2rgb_template.c |  4 --
> > >   libswscale/x86/yuv_2_rgb.asm      | 93 +------------------------------
> > >   3 files changed, 3 insertions(+), 145 deletions(-)
> > >
> > > diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
> > > index 6754062245..41dfa80f33 100644
> > > --- a/libswscale/x86/yuv2rgb.c
> > > +++ b/libswscale/x86/yuv2rgb.c
> > > @@ -41,25 +41,8 @@
> > >
> > >   #define DITHER1XBPP // only for MMX
> >
> > Shouldn't this be removed too?
>
> I think this #define can already be removed from everywhere. It seems
> to be unconditionally set in swscale_internal.h (I haven't tracked
> down since when this is the case).
>
> > > -//MMX versions
> > > -#if HAVE_MMX
> > > -#undef RENAME
> > > -#define COMPILE_TEMPLATE_MMX
> > > -#define RENAME(a) a ## _mmx
> > > -#include "yuv2rgb_template.c"
> > > -#undef COMPILE_TEMPLATE_MMX
> > > -#endif /* HAVE_MMX */
> > > -
> > > -// MMXEXT versions
> > > -#undef RENAME
> > > -#define COMPILE_TEMPLATE_MMXEXT
> > > -#define RENAME(a) a ## _mmxext
> > > -#include "yuv2rgb_template.c"
> > > -#undef COMPILE_TEMPLATE_MMXEXT
> > > -
> > >   //SSSE3 versions
> > >   #undef RENAME
> > > -#define COMPILE_TEMPLATE_SSSE3
> > >   #define RENAME(a) a ## _ssse3
> > >   #include "yuv2rgb_template.c"
> >
> > You could write a seventh patch that moves the template stuff back to
> > this file, now that SSSE3 is the only version. See commit 8b62fb231a78.
>
> Will do in the next version of this patchset.

I'll apply this patchset if there are no more comments, before
submitting more patches to deal with DITHER1XBPP and detemplatizing.


More information about the ffmpeg-devel mailing list