[MPlayer-dev-eng] [PATCH] new video filter : vf_deflicker
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue May 18 20:50:56 CEST 2010
On Tue, May 18, 2010 at 05:42:00AM +0200, alexandre wrote:
> On 16/05/2010 23:53, Reimar Döffinger wrote:
> >Divisions in an inner loop are bad, if you stick with floating point
> >they should be multiplications by the inverse instead.
> >However, you should not be using floating point after the alogrithmic
> >change, you risk accumulating rounding errors.
> >It makes more sense to make "means" an int array and do the division
> >on use.
> >This also allows optimizing special-cases (power of two frame count)
> >by using shift if desired later on.
>
> Sorry, means is already an int array. I guess it's OK to do an int
> division in the loop, am I right ?
int division isn't really any better performance-wise.
When it comes to correctness, ever tried what happens if you set the
windowSize to 256 (add e.g. scale=32:32 before so it doesn't eat insane
amounts of RAM)? You'd get only black frames...
More information about the MPlayer-dev-eng
mailing list