# HG changeset patch # User bellard # Date 1042243476 0 # Node ID 295ec9bebf932db3596082a1f00b3fc5887d2832 # Parent be3ffaaf5a6d82e6ca1fdc21dce8d4e1ff58a13b new image formats - suppressed ill defined formats (endianness, unless specified, is always the one of the CPU) - added avcodec_get_pix_fmt_name() diff -r be3ffaaf5a6d -r 295ec9bebf93 avcodec.h --- a/avcodec.h Fri Jan 10 13:35:15 2003 +0000 +++ b/avcodec.h Sat Jan 11 00:04:36 2003 +0000 @@ -62,21 +62,19 @@ enum PixelFormat { PIX_FMT_YUV420P, PIX_FMT_YUV422, - PIX_FMT_RGB24, - PIX_FMT_BGR24, + PIX_FMT_RGB24, /* 3 bytes, R is first */ + PIX_FMT_BGR24, /* 3 bytes, B is first */ PIX_FMT_YUV422P, PIX_FMT_YUV444P, - PIX_FMT_RGBA32, - PIX_FMT_BGRA32, + PIX_FMT_RGBA32, /* always stored in cpu endianness */ PIX_FMT_YUV410P, PIX_FMT_YUV411P, - PIX_FMT_RGB565, - PIX_FMT_RGB555, -// PIX_FMT_RGB5551, - PIX_FMT_BGR565, - PIX_FMT_BGR555, -// PIX_FMT_GBR565, -// PIX_FMT_GBR555 + PIX_FMT_RGB565, /* always stored in cpu endianness */ + PIX_FMT_RGB555, /* always stored in cpu endianness, most significant bit to 1 */ + PIX_FMT_GRAY8, + PIX_FMT_MONOWHITE, /* 0 is white */ + PIX_FMT_MONOBLACK, /* 0 is black */ + PIX_FMT_NB, }; /* currently unused, may be used if 24/32 bits samples ever supported */ @@ -1052,7 +1050,8 @@ void avpicture_fill(AVPicture *picture, UINT8 *ptr, int pix_fmt, int width, int height); int avpicture_get_size(int pix_fmt, int width, int height); -void avcodec_get_chroma_sub_sample(int fmt, int *h_shift, int *v_shift); +void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift); +const char *avcodec_get_pix_fmt_name(int pix_fmt); /* convert among pixel formats */ int img_convert(AVPicture *dst, int dst_pix_fmt,