From: Paul B Mahol <onemda@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avfilter/af_volumedetect.c: Add 32bit float audio support Date: Sat, 23 Mar 2024 16:21:39 +0100 Message-ID: <CAPYw7P5gdUyzoh9PO16mOxD+YRtOCkrAZy8_9dicNORLrw1oiw@mail.gmail.com> (raw) In-Reply-To: <EB56320A-7498-447E-A2B3-21E9BC8301A9@gmail.com> On Sat, Mar 23, 2024 at 3:28 PM Yiğithan Yiğit <yigithanyigit35@gmail.com> wrote: > Hi, > > According to your advices, I made some changes of mine last patch. I feel > like this one way more better. I removed trivial calculations but I want to > say I am not proud of how I handled histogram in float despite 16 bit > integer histogram. I am storing dB values instead of storing samples. I > feel this one is more convenient. Still I am open to advices. > > I see no patch at all. volumedetect displays histogram typically with 1dB steps, so build histogram with 1dB range between each bin. for float, only use normal values, no +inf/subnormals/nans etc. I bet there is less than current 2^16 entries in histogram table of filter context to fill. There is no need to convert each input sample to dB scale. Just to calculate ranges for each 1dB entry calculate range in linear space and every such sample that is in such range get added to such histogram bin entry. Or if you calculate in dB scale anyway than just round(ceilf/floorf/lrintf) dB value (removing fractional parts) and add it into histogram table, do not forget to count >+/-1.0 values too. (ones with >0dB values), you can use normal mean/max/peak calculations (do not use histogram to calculate them for float/double). > Thank you. > Yigithan > > >  > > > On Mar 21, 2024, at 11:30 PM, Paul B Mahol <onemda@gmail.com> wrote: > > > > On Wed, Mar 20, 2024 at 11:55 PM Yiğithan Yiğit < > yigithanyigit35@gmail.com <mailto:yigithanyigit35@gmail.com>> > > wrote: > > > >> > >>> On Mar 21, 2024, at 12:10 AM, Paul B Mahol <onemda@gmail.com> wrote: > >>> > >>> Why? This is pointless. > >>> > >>> volumedetect have histogram output, float patch does not have it at > all. > >>> Use astats filter. > >>> > >>> On Wed, Mar 20, 2024 at 9:47 PM Yiğithan Yiğit < > >> yigithanyigit35@gmail.com> > >>> wrote: > >>> > >>>> _______________________________________________ > >>>> 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". > >>>> > >>> _______________________________________________ > >>> 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”. > >> > >> I am a beginner/student also new at open source but I love FFmpeg and > >> using in my daily life. From my perspective volumedetect way more user > >> friendly. I believe adding this patch would be useful to people such as > >> #9613. The reason lack of histogram output for float mostly for my > >> indecision about range of the histogram. I am open the suggestions and > >> after that I can make a new patch. > >> > > > > It is trivial (to some people) to add histogram per dB for float/double > > inputs. > > But this patch just does some extremely trivial math calculations so that > > float input have completely different output from integer ones. > > That is very odd and unfriendly from my perspective. > > > > Besides if you only interested in discrete sample audio peak finder in > > audio input use astats and measure_overall=Peak_level options. > > Yes they are not default on. Because more statistics are more important > > than single number. > > > > I'm not against adding proper and useful and correct float/double support > > to volumedetect, but it needs to have same/similar structure of output as > > integer sample format input audio, otherwise it just looks lazy and prone > > for users wondering what is going on when they use different sample > formats > > in theirs graphs. > > > > > >> > >> Best Regards > >> Yigithan > >> > >> > >> _______________________________________________ > >> ffmpeg-devel mailing list > >> ffmpeg-devel@ffmpeg.org <mailto:ffmpeg-devel@ffmpeg.org> > >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >> > >> To unsubscribe, visit link above, or email > >> ffmpeg-devel-request@ffmpeg.org <mailto:ffmpeg-devel-request@ffmpeg.org> > with subject "unsubscribe". > >> > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org <mailto:ffmpeg-devel@ffmpeg.org> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-request@ffmpeg.org <mailto:ffmpeg-devel-request@ffmpeg.org> > with subject "unsubscribe". > > _______________________________________________ > 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". > _______________________________________________ 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".
next prev parent reply other threads:[~2024-03-23 15:22 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-20 20:46 Yiğithan Yiğit 2024-03-20 21:10 ` Paul B Mahol 2024-03-20 22:55 ` Yiğithan Yiğit 2024-03-21 20:30 ` Paul B Mahol 2024-03-23 14:28 ` Yiğithan Yiğit 2024-03-23 15:21 ` Paul B Mahol [this message] 2024-03-23 15:35 ` Yiğithan Yiğit 2024-03-24 21:12 ` Yiğithan Yiğit 2024-03-27 22:39 ` Yiğithan Yiğit 2024-05-01 11:19 ` Yigithan Yigit
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAPYw7P5gdUyzoh9PO16mOxD+YRtOCkrAZy8_9dicNORLrw1oiw@mail.gmail.com \ --to=onemda@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git