Message ID | 20240702013354.14942-6-yigithanyigitdevel@gmail.com |
---|---|
State | New |
Headers | show |
Series | avfilter/af_volumedetect.c: Add 32bit float audio | expand |
Context | Check | Description |
---|---|---|
andriy/commit_msg_x86 | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
yinshiyou/commit_msg_loongarch64 | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index a53212015d..856d5a295d 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -49,7 +49,7 @@ static inline double logdb(double v, enum AVSampleFormat sample_fmt) return MAX_DB_FLT; return -log10(v) * 10; } else { - double d = v / (double)(0x8000 * 0x8000); + double d = ldexp(v, -30); if (!v) return MAX_DB; return -log10(d) * 10;