mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
648b26acc5
commit
8c24380537
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue