[MPlayer-users] MediaLib problems on Solaris
Ken Mandelberg
km at mathcs.emory.edu
Tue Oct 7 22:59:06 CEST 2003
THe mlib support on Solaris has been broken at least since pre1 and
is still broken in pre2 and the cvs. As it is now it gives a
segfault, since the arguments to mlib_VideoColorYUV* are wrong.
Here is a diff to fix the problem.
*** yuv2rgb_mlib.c.orig Sun Feb 23 19:12:30 2003
--- yuv2rgb_mlib.c Mon Oct 6 12:43:14 2003
***************
*** 42,49 ****
assert(srcStride[1] == srcStride[2]);
! mlib_VideoColorYUV2ARGB420(dst[0], src[0], src[1], src[2], c->dstW,
! c->dstH, dstStride[0], srcStride[0], srcStride[1]);
return srcSliceH;
}
--- 42,49 ----
assert(srcStride[1] == srcStride[2]);
! mlib_VideoColorYUV2ARGB420(dst[0]+srcSliceY*dstStride[0], src[0], src[1],
src[2], c->dstW,
! srcSliceH, dstStride[0], srcStride[0],
srcStride[1]);
return srcSliceH;
}
***************
*** 56,63 ****
assert(srcStride[1] == srcStride[2]);
! mlib_VideoColorYUV2ABGR420(dst[0], src[0], src[1], src[2], c->dstW,
! c->dstH, dstStride[0], srcStride[0], srcStride[1]);
return srcSliceH;
}
--- 56,63 ----
assert(srcStride[1] == srcStride[2]);
! mlib_VideoColorYUV2ABGR420(dst[0]+srcSliceY*dstStride[0], src[0], src[1],
src[2], c->dstW,
! srcSliceH, dstStride[0], srcStride[0],
srcStride[1]);
return srcSliceH;
}
***************
*** 70,77 ****
assert(srcStride[1] == srcStride[2]);
! mlib_VideoColorYUV2RGB420(dst[0], src[0], src[1], src[2], c->dstW,
! c->dstH, dstStride[0], srcStride[0], srcStride[1]);
return srcSliceH;
}
--- 70,77 ----
assert(srcStride[1] == srcStride[2]);
! mlib_VideoColorYUV2RGB420(dst[0]+srcSliceY*dstStride[0], src[0], src[1],
src[2], c->dstW,
! srcSliceH, dstStride[0], srcStride[0],
srcStride[1]);
return srcSliceH;
}
***************
*** 81,87 ****
switch(c->dstFormat){
case IMGFMT_RGB24: return mlib_YUV2RGB420_24;
case IMGFMT_RGB32: return mlib_YUV2ARGB420_32;
! case IMGFMT_BGR32: return mlib_YUV2ARGB420_32;
default: return NULL;
}
}
--- 81,87 ----
switch(c->dstFormat){
case IMGFMT_RGB24: return mlib_YUV2RGB420_24;
case IMGFMT_RGB32: return mlib_YUV2ARGB420_32;
! case IMGFMT_BGR32: return mlib_YUV2ABGR420_32;
default: return NULL;
}
}
*** vo_x11.c.orig Mon Oct 6 12:45:21 2003
--- vo_x11.c Mon Oct 6 12:45:33 2003
***************
*** 401,407 ****
--- 401,410 ----
out_format= IMGFMT_BGR8; break;
default: draw_alpha_fnc=draw_alpha_null;
}
+ if ( (myximage->blue_mask & 0x01 ) != 0 )
+ out_format = ((out_format) & ~IMGFMT_BGR_MASK) |IMGFMT_RGB;
+
/* always allocate swsContext as size could change between frames */
swsContext= sws_getContextFromCmdLine(width, height, in_format, width,
height, out_format );
if (!swsContext)
Ken Mandelberg | km at mathcs.emory.edu
Emory University |
Dept of Math and CS | Phone: Voice (404) 727-7963
Atlanta, GA 30322 | FAX (404) 727-5611
More information about the MPlayer-users
mailing list