[FFmpeg-devel] [PATCH v8 13/18] swscale/ops_backend: add reference backend basend on C templates

Niklas Haas ffmpeg at haasn.xyz
Mon Jul 14 11:49:01 EEST 2025


On Sun, 13 Jul 2025 22:14:44 +0200 Andreas Rheinhardt <andreas.rheinhardt at outlook.com> wrote:
> Niklas Haas:
> > From: Niklas Haas <git at haasn.dev>
> >
> > This will serve as a reference for the SIMD backends to come. That said,
> > with auto-vectorization enabled, the performance of this is not atrocious.
> > It easily beats the old C code and sometimes even the old SIMD.
> >
> > In theory, we can dramatically speed it up by using GCC vectors instead of
> > arrays, but the performance gains from this are too dependent on exact GCC
> > versions and flags, so it practice it's not a substitute for a SIMD
> > implementation.
> > ---
> > diff --git a/libswscale/ops.c b/libswscale/ops.c
> > index c4f03531eb..2d8f9e6084 100644
> > --- a/libswscale/ops.c
> > +++ b/libswscale/ops.c
> > @@ -27,7 +27,10 @@
> >  #include "ops.h"
> >  #include "ops_internal.h"
> >
> > +extern SwsOpBackend backend_c;
>
> Why are this and the other backends not const?

Fixed.

>
> > +
> >  const SwsOpBackend * const ff_sws_op_backends[] = {
> > +    &backend_c,
> >      NULL
> >  };
> >
> _______________________________________________
> 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".


More information about the ffmpeg-devel mailing list