changeset 987:295ec9bebf93 libavcodec

new image formats - suppressed ill defined formats (endianness, unless specified, is always the one of the CPU) - added avcodec_get_pix_fmt_name()
author bellard
date Sat, 11 Jan 2003 00:04:36 +0000
parents be3ffaaf5a6d
children 001b7d3045e5
files avcodec.h
diffstat 1 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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,