From: Thilo Borgmann via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Thilo Borgmann <thilo.borgmann@mail.de>
Subject: Re: [FFmpeg-devel] [PATCH v2 1/4] avfilter/af_volumedetect.c: Move logdb function
Date: Sun, 30 Jun 2024 10:28:10 +0200
Message-ID: <fbf69ae9-f167-4655-a1b3-9c5d1e7f90cc@mail.de> (raw)
In-Reply-To: <0EBFEB6B-86BE-4F38-9B6C-06023D9FBE2C@gmail.com>
On 29.06.24 21:54, Yigithan Yigit wrote:
>
>> On 29 Jun 2024, at 22:22, Rémi Denis-Courmont <remi@remlab.net> wrote:
>>
>> Le perjantaina 28. kesäkuuta 2024, 23.15.20 EEST Yigithan Yigit a écrit :
>>> ---
>>> libavfilter/af_volumedetect.c | 20 ++++++++++----------
>>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>> diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c
>>> index 8b001d1cf2..327801a7f9 100644
>>> --- a/libavfilter/af_volumedetect.c
>>> +++ b/libavfilter/af_volumedetect.c
>>> @@ -24,6 +24,8 @@
>>> #include "avfilter.h"
>>> #include "internal.h"
>>> +#define MAX_DB 91
>>> +
>>> typedef struct VolDetectContext {
>>> /**
>>> * Number of samples at each PCM value.
>>> @@ -33,6 +35,14 @@ typedef struct VolDetectContext {
>>> uint64_t histogram[0x10001];
>>> } VolDetectContext;
>>> +static inline double logdb(uint64_t v)
>>> +{
>>> + double d = v / (double)(0x8000 * 0x8000);
>>
>> ldexp(v, -30) ?
>
> That was the original code that already written. Should I change?
Not here. Keep the move patch as-is.
You can test if ldexp() is equal and if so, add another patch to the
patchset changing the function to utilize ldexp().
-Thilo
_______________________________________________
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-06-30 8:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 20:15 [FFmpeg-devel] [PATCH v2 0/4] avfilter/af_volumedetect.c: Add 32bit float audio Yigithan Yigit
2024-06-28 20:15 ` [FFmpeg-devel] [PATCH v2 1/4] avfilter/af_volumedetect.c: Move logdb function Yigithan Yigit
2024-06-29 19:22 ` Rémi Denis-Courmont
2024-06-29 19:54 ` Yigithan Yigit
2024-06-30 8:28 ` Thilo Borgmann via ffmpeg-devel [this message]
2024-06-28 20:15 ` [FFmpeg-devel] [PATCH v2 2/4] avfilter/af_volumedetect.c: Added functions for int/float and planar/packed Yigithan Yigit
2024-07-01 11:33 ` Anton Khirnov
2024-06-28 20:15 ` [FFmpeg-devel] [PATCH v2 3/4] avfilter/af_volumedetect.c: Add 32bit float audio support Yigithan Yigit
2024-06-28 20:15 ` [FFmpeg-devel] [PATCH v2 4/4] avfilter/af_volumedetect.c: reindent after last commit 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=fbf69ae9-f167-4655-a1b3-9c5d1e7f90cc@mail.de \
--to=ffmpeg-devel@ffmpeg.org \
--cc=thilo.borgmann@mail.de \
/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