[Mplayer-cvslog] CVS: main/vidix/drivers mga_vid.c,1.25,1.26
Sascha Sommer CVS
syncmail at mplayerhq.hu
Thu Sep 2 13:34:28 CEST 2004
CVS change done by Sascha Sommer CVS
Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var2/tmp/cvs-serv27381/vidix/drivers
Modified Files:
mga_vid.c
Log Message:
fix for i420 format, initial patch by Aurelien Jacobs <aurel at gnuage.org> from the Geexbox mplayer patchset, some modification by me
Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mga_vid.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- mga_vid.c 24 Dec 2003 22:00:50 -0000 1.25
+++ mga_vid.c 2 Sep 2004 11:34:25 -0000 1.26
@@ -775,8 +775,15 @@
config->offsets[i] = i*config->frame_size;
config->offset.y=0;
- config->offset.v=((sw + 31) & ~31) * sh;
- config->offset.u=config->offset.v+((sw + 31) & ~31) * sh /4;
+ if(config->fourcc == IMGFMT_I420 || config->fourcc == IMGFMT_IYUV)
+ {
+ config->offset.u=((sw + 31) & ~31) * sh;
+ config->offset.v=config->offset.u+((sw + 31) & ~31) * sh /4;
+ }
+ else {
+ config->offset.v=((sw + 31) & ~31) * sh;
+ config->offset.u=config->offset.v+((sw + 31) & ~31) * sh /4;
+ }
//FIXME figure out a better way to allocate memory on card
//allocate 2 megs
More information about the MPlayer-cvslog
mailing list