[Mplayer-cvslog] CVS: main/vidix/drivers mach64_vid.c,1.24,1.25

Michael Niedermayer michael at mplayerhq.hu
Sat Apr 20 15:42:34 CEST 2002


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

Modified Files:
	mach64_vid.c 
Log Message:
antoher try, ecp reading like in gatos ...


Index: mach64_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mach64_vid.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- mach64_vid.c	15 Apr 2002 20:54:28 -0000	1.24
+++ mach64_vid.c	20 Apr 2002 13:42:31 -0000	1.25
@@ -145,11 +145,17 @@
 static __inline__ uint32_t INPLL(uint32_t addr)
 {
     uint32_t res;
-
+    uint32_t in;
+    
+    /* preserve unknown bits */
+    in= INREG8(CLOCK_CNTL + 1);
+    if(__verbose>0)printf("[mach64] pll: %X\n", in);
+    in &= ~((PLL_WR_EN | PLL_ADDR)>>8); //clean some stuff
+    
     /* write addr byte */
-    OUTREG8(CLOCK_CNTL + 1, (addr << 2));
+    OUTREG8(CLOCK_CNTL + 1, in | (addr << 2));
     /* read the register value */
-    res = INREG(CLOCK_CNTL + 2);
+    res = INREG8(CLOCK_CNTL + 2);
     return res;
 }
 
@@ -257,7 +263,6 @@
 static int mach64_get_vert_stretch(void)
 {
     int lcd_index;
-    int lcd_gen_ctrl;
     int vert_stretching;
     int ext_vert_stretch;
     int ret;
@@ -740,7 +745,7 @@
     v_inc>>=4; // convert 16.16 -> 20.12
     v_inc/= dest_h;
     
-    h_inc = (src_w << 12) / dest_w;
+    h_inc = (src_w << (12+ecp)) / dest_w;
     /* keep everything in 16.16 */
     config->offsets[0] = 0;
     for(i=1; i<config->num_frames; i++)




More information about the MPlayer-cvslog mailing list