[FFmpeg-devel] [PATCH] lavfi: add volumedetect filter.
nicolas.george at normalesup.org
Sat Aug 18 18:33:04 CEST 2012
Le duodi 2 fructidor, an CCXX, Stefano Sabatini a écrit :
> min_volume may also be useful
Probably not: it is likely to be PCM=0 <=> -\infty dB, clamped to -91 dB.
Remember that this is a per-sample volume. A minimum on a sliding window may
be useful, but it is more complex, and this filter aims to be very fast.
> I suggest something along the line:
> please doxy
> A comment mentioning that the values are normalized into unsigned
> values may help first-time readers.
Done in the above doxy.
> Could take a value and compute its square, rather than do this in the
The value "power" is already squared when we need to convert it into dB.
> > + return log(d) * -4.3429448190325182765112891891660508229;
> I'm lost here, what's this constant?
-10/log(10), added as a comment.
> Please comment this block.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel