From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4B5004B0CF for ; Tue, 28 May 2024 15:23:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 74F9868D40C; Tue, 28 May 2024 18:23:48 +0300 (EEST) Received: from alt2.a-painless.mh.aa.net.uk (alt2.a-painless.mh.aa.net.uk [81.187.30.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF23F68CCFE for ; Tue, 28 May 2024 18:23:41 +0300 (EEST) Received: from 0.e.f.0.c.8.2.e.1.0.c.4.0.c.3.6.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:63c0:4c01:e28c:fe0] helo=andrews-2024-laptop.sayers) by painless-a.thn.aa.net.uk with smtp (Exim 4.96) (envelope-from ) id 1sByfs-00BUOZ-2N for ffmpeg-devel@ffmpeg.org; Tue, 28 May 2024 16:23:41 +0100 Date: Tue, 28 May 2024 16:23:34 +0100 From: Andrew Sayers To: FFmpeg development discussions and patches Message-ID: References: <20240520201606.90567-1-yigithanyigitdevel@gmail.com> <20240520201606.90567-3-yigithanyigitdevel@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240520201606.90567-3-yigithanyigitdevel@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH v3 2/3] avfilter/af_volumedetect.c: Add 32bit float audio support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, May 20, 2024 at 11:16:05PM +0300, Yigithan Yigit wrote: > --- > libavfilter/af_volumedetect.c | 159 ++++++++++++++++++++++++++++------ > 1 file changed, 133 insertions(+), 26 deletions(-) > > diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c > index 327801a7f9..dbbcd037a5 100644 > --- a/libavfilter/af_volumedetect.c > +++ b/libavfilter/af_volumedetect.c > @@ -20,27 +20,51 @@ > > #include "libavutil/channel_layout.h" > #include "libavutil/avassert.h" > +#include "libavutil/mem.h" > #include "audio.h" > #include "avfilter.h" > #include "internal.h" > > +#define MAX_DB_FLT 1024 > #define MAX_DB 91 > +#define HISTOGRAM_SIZE 0x10000 > +#define HISTOGRAM_SIZE_FLT (MAX_DB_FLT*2) > > typedef struct VolDetectContext { > - /** > - * Number of samples at each PCM value. > - * histogram[0x8000 + i] is the number of samples at value i. > - * The extra element is there for symmetry. > - */ > - uint64_t histogram[0x10001]; > + uint64_t* histogram; ///< for integer number of samples at each PCM value, for float number of samples at each dB Nitpick (from an in-progress review bot): s/\* / \*/ _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".