[FFmpeg-devel] [RFC] RGB32 pixfmts cleanup
Stefano Sabatini
stefano.sabatini-lala
Mon Mar 23 00:36:09 CET 2009
On date Monday 2009-03-23 00:00:32 +0100, Stefano Sabatini encoded:
[...]
> Index: ffmpeg/libavutil/pixfmt.h
> ===================================================================
> --- ffmpeg.orig/libavutil/pixfmt.h 2009-03-22 23:50:53.000000000 +0100
> +++ ffmpeg/libavutil/pixfmt.h 2009-03-22 23:54:36.000000000 +0100
> @@ -120,28 +120,21 @@
> };
>
> #ifdef WORDS_BIGENDIAN
> -# define PIX_FMT_NE(name) PIX_FMT_##name##BE
> +# define PIX_FMT_NE(be, le) PIX_FMT_##be
> #else
> -# define PIX_FMT_NE(name) PIX_FMT_##name##LE
> +# define PIX_FMT_NE(be, le) PIX_FMT_##le
> #endif
>
> -#ifdef WORDS_BIGENDIAN
> -#define PIX_FMT_RGB32 PIX_FMT_ARGB
> -#define PIX_FMT_RGB32_1 PIX_FMT_RGBA
> -#define PIX_FMT_BGR32 PIX_FMT_ABGR
> -#define PIX_FMT_BGR32_1 PIX_FMT_BGRA
> -#else
> -#define PIX_FMT_RGB32 PIX_FMT_BGRA
> -#define PIX_FMT_RGB32_1 PIX_FMT_ABGR
> -#define PIX_FMT_BGR32 PIX_FMT_RGBA
> -#define PIX_FMT_BGR32_1 PIX_FMT_ARGB
> -#endif
> +#define PIX_FMT_RGB32 PIX_FMT_NE(ARGB, BGRA)
> +#define PIX_FMT_RGB32_1 PIX_FMT_NE(RGBA, ABGR)
> +#define PIX_FMT_BGR32 PIX_FMT_NE(ABGR, RGBA)
> +#define PIX_FMT_BGR32_1 PIX_FMT_NE(BGRA, ARGB)
>
> -#define PIX_FMT_GRAY16 PIX_FMT_NE(GRAY16)
> -#define PIX_FMT_RGB48 PIX_FMT_NE(RGB48)
> -#define PIX_FMT_RGB565 PIX_FMT_NE(RGB565)
> -#define PIX_FMT_RGB555 PIX_FMT_NE(RGB555)
> -#define PIX_FMT_BGR565 PIX_FMT_NE(BGR565)
> -#define PIX_FMT_BGR555 PIX_FMT_NE(BGR555)
> +#define PIX_FMT_GRAY16 PIX_FMT_NE(GRAY16BE, GRAY16LE)
> +#define PIX_FMT_RGB48 PIX_FMT_NE(RGB48BE, RGB48LE)
> +#define PIX_FMT_RGB565 PIX_FMT_NE(RGB565BE, RGB565BE)
^^
Yes this is a typo.
Regards.
--
FFmpeg = Friendly and Fundamental Meaningful Ponderous Evangelical Guide
More information about the ffmpeg-devel
mailing list