Make the PIX_FMT_NE() macro more generic.

Originally committed as revision 18173 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2009-03-23 22:57:55 +00:00
parent 3c32bac898
commit 1cee4eafa3
1 changed files with 8 additions and 8 deletions

View File

@ -120,9 +120,9 @@ enum PixelFormat {
}; };
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
# define PIX_FMT_NE(name) PIX_FMT_##name##BE # define PIX_FMT_NE(be, le) PIX_FMT_##be
#else #else
# define PIX_FMT_NE(name) PIX_FMT_##name##LE # define PIX_FMT_NE(be, le) PIX_FMT_##le
#endif #endif
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
@ -137,11 +137,11 @@ enum PixelFormat {
#define PIX_FMT_BGR32_1 PIX_FMT_ARGB #define PIX_FMT_BGR32_1 PIX_FMT_ARGB
#endif #endif
#define PIX_FMT_GRAY16 PIX_FMT_NE(GRAY16) #define PIX_FMT_GRAY16 PIX_FMT_NE(GRAY16BE, GRAY16LE)
#define PIX_FMT_RGB48 PIX_FMT_NE(RGB48) #define PIX_FMT_RGB48 PIX_FMT_NE(RGB48BE, RGB48LE)
#define PIX_FMT_RGB565 PIX_FMT_NE(RGB565) #define PIX_FMT_RGB565 PIX_FMT_NE(RGB565BE, RGB565LE)
#define PIX_FMT_RGB555 PIX_FMT_NE(RGB555) #define PIX_FMT_RGB555 PIX_FMT_NE(RGB555BE, RGB555LE)
#define PIX_FMT_BGR565 PIX_FMT_NE(BGR565) #define PIX_FMT_BGR565 PIX_FMT_NE(BGR565BE, BGR565LE)
#define PIX_FMT_BGR555 PIX_FMT_NE(BGR555) #define PIX_FMT_BGR555 PIX_FMT_NE(BGR555BE, BGR555LE)
#endif /* AVUTIL_PIXFMT_H */ #endif /* AVUTIL_PIXFMT_H */