Commit 8c243805 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde

avfilter/af_volumedetect: use log10 instead of hardcoded constant

This is likely more precise and conveys the intent better.
Reviewed-by: 's avatarMark Harris <mark.hsj@gmail.com>
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
parent 648b26ac
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment