This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/8.0
in repository ffmpeg.

commit 955277020fc0f846dd138ecdbc63f078f73baf01
Author:     Niklas Haas <[email protected]>
AuthorDate: Mon Nov 17 10:50:54 2025 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun May 3 19:49:50 2026 +0200

    avfilter/x86/f_ebur128: only use filter_channels_avx for >= 2 channels
    
    The approach of this ASM routine is to process two channels at a time using
    AVX instructions. Obviously, there is no point in doing this if there is 
only
    a single channel; in which case the scalar loop would be better.
    
    Fixes a performance regression when filtering mono audio on certain CPUs,
    notably e.g. the Intel N100.
    
    (cherry picked from commit f3346ca6f7d8249738ae0d9544b62be5c51ccfcd)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/x86/f_ebur128_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/x86/f_ebur128_init.c b/libavfilter/x86/f_ebur128_init.c
index 4a7109746d..6d43b4887f 100644
--- a/libavfilter/x86/f_ebur128_init.c
+++ b/libavfilter/x86/f_ebur128_init.c
@@ -33,7 +33,8 @@ av_cold void ff_ebur128_init_x86(EBUR128DSPContext *dsp, int 
nb_channels)
     int cpu_flags = av_get_cpu_flags();
 
     if (ARCH_X86_64 && EXTERNAL_AVX(cpu_flags)) {
-        dsp->filter_channels = ff_ebur128_filter_channels_avx;
+        if (nb_channels >= 2)
+            dsp->filter_channels = ff_ebur128_filter_channels_avx;
         if (nb_channels == 2)
             dsp->find_peak = ff_ebur128_find_peak_2ch_avx;
     }

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to