[MPlayer-dev-eng] [PATCH] forceable software volume control

D Richard Felker III dalias at aerifal.cx
Tue Nov 16 16:54:47 CET 2004


On Tue, Nov 16, 2004 at 08:03:01AM +0000, Ed Wildgoose wrote:
> 
> >the proper solution of course would be a soft-clipping volume filter.
> >but af_volume sucks too much to do this except with float mode, which
> >is totally broken.
> 
> I only scanned the code quickly, but can you fill me in quickly as to 
> what the problem is here?

the code simply does not work. if any filters get loaded in float
mode, libaf loads 3 or 4 unnecessary filters to convert back and forth
between signed 16, float, unsigned 8, and sometimes even total
nonsense formats like "8bit float"... the output is worse than white
noise.

> Going "float" would of course be extremely 
> desirable

no, it's definitely not. float is never desirable.

> if we are only in 16bit mode to start with, but I assume that 
> it needs to do a truncation somewhere rather than pass the output to the 
> output driver as floats?

yes of course it has to convert the output back to signed 16.

> I had considered the idea of a plugin to "guess" the max range of the 
> DVD and set the volume control appropriately.  I think a very simplistic 
> approach would be sufficient actually: Take a starting gain from the 
> user.  Whenever we would clip then reduce the volume control to avoid 
> clipping.  Done.  The idea would be that the (nearly) loudest part of 

this is a horrible idea and does nothing in my case, except make the
beginning of the movie louder than the rest!! what is even the point?
i told you there are (almost) always these idiotic peaks where the
full range is used.

rich




More information about the MPlayer-dev-eng mailing list