[MPlayer-dev-eng] [PATCH] speedup and little bugfix for -vop eq2

Hampa Hug hhug at student.ethz.ch
Fri Dec 6 22:28:35 CET 2002


Linards Ticmanis wrote:

> Maybe you are interested in this little patch for -vop eq2.
> 
> It fixes a small bug where a byte value is divided by 255.0 to convert
> to a float within [0.0, 1.0] and later multiplied by 256.0 to convert
> back. This makes the luminance lookup table more correct, although the
> visual difference is relatively small.

I disagree. Multiplying by 255.0 and rounding to the nearest integer
divides the interval [0.0, 1.0] in subintervals that are not all the
same size. Why is this more correct? I think the old version was
as correct as it gets.


> More importantly, it speeds up the inner loop a good bit, at least on
> x86 systems, the only one I have and can test on. Of course the code
> should work on all architectures, there's no asm stuff, just faster C.
> Comments on how it is done in detail are in the file.

There is no such thing as "faster C". SCNR.

regards,
Hampa



More information about the MPlayer-dev-eng mailing list