[FFmpeg-devel] [PATCH] Fix swapped colours for RGB555 and RGB565 in swscale

Michael Niedermayer michaelni
Mon Oct 29 18:24:23 CET 2007

On Mon, Oct 29, 2007 at 04:40:08PM +0200, Kostya wrote:
> On Sun, Oct 28, 2007 at 12:12:08AM +0200, Michael Niedermayer wrote:
> > Hi
> > 
> > On Wed, Oct 24, 2007 at 03:48:00PM +0300, Kostya wrote:
> > > Looks like rgb1[56]toUV have color values swapped.
> > > Fixes roundup issue 162 and reported problem with 15-bit TSCC files.
> > 
> > this patch is TOTALLY wrong
> > it changes rgb1[56]toUV so they become identical to bgr1[56]toUV and at the
> > same time results in the corresponding luma functions to mismatch
> > which means that after this the output is _really_ wrong while before it
> > was merely switching red and blue
> > 
> > the actual bug seems to be that the function names of [rgb|bgr]1[56]to[UV|Y]
> > should be rgb<->bgr flipped
> > i also suspect that mplayers vf_scale.c might need a change to compensate for
> > this
> You are right, MPlayer interprets rgb1[56] as bgr1[56] and vice
> versa, so other rgb1[56] converters are wrong too. I don't know
> what consequences name fix will have as other apps have grown on
> that model too.

libavutil/avutil.h documents what they mean any application which depends
on this 15/16bit rgb<->bgr bug are broken and they deserve the
consequences, they should have reported this issue to us instead of
writing code which depends on the opposite of what is documented


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20071029/dc04126a/attachment.pgp>

More information about the ffmpeg-devel mailing list