1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Niklas Haas
daef348574 avfilter/x86/f_ebur128: implement AVX peak calculation
Stereo only, for simplicity. Slightly faster than the C code.
2025-06-21 17:28:39 +02:00
Niklas Haas
3b26b782ee avfilter/f_ebur128: move peak detection to reusable DSP function
True peak and sample peak share almost the same logic. Define this logic in
a separate function for reusability, and so we can write SIMD versions.
2025-06-21 17:21:58 +02:00
Niklas Haas
53e03ec8af avfilter/x86/f_ebur128: add x86 AVX implementation
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.
2025-06-21 17:21:36 +02:00
Niklas Haas
deab15e76a avfilter/f_ebur128: split off C implementation to separate function
I decided to separate out the peak measurement loop to avoid bloating
the signature, and since it's only conditionally used.
2025-06-21 17:19:50 +02:00
Niklas Haas
c7d2b0a7a1 avfilter/f_ebur128: move weights and cache to EBUR128DSPContext 2025-06-21 17:19:50 +02:00