[FFmpeg-devel] [PATCH] rgb/bgr confusion in swscale or in my head?

Mike Melanson mike
Mon Jan 21 22:16:29 CET 2008


Reimar D?ffinger wrote:
> Hello,
> if I am correct that e.g. rgb15 means that the _lowest_ 5 bits are red,
> then swscale currently confuses things a bit and attached patch should
> fix it.
> Ok to apply or am I wrong?

I understand RGB to mean that red is in the higher part of the packed pixel.

Have you observed incorrect behavior? libavutil.h seems pretty clear on
the matter:

PIX_FMT_RGB565,///< Packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), in
cpu endianness
PIX_FMT_RGB555,///< Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in
cpu endianness most significant bit to 0

PIX_FMT_BGR565,///< Packed RGB 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), in
cpu endianness
PIX_FMT_BGR555,///< Packed RGB 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), in
cpu endianness most significant bit to 1

-- 
	-Mike Melanson




More information about the ffmpeg-devel mailing list