[MPlayer-dev-eng] Soft volume clip methods

Michael Niedermayer michaelni at gmx.at
Sun Feb 20 02:27:01 CET 2005


Hi

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.
>
> > 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 
functions

[...]
-- 
Michael

"nothing is evil in the beginning. Even Sauron was not so." -- Elrond




More information about the MPlayer-dev-eng mailing list