[MPlayer-dev-eng] [PATCH] Fix blueish video (I420) with vidix on mach64 and rage128 (and radeon?)

rgselk at IRC rgselknospam at yahoo.com
Mon Mar 31 12:28:18 CEST 2003


I sent these patches before, but because of a nonstandard extension it
got attached as base64 (and ignored).

This fixes the blueish screen I have with I420 type videos (rv20) on
both my laptop (ATI 3D Rage LT Pro) and my desktop (ATI Rage 128 Pro).
It comes down to the fact that the U and V planes were not swapped
correctly (I think).

Examples can be found at http://andromeda.darkstar.tj/
http://209.15.26.1/video/andromeda316.ram

In case the attachement is wrong again, I paste the patch here
(whitespace damage ahead)

Index: vidix/drivers/mach64_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mach64_vid.c,v
retrieving revision 1.32
diff -u -w -r1.32 mach64_vid.c
--- vidix/drivers/mach64_vid.c  31 Mar 2003 00:14:35 -0000      1.32
+++ vidix/drivers/mach64_vid.c  31 Mar 2003 10:11:31 -0000
@@ -800,8 +800,8 @@
        {
          uint32_t tmp;
          tmp = config->offset.u;
-         config->offset.u = config->offset.v;
-         config->offset.v = tmp;
+         src_offset_u = config->offset.u = config->offset.v;
+         src_offset_v = config->offset.v = tmp;
        }
     }
     else if(besr.fourcc == IMGFMT_YVU9)
Index: vidix/drivers/radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.71
diff -u -w -r1.71 radeon_vid.c
--- vidix/drivers/radeon_vid.c  31 Mar 2003 00:14:36 -0000      1.71
+++ vidix/drivers/radeon_vid.c  31 Mar 2003 10:11:31 -0000
@@ -1515,6 +1515,12 @@
          tmp = config->offset.u;
          config->offset.u = config->offset.v;
          config->offset.v = tmp;
+           for(i=0;i<besr.vid_nbufs;i++)
+           {
+               tmp = besr.vid_buf_base_adrs_u[i];
+               besr.vid_buf_base_adrs_u[i] =
besr.vid_buf_base_adrs_v[i];
+               besr.vid_buf_base_adrs_v[i] = tmp;
+           }
        }
     }
     else


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vidix.diff.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030331/69fc609d/attachment.txt>


More information about the MPlayer-dev-eng mailing list