[Mplayer-cvslog] CVS: main/vidix/drivers mach64_vid.c,1.3,1.4

Michael Niedermayer michael at mplayer.dev.hu
Sun Feb 17 23:40:34 CET 2002


Update of /cvsroot/mplayer/main/vidix/drivers
In directory mplayer:/var/tmp.root/cvs-serv31513

Modified Files:
	mach64_vid.c 
Log Message:
fixed planar yuv formats 


Index: mach64_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mach64_vid.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mach64_vid.c	16 Feb 2002 08:20:24 -0000	1.3
+++ mach64_vid.c	17 Feb 2002 22:40:31 -0000	1.4
@@ -519,17 +519,22 @@
     OUTREG(OVERLAY_SCALE_CNTL, 0x04000001 | (3<<30));
     mach64_wait_for_idle();
     vf = INREG(VIDEO_FORMAT);
+
+// Bits 16-19 seem to select the format
+// Bit 28 seems to toggle the chroma encoding
+// the remaining bits seem to have no effect
+
     switch(besr.fourcc)
     {
         /* 4:2:0 */
 	case IMGFMT_IYUV:
 	case IMGFMT_I420:
-	case IMGFMT_YV12:  OUTREG(VIDEO_FORMAT, (vf & ~0xF000) | 0xA000);  break;
+	case IMGFMT_YV12:  OUTREG(VIDEO_FORMAT, (vf & ~0xF0000) | 0xA0000);  break;
         /* 4:2:2 */
         case IMGFMT_YVYU:
 	case IMGFMT_UYVY:  OUTREG(VIDEO_FORMAT, (vf & ~0xF000) | 0xB000); break;
 	case IMGFMT_YUY2:
-	default:           OUTREG(VIDEO_FORMAT, (vf & ~0xF000) | 0xC000); break;
+	default:           OUTREG(VIDEO_FORMAT, (vf & ~0xF0000) | 0xB0000); break;
     }
 //    OUTPLL(PLL_SCALER_LOCK_EN, 0);
     if(__verbose > 1) mach64_vid_dump_regs();
@@ -582,6 +587,7 @@
     v_inc = (src_h << (12
 		+(mach64_is_interlace()?1:0)
 		-(mach64_is_dbl_scan()?1:0)
+		+(is_420?1:0)
 		)) / dest_h;
     h_inc = (src_w << (12+ecp)) / dest_w;
     v_inc /= 2;




More information about the MPlayer-cvslog mailing list