[MPlayer-users] -vo tdfxfb and -vc ffdivx/odivx
Daniel Podlejski
underley at underley.eu.org
Thu Oct 18 19:08:59 CEST 2001
Ok, there is patch:
===============================================================================
--- mplayer/libvo/vo_tdfxfb.c Thu Sep 27 14:23:38 2001
+++ mplayer.fixed/libvo/vo_tdfxfb.c Thu Oct 18 18:05:35 2001
@@ -193,7 +193,8 @@
#if 1
static void
dump_yuv_planar(void *y, void *u, void *v,
- uint32_t to, uint32_t px, uint32_t py, uint32_t width, uint32_t height)
+ uint32_t to, uint32_t px, uint32_t py, uint32_t width, uint32_t height,
+ int y_stride, int uv_stride)
{
// YUV conversion works like this:
//
@@ -211,6 +212,8 @@
//printf("dump_yuv_planar(..., px=%d, py=%d, w=%d, h=%d\n",
// px, py, width, height);
+ // printf("dump_yuv_planar: y_stride = %d, uv_stride = %d\n", y_stride, uv_stride);
+
reg_YUV->yuvBaseAddr = to + in_width * 2 * py;
reg_YUV->yuvStride = width*2;
@@ -220,26 +223,12 @@
for (j = 0; j < jmax; j++)
{
-#if 0
- //XXX this should be hand-rolled 32 bit memcpy for safeness.
- memcpy(fb_YUV->U (uint32_t) VOODOO_YUV_STRIDE * j,
- ((uint8_t*)u) + uv_imax * j , uv_imax);
-
- memcpy(fb_YUV->V + (uint32_t) VOODOO_YUV_STRIDE * j,
- ((uint8_t*)v) + uv_imax * j , uv_imax);
+ memcpy(&fb_YUV->U[VOODOO_YUV_STRIDE * j], u + uv_stride * j, uv_stride);
+ memcpy(&fb_YUV->V[VOODOO_YUV_STRIDE * j], v + uv_stride * j, uv_stride);
- memcpy(fb_YUV->Y + (uint32_t) VOODOO_YUV_STRIDE* (j<<1),
- ((uint8_t*)y) + y_imax * (j<<1) , y_imax);
- memcpy(fb_YUV->Y + (uint32_t) VOODOO_YUV_STRIDE*((j<<1)+1),
- ((uint8_t*)y) + y_imax *((j<<1)+1), y_imax);
-#else
- memcpy(&fb_YUV->U[VOODOO_YUV_STRIDE * j], u + uv_imax * j , uv_imax);
- memcpy(&fb_YUV->V[VOODOO_YUV_STRIDE * j], v + uv_imax * j , uv_imax);
-
-
- memcpy(&fb_YUV->Y[VOODOO_YUV_STRIDE* (j<<1)], y + y_imax * (j<<1) , y_imax);
- memcpy(&fb_YUV->Y[VOODOO_YUV_STRIDE*((j<<1)+1)], y + y_imax *((j<<1)+1), y_imax);
-#endif
+ memcpy(&fb_YUV->Y[VOODOO_YUV_STRIDE * (j<<1)], y + y_stride * (j<<1), y_stride);
+ memcpy(&fb_YUV->Y[VOODOO_YUV_STRIDE * ((j<<1)+1)], y + y_stride * ((j<<1)+1),
+ y_stride);
}
}
#endif
@@ -542,7 +531,8 @@
draw_slice_YV12(uint8_t *image[], int stride[], int w,int h,int x,int y)
{
dump_yuv_planar((uint32_t *)image[0], (uint32_t *)image[1],
- (uint32_t *)image[2], in_page0_offset, x, y, w, h);
+ (uint32_t *)image[2], in_page0_offset, x,
+ y, w, h, stride[0], stride[1]);
return 0;
}
===============================================================================
But it have side effect - narrow strip with overlap right side of screen at left side.
Anybody with Voodoo 3 can try and confirm/disagree ?
--
Daniel Podlejski <underley at underley.eu.org>
... Political speeshes They are lying in the mud
Nothing else matters But money and blood ...
More information about the MPlayer-users
mailing list