# HG changeset patch # User nick # Date 1010400872 0 # Node ID 94602bcd13d0389342bc939b64a74d6d4f961f64 # Parent 076c6c29e693aa29229841f3d95e0927598dd1ab double buffering fixing diff -r 076c6c29e693 -r 94602bcd13d0 vidix/drivers/radeon_vid.c --- 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; */