[Mplayer-cvslog] CVS: main/drivers/radeon radeon_vid.c,1.29,1.30

Nick Kurshev nick at mplayer.dev.hu
Fri Dec 7 13:01:46 CET 2001


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

Modified Files:
	radeon_vid.c 
Log Message:
Fixed scaling in doublescan modes

Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/radeon/radeon_vid.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- radeon_vid.c	7 Dec 2001 10:48:17 -0000	1.29
+++ radeon_vid.c	7 Dec 2001 12:01:43 -0000	1.30
@@ -37,7 +37,6 @@
 		Y42T, V422, V655, CLJR, YUVP, UYVP, Mpeg PES (mpeg-1,2) support
   ...........................................................
   BUGS and LACKS:
-    Wrong aspect of scaling if image_height < 200 && screen_height == 200
     Color and video keys don't work
     Contrast and brightness are unconfigurable on radeons
 */
@@ -327,6 +326,12 @@
   return retval;
 }
 
+static int radeon_is_dbl_scan( void )
+{
+  return (INREG(CRTC_GEN_CNTL))&CRTC_DBL_SCAN_EN;
+}
+
+
 static void __init radeon_vid_save_state( void )
 {
   size_t i;
@@ -471,12 +476,6 @@
 #define XXX_SRC_X   0
 #define XXX_SRC_Y   0
 
-#define XXX_WIDTH   config->src_width
-#define XXX_HEIGHT  config->src_height
-
-#define XXX_DRW_W   config->dest_width
-#define XXX_DRW_H   config->dest_height
-
 static int radeon_vid_init_video( mga_vid_config_t *config )
 {
     uint32_t tmp,src_w,src_h,pitch,h_inc,step_by,left,leftUV,top;
@@ -497,6 +496,8 @@
     radeon_vid_stop_video();
     left = XXX_SRC_X << 16;
     top = XXX_SRC_Y << 16;
+/* FIXME !!! interlace? */
+    if(radeon_is_dbl_scan()) config->dest_height *= 2;
     src_h = config->src_height;
     src_w = config->src_width;
     switch(config->format)
@@ -553,8 +554,8 @@
     
     besr.dest_bpp = radeon_vid_get_dbpp();
     besr.fourcc = config->format;
-    besr.v_inc = (src_h << 20) / XXX_DRW_H;
-    h_inc = (src_w << 12) / XXX_DRW_W;
+    besr.v_inc = (src_h << 20) / config->dest_height;
+    h_inc = (src_w << 12) / config->dest_width;
     step_by = 1;
 
     while(h_inc >= (2 << 12)) {




More information about the MPlayer-cvslog mailing list