[Mplayer-cvslog] CVS: main/vidix/drivers radeon_vid.c,1.27,1.28

Nick Kurshev nick at mplayer.dev.hu
Wed Jan 30 10:40:00 CET 2002


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

Modified Files:
	radeon_vid.c 
Log Message:
Use one pitch source

Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- radeon_vid.c	30 Jan 2002 09:18:41 -0000	1.27
+++ radeon_vid.c	30 Jan 2002 09:39:58 -0000	1.28
@@ -881,7 +881,7 @@
 static int radeon_vid_init_video( vidix_playback_t *config )
 {
     uint32_t tmp,src_w,src_h,dest_w,dest_h,pitch,h_inc,step_by,left,leftUV,top;
-    int is_420;
+    int is_420,best_pitch,mpitch;
     radeon_vid_stop_video();
     left = config->src.x << 16;
     top =  config->src.y << 16;
@@ -891,24 +891,26 @@
     if(config->fourcc == IMGFMT_YV12 ||
        config->fourcc == IMGFMT_I420 ||
        config->fourcc == IMGFMT_IYUV) is_420 = 1;
+    best_pitch = radeon_query_pitch(config->fourcc);
+    mpitch = best_pitch-1;
     switch(config->fourcc)
     {
 	/* 4:2:0 */
 	case IMGFMT_IYUV:
 	case IMGFMT_YV12:
-	case IMGFMT_I420: pitch = (src_w + 31) & ~31;
+	case IMGFMT_I420: pitch = (src_w + mpitch) & ~mpitch;
 			  config->dest.pitch.y = 
 			  config->dest.pitch.u = 
-			  config->dest.pitch.v = 32;
+			  config->dest.pitch.v = best_pitch;
 			  break;
 	/* 4:2:2 */
         default:
 	case IMGFMT_UYVY:
 	case IMGFMT_YUY2:
-			  pitch = ((src_w*2) + 15) & ~15;
+			  pitch = ((src_w*2) + mpitch) & ~mpitch;
 			  config->dest.pitch.y =
 			  config->dest.pitch.u =
-			  config->dest.pitch.v = 16;
+			  config->dest.pitch.v = best_pitch;
 			  break;
     }
     dest_w = config->dest.w;
@@ -965,7 +967,7 @@
       besr.vid_buf0_base_adrs += config->offset.y;
       besr.vid_buf1_base_adrs = besr.vid_buf0_base_adrs+config->frame_size;
       besr.vid_buf2_base_adrs = besr.vid_buf0_base_adrs;
-      besr.vid_buf3_base_adrs = besr.vif_buf0_base_adrs+config->frame_size;
+      besr.vid_buf3_base_adrs = besr.vid_buf0_base_adrs+config->frame_size;
       besr.vid_buf4_base_adrs = besr.vid_buf0_base_adrs;
       besr.vid_buf5_base_adrs = besr.vid_buf0_base_adrs+config->frame_size;
     }




More information about the MPlayer-cvslog mailing list