[FFmpeg-devel] more colourspace confusion

Michael Niedermayer michaelni
Tue Jan 22 03:37:26 CET 2008

On Mon, Jan 21, 2008 at 11:10:44PM +0100, Reimar D?ffinger wrote:
> Hello,
> can someone explain to me the reasoning behind isRGB/isBGR in
> libswscale/swscale_internal.h ? It does not make much sense to me and I

when swscale was still in mplayer
isRGB= IMGFMT_IS_BGR() was in yuv2rgb.c
#define isRGB(x)       (((x)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
#define isBGR(x)       (((x)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
in swscale.c

this was correct AFAIK
(yuv2rgb had a flipped definition of rgb and bgr)

its very possible that the code was broken during the move from mplayer
to ffmpeg and the changing of pix formats

if so correcting this must be done very carefully because its the isRGB/BGR
which likely have changed not the code using them so any change to the code
using them has likely to be to all uses of them


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080122/b1641400/attachment.pgp>

More information about the ffmpeg-devel mailing list