[FFmpeg-devel] [PATCH v2 07/13] avfilter/x86/f_ebur128: add x86 AVX implementation

Michael Niedermayer michael at niedermayer.cc
Mon Jun 16 17:18:49 EEST 2025


On Mon, Jun 16, 2025 at 01:19:55PM +0200, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
> 
> Processes two channels in parallel, using 128-bit XMM registers.
> 
> In theory, we could go up to YMM registers to process 4 channels, but this is
> not a gain except for relatively high channel counts (e.g. 7.1), and also
> complicates the sample load/store operations considerably.
> 
> I decided to only add an AVX variant, since the C code is not substantially
> slower enough to justify a separate function just for ancient CPUs.
> ---
>  libavfilter/f_ebur128.c          |  15 ++--
>  libavfilter/f_ebur128.h          |  16 ++++
>  libavfilter/x86/Makefile         |   4 +
>  libavfilter/x86/f_ebur128.asm    | 142 +++++++++++++++++++++++++++++++
>  libavfilter/x86/f_ebur128_init.c |  35 ++++++++
>  5 files changed, 207 insertions(+), 5 deletions(-)
>  create mode 100644 libavfilter/x86/f_ebur128.asm
>  create mode 100644 libavfilter/x86/f_ebur128_init.c

breaks x86-32 build

src/libavfilter/x86/f_ebur128.asm:116: error: symbol `m8' undefined
src//libavutil/x86/x86inc.asm:1638: ... from macro `movddup' defined here
src//libavutil/x86/x86inc.asm:1501: ... from macro `RUN_AVX_INSTR' defined here
src/libavfilter/x86/f_ebur128.asm:118: error: symbol `m9' undefined
src//libavutil/x86/x86inc.asm:1638: ... from macro `movddup' defined here
src//libavutil/x86/x86inc.asm:1501: ... from macro `RUN_AVX_INSTR' defined here
src/libavfilter/x86/f_ebur128.asm:119: error: symbol `m10' undefined
src//libavutil/x86/x86inc.asm:1638: ... from macro `movddup' defined here
src//libavutil/x86/x86inc.asm:1501: ... from macro `RUN_AVX_INSTR' defined here
src/libavfilter/x86/f_ebur128.asm:120: error: symbol `m11' undefined
src//libavutil/x86/x86inc.asm:1638: ... from macro `movddup' defined here
src//libavutil/x86/x86inc.asm:1501: ... from macro `RUN_AVX_INSTR' defined here
src/libavfilter/x86/f_ebur128.asm:121: error: symbol `m12' undefined
src//libavutil/x86/x86inc.asm:1638: ... from macro `movddup' defined here
src//libavutil/x86/x86inc.asm:1501: ... from macro `RUN_AVX_INSTR' defined here
src/libavfilter/x86/f_ebur128.asm:122: error: symbol `m13' undefined
src//libavutil/x86/x86inc.asm:1638: ... from macro `movddup' defined here
src//libavutil/x86/x86inc.asm:1501: ... from macro `RUN_AVX_INSTR' defined here
src/libavfilter/x86/f_ebur128.asm:124: error: symbol `r7q' undefined
src/libavfilter/x86/f_ebur128.asm:125: error: symbol `r8q' undefined
src/libavfilter/x86/f_ebur128.asm:132: error: symbol `r7q' undefined
...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Take away the freedom of one citizen and you will be jailed, take away
the freedom of all citizens and you will be congratulated by your peers
in Parliament.
-------------- 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/20250616/e43c3ff8/attachment.sig>


More information about the ffmpeg-devel mailing list