changeset 4033:94602bcd13d0

double buffering fixing
author nick
date Mon, 07 Jan 2002 10:54:32 +0000
parents 076c6c29e693
children 73e945634181
files vidix/drivers/radeon_vid.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/radeon_vid.c	Mon Jan 07 10:54:00 2002 +0000
+++ b/vidix/drivers/radeon_vid.c	Mon Jan 07 10:54:32 2002 +0000
@@ -992,8 +992,17 @@
 {
   unsigned pitch,awidth;
   pitch = radeon_query_pitch(info->fourcc);
-  awidth = info->src.w + ((pitch-1) & ~(pitch-1));
-  info->frame_size = awidth*info->src.h+(awidth*info->src.h)/2;
+  awidth = (info->src.w + (pitch-1)) & ~(pitch-1);
+  switch(info->fourcc)
+  {
+    case IMGFMT_I420:
+    case IMGFMT_YV12:
+    case IMGFMT_IYUV:
+		info->frame_size = awidth*info->src.h+(awidth*info->src.h)/2;
+		break;
+    default:	info->frame_size = awidth*info->src.h*2;
+		break;
+  }
 }
 
 int vixConfigPlayback(vidix_playback_t *info)
@@ -1021,7 +1030,7 @@
   return 0;
 }
 
-int vixPlaybackFrameSel(unsigned frame)
+int vixPlaybackFrameSelect(unsigned frame)
 {
     uint32_t off0,off1,off2;
 /*    if(!besr.double_buff) return; */