[MPlayer-dev-eng] Soft volume clip methods
D Richard Felker III
dalias at aerifal.cx
Sun Feb 20 20:12:39 CET 2005
On Sun, Feb 20, 2005 at 02:27:01AM +0100, Michael Niedermayer wrote:
> On Sunday 20 February 2005 02:11, Zoltan Hidvegi wrote:
> > Michael Niedermayer wrote:
> > > Hi
> > >
> > > On Saturday 19 February 2005 23:52, Zoltan Hidvegi wrote:
> > > > The current softclip method used my libaf is sin(x), which is slow,
> > >
> > > wait a second, libaf directly calls sin(x) for every sample instead of
> > > using a LUT, thats just a joke right?
> > Unfortunately, that's no joke. Sure LUT can be used, and with LUT,
> > the int and float code could both use the same clipping functions,
> > unlike the current implementation, which only support hard clipping
> > for int samples.
ROTFL! There's another 1000000l for Anders. :))))))))))
Of course a 64k LUT isn't acceptable either since it'd kill the cache,
but a much smaller table could be used with any reasonable
> > > please use a look up table, then it doesnt matter at all how slow it is,
> > > its just calculated once at startup
> > Sure, but the question still remains what clip function to use, what's
> > the criteria for a good clip function?
> it should sound good to humans ;)
> why not simply implement several and let the user decide/compare?
> you could even use the expression evaluator from lavc (libavcodec/eval.c), so
> the user could use any expression build out of the common operations and
I agree. Very good idea. Before long we'll be able to make lavc a
mandatory dependency for mplayer... :))
More information about the MPlayer-dev-eng