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@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde 2015-10-29 00:12:53 -04:00
parent 648b26acc5
commit 8c24380537

View File

@ -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)