[Mplayer-cvslog] CVS: main mplayer.c,1.527,1.528

Arpi arpi at thot.banki.hu
Sun Jul 21 16:35:32 CEST 2002


Hi,

> > > Anyway I also don't like this commit, it changes -1000..+1000 raneg to
> > > -100..+100 dunno why.
> > 
> > Ezt nem tom angolul:
> > 
> > MP_CMD_* mindig -100...100 - at hasznalt. A -bright... meg a tobbi meg
> > -1000...1000 - ret, es a driver szorozgatta, osztogatta el. Csak most
> > egyseges lett az is, konstans -100...100.
> 
> That is ? (english plz)

"Valid range in MP_CMD_* was -100..100 since teh beginning. Options
-brightness etc used -1000..1000 and the driver did the mul/div by 10.
Now it's common -100..+100 everywhere."

At least it should be, but it seems that libvo still uses -1000..+1000.
I also noticed that the mapping between -1000..+1000 <=> Xv min/max is
bogus, can result by rounding errors to min-1 or max+1 sometimes.
Ah, and the codecs (divx4, dshow) use 0..100 range.

We should agree on some range, and then convert the whole code to use that
range. I vote for 0..255, but maybe it's too much work and we should use the
current -100..+100 and fix the vo drivers (mga, vidix, xv).
Anyway the 0..255 (or -128..127) would better fit the drivers and makes
conversion cleaner: ((value-min)<<8)/(max-min)

> Your patch suffer from initialization problems as "impossible" values
> (-101) arrive in vo_xv::__set*eq, which causes problems.
Xv drivers should ignore values <min or >max, at least the mga Xv does so.

> Another problem is also that you use -101 which sadly happens to be in
> -1000 1000 and not very different from -100, which does not trigger
> frankly the bugs. 
yes, it's a silly thing anyway to use a fixed value to check uninitialized
state. probably a flags-type variable could do it better...

> The attached patch replaces -101 by -99999 and adds a "last chance
> before breakage" workaround as the warning should not be triggered at
> all IMO.
imho we shouldn't commit more ugly workaround and hack, but fix the code in
a clean way.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-cvslog mailing list