[MPlayer-dev-eng] [PATCH] Improved DGA vertical retrace sync
Fredrik Noring
noring at nocrew.org
Mon Sep 30 23:31:15 CEST 2002
fre 2002-09-27 klockan 22.46 skrev Arpi:
> what about this one? should i apply?
Please do. Patch attached again below.
> Nexus told me that he has flickering even with -double since i
> applied the first patch
I think we solved the problems with this and the other patches
already applied.
Fredrik
Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.52
diff -u -r1.52 vo_dga.c
--- vo_dga.c 28 Sep 2002 20:09:14 -0000 1.52
+++ vo_dga.c 30 Sep 2002 12:29:11 -0000
@@ -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-dev-eng
mailing list