mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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);
|
double d = v / (double)(0x8000 * 0x8000);
|
||||||
if (!v)
|
if (!v)
|
||||||
return MAX_DB;
|
return MAX_DB;
|
||||||
return log(d) * -4.3429448190325182765112891891660508229; /* -10/log(10) */
|
return -log10(d) * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_stats(AVFilterContext *ctx)
|
static void print_stats(AVFilterContext *ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user