[Ffmpeg-devel] swscaler BUG in PIX_FMT_YUV410P -> PIX_FMT_RGBA32
Michael Niedermayer
michaelni
Tue Feb 20 01:05:33 CET 2007
Hi
On Mon, Feb 19, 2007 at 10:11:07PM +0100, GizmoSDK wrote:
>
> 19 feb 2007 kl. 21.45 skrev GizmoSDK:
>
> >When converting a image of format PIX_FMT_YUV410P to
> >PIX_FMT_RGBA32, using MMX but not MMX2 the blue rgb component is
> >mixed into the green so a blue image gets green.
> >
> >The context is initialised with
> >
> > m_img_convert_ctx = sws_getContext(
> > m_pVideoCodecCtx->width, m_pVideoCodecCtx->height,
> > PIX_FMT_RGBA32,
> > m_pVideoCodecCtx->width, m_pVideoCodecCtx->height,
> > m_pVideoCodecCtx->pix_fmt,
> > 0, NULL, NULL, NULL);
> >
> >and the conversion is done with
> >
> >sws_scale(m_img_convert_ctx, m_pFrame->data, m_pFrame->linesize,0,
> >m_pVideoCodecCtx->height, m_pFrameRGB->data, m_pFrameRGB->linesize);
> >
> >The size of src==dst so its a plain translation of format A to B.
> >
> >This bug occurs in
> >FFmpeg version SVN-r8028, Copyright (c) 2000-2007 Fabrice Bellard,
> >et al.
> > configuration: --disable-opts --disable-strip --enable-swscaler --
> >enable-xvid --enable-libfaad --extra-cflags=-I/Users/amo/
> >xvidcore-1.1.0/src -I/Users/amo/faad2/include --enable-gpl --extra-
> >ldflags=-L/Users/amo/xvidcore-1.1.0/build/generic/=build -L/Users/
> >amo/faad2/libfaad/.libs --disable-dv1394 --disable-ipv6 --disable-
> >vhook --disable-bktr --disable-v4l2 --disable-v4l
> > libavutil version: 49.3.0
> > libavcodec version: 51.33.0
> > libavformat version: 51.10.0
> > built on Feb 19 2007 20:26:15, gcc: 4.0.1 (Apple Computer, Inc.
> >build 5367)
>
> I suspect that the error is in swscale_template.c:1107
>
> switch(c->dstFormat)
> {
> case PIX_FMT_RGB32:
> YSCALEYUV2PACKEDX
> YSCALEYUV2RGBX
> WRITEBGR32(%4, %5, %%REGa)
> YSCALEYUV2PACKEDX_END
> return;
>
>
> where the rgb gets mangled some how. But its just a guess as all
> these macros makes it virtually impossibly to debug without bettr
> knowledge of the code...
mplayer -vf scale,format=YVU9,scale,format=bgr32,scale and rgb32 works
that is with mmx2 disabled
-> bug closed / not reproduceable
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070220/04759366/attachment.pgp>
More information about the ffmpeg-devel
mailing list