[MPlayer-dev-eng] Re: Re: mga_vid and brightness/contrast control.

D Richard Felker III dalias at aerifal.cx
Sun Feb 3 18:25:48 CET 2002


On Sun, Feb 03, 2002 at 12:59:27PM +0100, Dariusz Pietrzak wrote:
> >>  There should also be contrast control implemented, but all I know
> >> contrast is that neutral value is 0x80, and that this is '1.7 value
> >> ranging from 0 to 1.99'.
> 
> >I imagine it means the scale is nonlinear, i.e. 0x80 represents
> >1.7/2 contrast on a linear scale, i.e. about 85%, 0xff represents
> Ok, so I implemented it as (-127 .. + 128) value, where 0 mean (0x80) in
> hardware, at it seems to be working as expected.
> I still don't quite get this '1.7' thing,
> you're saying that it's 0x80 = 1.7, and 0xff = 1.99 ?
> 
> Could anyone tell me why float values are not welcomed in kernel space?

1) floats are bad! :)

2) not all systems support floats. some of these have emulation in the
kernel, but the kernel is either unable to emulate fpu for itself
(i.e. only for userspace programs) or else it would just be too slow
and painful to do.

3) linus says no no no! :)

chances are you don't really need floats for anything. just use some
sort of fixed point.

rich




More information about the MPlayer-dev-eng mailing list