[MPlayer-dev-eng] Soft volume clip methods

Zoltan Hidvegi mplayer at hzoli.2y.net
Tue Feb 22 18:59:44 CET 2005


Alex Beregszaszi wrote:
> > > Dunno, but your functions reduce dynamic range hardly, maybe you
> > > would need to rescale and leave the [-1.0, +1.0] samples as is.
> > 
> > I'm not sure what do you mean.  The goal of a volume clip function is
> > to bring the out of bounds values back in range.  It should have
> > minimal effect on samples within the range.  When you says it "reduce
> > dynamic range hardly", do you mean it reduces the range too much, or
> > you mean it does not reduce it enough?  This is not volume
> > normalizing, the goal is to keep the dynamic range as much as
> > possible, but bring the OOB values down.  You cannot rescale, because
> > that would affect even the quiet parts, which you would like to leave
> > alone.  This also means that you cannot leave [-1,1] alone, because
> > that already uses up the full range, so you have no room left to put
> > the OOB values.
> 
> Just take the sin method, it reduces the dynamic range as it changes the
> inside bounds samples aswell.

I still don't get what you mean, a soft clip function must change the
inside bounds samples to some degree, otherwise the inside bounds part
will use up the full range, and then all you can do is to map all out
of bounds samples to their sign, i.e. do a hard clip.  There is no
free lunch here.  Btw, the tendency these days is to make everything
loud, so some CDs are mastered with pushing the volume out of bounds
and then applying some clip function.  For such CDs you may actually
prefer some kind of unclip function, which can reverse the effects of
clipping, and reduce the volume to bring the samples back in range.

Zoli




More information about the MPlayer-dev-eng mailing list