From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id AE7F64D32C for ; Mon, 17 Nov 2025 09:54:23 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'uqT4Je8JR6hTTtEhdhjzQfE3ET7qOVeGfozICDo+Pxk=', expected b'X0Pz9SPzbNRTlfkUYDALLwieTzdaVoCez2yo+J6eDM4=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1763373255; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=uqT4Je8JR6hTTtEhdhjzQfE3ET7qOVeGfozICDo+Pxk=; b=1Q2U2Ej7vWzTb4Tvrm7x16z+14RJ4lhzS5T3tc2mO5rp7j//wwWxSG6R3Wt+0Ao8o21T+ fl9H7WlU1/RcRZbT6/IKUcD11tD4kU1yPvcHMTVHYcOcLtAkJtotuL3tLCkn9BZNalIt8WX ImiGR/qfywnPfN95QTDwPomxWbzPRIpxC7PCuf3uuFxZPmghVAyzx/WgTVnfVjo0jsC0eWT MoNaSFbIznD94vQvVy3ifSx61RIpUdlZmjVLrSAi31h8JulCigbBVvKMlqADo74a2to8va8 V1PTUMw9hSn7a3dGwKWAugAPMZcG2J2tXpAE7p13paVR8q2zs0sBjHTDywFw== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 5EA9068FECA; Mon, 17 Nov 2025 11:54:15 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1763373237; b=clJ3K+5eZKZ8dnRDEwKWEPsd4fqwF+bPxPW3vxriljOf3TyqTqAMayZJ8fk0zoRpflw22 rbCaZp6KPGG5MNjdPoMnxtBf6blS9S+AB9XtuBXf7QhO1AIGaIU4qGVWs9FwCRF1yJkuoJ5 P1xWfGT/qlaXH5CXYGebLl3w9RWpOkCLNt2A5StTAPp7JPGXvTbO4O8PDsqnZ8GuTw4iK6w Yf9Vuir2J2OW0WfnAvPQX28o751i0HpN5/JlBcqPxMwjCqtYkWlPSC9V/10hwpGmHoqt3Bp epOk52s6fADuNBdaFrbumnPaYhFE+hkKb+Ck+FiEW440O7WeeKlFuHwWlw9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1763373237; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=PXIgf2srKm65lawz8e4d09Zc0/Dx1RVCQRXDm5ib7co=; b=ZyzNre+xQmO43s0fs94HOjOwDMC6p1w+W0hC/4uE/eo/Q2sBB/YDi3u26jshHc+8u9qTV LRMszVVMY7lhNpqRMuLy7TGiKaYUBr9TRyQo0X8AINgn5HpXdCMtHbmoMxgzrditaa87WzR l0ja2gaovKK+GDNZFPeer6iHUPBg+RVyVo9SaP39h+sfcomZXjeNIhWj4pyJNpIlc6gsILc 07kJ0lYO6Q+KETMRFajEKnFMj2CQ79QYJ6AyHwbrDKfjNh1EuPqdDsoqvS1+GpqZn9K5iOv KtKlgWjSOCOb3pwm/Y/kQ7BOir9L49B5TPmP2xKBw1DnJD1IzKT0ZlKesgNw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1763373230; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=X0Pz9SPzbNRTlfkUYDALLwieTzdaVoCez2yo+J6eDM4=; b=OK8OWflRVfZM/pfnLgEcLImfdp7Ddk+u2qXnCmqXSZ7Wt2tJgNxW0QBOfXvTivSYYN/1O 5ISua9YNhFfoFlWDPcKJ+ZaRKV18E2MDlHh9jK/iZddZbKpX+p+xYKbkk+l5hHAcgF3pW7w BqL6ISU47EZu+GTuvTLi5KPWu5ZB5c1T8Q0Hdy4woQUryIbxxjsQ6ZfYQGO5EpNfxMObHoZ P4MJzDX95kZjj9kDFE4j+mfzg4FyoSfIGqz+XXy/Xbg1veW4SdENfMRZ4rIQJlcakwSW44e EYTxKk6CFOKEd7IcgBmiB8URhBFbr4wkeUfwbcwRQaNl4wRce3S8OSIzTJvg== Received: from 188d6d40ca7a (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id DDC8568FE5D for ; Mon, 17 Nov 2025 11:53:50 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Mon, 17 Nov 2025 09:53:50 -0000 Message-ID: <176337323108.25.11641862118543033914@2cb04c0e5124> Message-ID-Hash: 6LE3HW3BGQRUMWCHWEHYHYIT3OWPY7DY X-Message-ID-Hash: 6LE3HW3BGQRUMWCHWEHYHYIT3OWPY7DY X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter/x86/f_ebur128: only use filter_channels_avx for >= 2 channels (PR #20939) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Niklas Haas via ffmpeg-devel Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20939 opened by Niklas Haas (haasn) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20939 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20939.patch 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. >>From fbfd8dfaa3cd8a09119591f7387925fc3f396fab Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 17 Nov 2025 10:50:54 +0100 Subject: [PATCH] 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. --- 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; } -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org