[FFmpeg-devel] [PATCH 10/17] swscale/ops_backend: add reference backend basend on C templates
Michael Niedermayer
michael at niedermayer.cc
Fri May 2 18:06:27 EEST 2025
On Sat, Apr 26, 2025 at 07:41:14PM +0200, Niklas Haas wrote:
> 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, and
> can often beat 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.
> ---
> libswscale/Makefile | 6 +
> libswscale/ops.c | 3 +
> libswscale/ops.h | 2 -
> libswscale/ops_backend.c | 101 ++++++
> libswscale/ops_backend.h | 181 +++++++++++
> libswscale/ops_tmpl_common.c | 176 ++++++++++
> libswscale/ops_tmpl_float.c | 255 +++++++++++++++
> libswscale/ops_tmpl_int.c | 609 +++++++++++++++++++++++++++++++++++
> 8 files changed, 1331 insertions(+), 2 deletions(-)
> create mode 100644 libswscale/ops_backend.c
> create mode 100644 libswscale/ops_backend.h
> create mode 100644 libswscale/ops_tmpl_common.c
> create mode 100644 libswscale/ops_tmpl_float.c
> create mode 100644 libswscale/ops_tmpl_int.c
arm breaker
CC libswscale/ops_backend.o
In file included from src/libswscale/ops_backend.c:21:0:
src/libswscale/ops_tmpl_int.c:492:12: error: initializer element is not constant
fn(op_read_planar1),
^
src/libswscale/ops_backend.h:78:27: note: in definition of macro ‘bitfn2’
#define bitfn2(name, ext) name ## _ ## ext
^~~~
src/libswscale/ops_backend.h:82:19: note: in expansion of macro ‘bitfn’
#define fn(name) bitfn(name, FN_SUFFIX)
^~~~~
src/libswscale/ops_tmpl_int.c:492:9: note: in expansion of macro ‘fn’
fn(op_read_planar1),
^~
src/libswscale/ops_tmpl_int.c:492:12: note: (near initialization for ‘op_table_int_u8.entries[0]’)
fn(op_read_planar1),
^
src/libswscale/ops_backend.h:78:27: note: in definition of macro ‘bitfn2’
#define bitfn2(name, ext) name ## _ ## ext
^~~~
src/libswscale/ops_backend.h:82:19: note: in expansion of macro ‘bitfn’
#define fn(name) bitfn(name, FN_SUFFIX)
^~~~~
src/libswscale/ops_tmpl_int.c:492:9: note: in expansion of macro ‘fn’
fn(op_read_planar1),
^~
src/libswscale/ops_tmpl_int.c:493:12: error: initializer element is not constant
fn(op_read_planar2),
^
src/libswscale/ops_backend.h:78:27: note: in definition of macro ‘bitfn2’
#define bitfn2(name, ext) name ## _ ## ext
^~~~
src/libswscale/ops_backend.h:82:19: note: in expansion of macro ‘bitfn’
#define fn(name) bitfn(name, FN_SUFFIX)
^~~~~
src/libswscale/ops_tmpl_int.c:493:9: note: in expansion of macro ‘fn’
fn(op_read_planar2),
^~
src/libswscale/ops_tmpl_int.c:493:12: note: (near initialization for ‘op_table_int_u8.entries[1]’)
................
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250502/e136ef4d/attachment.sig>
More information about the ffmpeg-devel
mailing list