[FFmpeg-devel] [PATCH] lavfi: add volumedetect filter.

Nicolas George 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
> caller.

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.

> relic?

Yes, removed.

> Please comment this block.



  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120818/9d04d10e/attachment.asc>

More information about the ffmpeg-devel mailing list