[Mplayer-cvslog] CVS: main/libvo vo_dga.c,1.52,1.53
Arpi of Ize
arpi at mplayerhq.hu
Tue Oct 1 23:47:35 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv8852
Modified Files:
vo_dga.c
Log Message:
flickering fix, patch by Fredrik Noring <noring at nocrew.org>
Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- vo_dga.c 28 Sep 2002 20:09:14 -0000 1.52
+++ vo_dga.c 1 Oct 2002 21:47:32 -0000 1.53
@@ -262,14 +262,8 @@
#define MAX_NR_VIDEO_BUFFERS 3
-#define VIDEO_BUFFER_DRAW \
- (vo_dga_video_buffer[vo_dga_current_video_buffer % \
- vo_dga_nr_video_buffers])
-
-#define VIDEO_BUFFER_DISPLAY \
- (vo_dga_video_buffer[(vo_dga_current_video_buffer + \
- vo_dga_nr_video_buffers - 1) % \
- vo_dga_nr_video_buffers])
+#define CURRENT_VIDEO_BUFFER \
+ (vo_dga_video_buffer[vo_dga_current_video_buffer])
static int vo_dga_nr_video_buffers; // Total number of frame buffers.
static int vo_dga_current_video_buffer; // Buffer available for rendering.
@@ -298,7 +292,7 @@
offset = vo_dga_width * y0 +x0;
buffer_stride = vo_dga_width;
- d = VIDEO_BUFFER_DRAW.data + vo_dga_vp_offset;
+ d = CURRENT_VIDEO_BUFFER.data + vo_dga_vp_offset;
switch( HW_MODE.vdm_mplayer_depth ){
@@ -345,7 +339,7 @@
char *s, *d;
s = *src;
- d = VIDEO_BUFFER_DRAW.data + vo_dga_vp_offset;
+ d = CURRENT_VIDEO_BUFFER.data + vo_dga_vp_offset;
switch(SRC_MODE.vdm_conversion_func){
case VDM_CONV_NATIVE:
@@ -360,7 +354,7 @@
// DBG-COde
#if 0
- d = VIDEO_BUFFER_DRAW.data + vo_dga_vp_offset;
+ d = CURRENT_VIDEO_BUFFER.data + vo_dga_vp_offset;
fillblock(d, 0, 10, 0x800000ff);
fillblock(d, 10, 10, 0x8000ff00);
fillblock(d, 20, 10, 0x80ff0000);
@@ -429,7 +423,7 @@
#ifdef HAVE_DGA2
XDGASetViewport(vo_dga_dpy, XDefaultScreen(vo_dga_dpy),
0,
- VIDEO_BUFFER_DISPLAY.y,
+ CURRENT_VIDEO_BUFFER.y,
XDGAFlipRetrace);
#else
XF86DGASetViewPort(vo_dga_dpy, XDefaultScreen(vo_dga_dpy),
@@ -448,7 +442,7 @@
if (scale_srcW) {
uint8_t *dst[3] =
{
- VIDEO_BUFFER_DRAW.data + vo_dga_vp_offset,
+ CURRENT_VIDEO_BUFFER.data + vo_dga_vp_offset,
0,
0
};
@@ -457,7 +451,7 @@
/*scale_dstW*/ vo_dga_width * HW_MODE.vdm_bytespp, HW_MODE.vdm_bitspp,
scale_srcW, scale_srcH, scale_dstW, scale_dstH);
} else {
- yuv2rgb(VIDEO_BUFFER_DRAW.data + vo_dga_vp_offset +
+ yuv2rgb(CURRENT_VIDEO_BUFFER.data + vo_dga_vp_offset +
(vo_dga_width * y +x) * HW_MODE.vdm_bytespp,
src[0], src[1], src[2],
w,h, vo_dga_width * HW_MODE.vdm_bytespp,
More information about the MPlayer-cvslog
mailing list