[FFmpeg-cvslog] avfilter/af_volumedetect: use log10 instead of hardcoded constant
Ganesh Ajjanagadde
git at videolan.org
Wed Dec 2 01:33:18 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Thu Oct 29 00:12:53 2015 -0400| [8c2438053786f10c5dc282dddd103b7a53570b47] | committer: Ganesh Ajjanagadde
avfilter/af_volumedetect: use log10 instead of hardcoded constant
This is likely more precise and conveys the intent better.
Reviewed-by: Mark Harris <mark.hsj at gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c2438053786f10c5dc282dddd103b7a53570b47
---
libavfilter/af_volumedetect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c
index 01f24ba..4815bcc 100644
--- a/libavfilter/af_volumedetect.c
+++ b/libavfilter/af_volumedetect.c
@@ -78,7 +78,7 @@ static inline double logdb(uint64_t v)
double d = v / (double)(0x8000 * 0x8000);
if (!v)
return MAX_DB;
- return log(d) * -4.3429448190325182765112891891660508229; /* -10/log(10) */
+ return -log10(d) * 10;
}
static void print_stats(AVFilterContext *ctx)
More information about the ffmpeg-cvslog
mailing list