[vlc-devel] Dynamic range compressor patch

Laurent Aimar fenrir at elivagar.org
Sun Jun 27 19:02:59 CEST 2010


Hi,

On Sun, Jun 27, 2010 at 01:58:34AM -0500, Ron Wright wrote:
> I have updated the patches again as usual, and added a third patch that
> includes the compressor module to be linked against the math library. 
> Moreover, I have modified the compressor code so as to add latency compensation
> for RMS compression, also known as "lookahead."  However, this comes at a
> cost.  The cost is a delay at the output that is inversely proportional to the
> sample rate.  If any of you folks can think of a better way of implementing
> this lookahead mechanism, let me know.

 Instead of using a fixed look ahead size, you could compute it depending on
the samplerate. This way it will stay constant, and it seems to me that it
is more logical (your algo becomes independant of the samplerate).
 Of course you can clamp it to sane min/max value and approximate it by using
the closer power of two to continue using the & (value-1) trick to avoid
any divisions in the round robin buffers.

 Anyway, it's not needed for the inclusion of your patch, and so you can do it
(if you think it should be done) after the current patches go into the repo.

-- 
fenrir



More information about the vlc-devel mailing list