mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
Add a NEON implementation of the fixed-point DCA LFE FIR interpolation filter. Each vector lane holds one of four consecutive LFE samples, so the filter coefficients are used as by-element multipliers and can be loaded contiguously without any permutes. One load of c[8j..8j+7] and c[248-8j..255-8j] covers outputs j, 32+j, 31-j and 63-j. The 8-tap sums are accumulated in 64 bits with SMULL/SMLAL, rounded with SQRSHRN, clipped to 23 bits with SQSHL/SSHR and written with ST2 lane stores. Recent clang versions auto-vectorize the C version, so the speedup depends a lot on the compiler. On Neoverse-N1 (64 LFE samples): C compiler speedup clang 14 4.84x gcc 11 1.75x clang 20 1.21x clang 22 1.21x Signed-off-by: Jeongkeun Kim <variety0724@gmail.com>