[FFmpeg-devel] [PATCH 11/17] swscale/x86: add SIMD backend
Niklas Haas
ffmpeg at haasn.xyz
Wed Apr 30 19:24:05 EEST 2025
On Tue, 29 Apr 2025 15:00:50 +0200 Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Sat, Apr 26, 2025 at 07:41:15PM +0200, Niklas Haas wrote:
> > From: Niklas Haas <git at haasn.dev>
> >
> > This covers most 8-bit and 16-bit ops, and some 32-bit ops. It also covers all
> > floating point operations. While this is not yet 100% coverage, it's good
> > enough for the vast majority of formats out there.
> >
> > Of special note is the packed shuffle solver, which can reduce any compatible
> > series of operations down to a single pshufb loop. This takes care of any sort
> > of packed swizzle, but also e.g. grayscale to packed RGB expansion, RGB bit
> > depth conversions, endianness swapping and so on.
> > ---
> > libswscale/ops.c | 4 +
> > libswscale/x86/Makefile | 3 +
> > libswscale/x86/ops.c | 735 ++++++++++++++++++++++++++++
> > libswscale/x86/ops_common.asm | 208 ++++++++
> > libswscale/x86/ops_float.asm | 376 +++++++++++++++
> > libswscale/x86/ops_int.asm | 882 ++++++++++++++++++++++++++++++++++
> > 6 files changed, 2208 insertions(+)
> > create mode 100644 libswscale/x86/ops.c
> > create mode 100644 libswscale/x86/ops_common.asm
> > create mode 100644 libswscale/x86/ops_float.asm
> > create mode 100644 libswscale/x86/ops_int.asm
>
> breaks build:
>
> X86ASM libswscale/x86/ops_float.o
> libswscale/x86/ops_common.asm:180: error: unknown preprocessor directive `%rmacro'
> libswscale/x86/ops_common.asm:180: error: label or instruction expected at start of line
> libswscale/x86/ops_common.asm:181: error: `%1': not in a macro call
> libswscale/x86/ops_common.asm:181: error: expression syntax error
> libswscale/x86/ops_common.asm:182: error: `%2': not in a macro call
> libswscale/x86/ops_common.asm:184: error: `%endmacro': not defining a macro
> libswscale/x86/ops_common.asm:187: error: unknown preprocessor directive `%rmacro'
> libswscale/x86/ops_common.asm:187: error: label or instruction expected at start of line
> libswscale/x86/ops_common.asm:188: error: `%1': not in a macro call
> libswscale/x86/ops_common.asm:188: error: expression syntax error
> libswscale/x86/ops_common.asm:189: error: `%2': not in a macro call
> libswscale/x86/ops_common.asm:191: error: `%endmacro': not defining a macro
> libswscale/x86/ops_float.asm:369: error: parser: instruction expected
> libswscale/x86/ops_common.asm:99: ... from macro `decl_common_patterns' defined here
> libswscale/x86/ops_common.asm:91: ... from macro `decl_pattern' defined here
> libswscale/x86/ops_float.asm:31: ... from macro `conv8to32f' defined here
> libswscale/x86/ops_float.asm:369: error: parser: instruction expected
> libswscale/x86/ops_common.asm:99: ... from macro `decl_common_patterns' defined here
> libswscale/x86/ops_common.asm:91: ... from macro `decl_pattern' defined here
> libswscale/x86/ops_float.asm:32: ... from macro `conv8to32f' defined here
> libswscale/x86/ops_float.asm:369: error: parser: instruction expected
> libswscale/x86/ops_common.asm:99: ... from macro `decl_common_patterns' defined here
> libswscale/x86/ops_common.asm:91: ... from macro `decl_pattern' defined here
> [snipped a long list of similar looking errors]
Should be fixed (on my GH branch), turns out %rmacro was not necessary here
so I just replaced it by %macro.
>
> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Its not that you shouldnt use gotos but rather that you should write
> readable code and code with gotos often but not always is less readable
> _______________________________________________
> 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