[Ffmpeg-devel] swscaler BUG in PIX_FMT_YUV410P -> PIX_FMT_RGBA32
GizmoSDK
gizmo_video
Mon Feb 19 22:11:07 CET 2007
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...
/Anders Mod?n
More information about the ffmpeg-devel
mailing list