[MPlayer-dev-eng] MGA Xv sux...

Arpi arpi at thot.banki.hu
Fri Jul 19 22:20:11 CEST 2002


Hi,

Just browsed some Xv driver's source to find out a better common vidix-like
interface, with minimal coding requirement to convert an Xv driver to it.
It seems it's harder than i hope, Xv drivers uses various external XF86
structures for various purposes :(
Anyway the design of the whole Xv thing is broken to hell.

Btw, while browsing mga's xv driver i noticed some bad thing:
	MGACopyMungedData()
It does interleave planes.

First I thought it's used for G200's silly interleaved UV thing, but not. It
converts YV12->YUY2 using slow C for() loop, and it's used for G400 too!
What a silly code... :(

more over, it has XV_DOUBLEBUFFER settable attribute but its value is
ignored.

more over, it has really broken code to calculate vertical positon of buffer
switching:

    /* got 48 scanlines to do it in */
    tmp = INREG(MGAREG_VCOUNT) + 48;
    /* FIXME always change it in vertical retrace use CrtcV ?*/
    if(tmp > pScrn->currentMode->CrtcVTotal)
        tmp -= 49; /* too bad */
    else
        tmp = pScrn->currentMode->CrtcVTotal -1;
    tmp = pScrn->currentMode->VDisplay +1;

nice, eh?
the whole if() to calculate the right pos is bad, and at the end it
overrides it with a even more bad constant :)

the only thing which makes me happy is the knowledge that the guy designing
this shit is now working for nvidia :)

note: all the above is from XFree 4.2.0's mga_video.c
dunno if they fixed these in CVS, but i remember the 4.1.0 version was even
worse :(


A'rpi / Astral & ESP-team

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



More information about the MPlayer-dev-eng mailing list