[MPlayer-cvslog] r30353 - in trunk: fmt-conversion.c libmpcodecs/img_format.h

reimar subversion at mplayerhq.hu
Sun Jan 17 15:54:38 CET 2010


Author: reimar
Date: Sun Jan 17 15:54:38 2010
New Revision: 30353

Log:
Add big- and little-endian variants of the 15 and 16 bit RGB/BGR formats.

Modified:
   trunk/fmt-conversion.c
   trunk/libmpcodecs/img_format.h

Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c	Sun Jan 17 15:53:12 2010	(r30352)
+++ trunk/fmt-conversion.c	Sun Jan 17 15:54:38 2010	(r30353)
@@ -28,8 +28,10 @@ static const struct {
     {IMGFMT_ARGB, PIX_FMT_ARGB},
     {IMGFMT_BGRA, PIX_FMT_BGRA},
     {IMGFMT_BGR24, PIX_FMT_BGR24},
-    {IMGFMT_BGR16, PIX_FMT_RGB565},
-    {IMGFMT_BGR15, PIX_FMT_RGB555},
+    {IMGFMT_BGR16BE, PIX_FMT_RGB565BE},
+    {IMGFMT_BGR16LE, PIX_FMT_RGB565LE},
+    {IMGFMT_BGR15BE, PIX_FMT_RGB555BE},
+    {IMGFMT_BGR15LE, PIX_FMT_RGB555LE},
     {IMGFMT_BGR8,  PIX_FMT_RGB8},
     {IMGFMT_BGR4,  PIX_FMT_RGB4},
     {IMGFMT_BGR1,  PIX_FMT_MONOBLACK},
@@ -41,8 +43,10 @@ static const struct {
     {IMGFMT_ABGR, PIX_FMT_ABGR},
     {IMGFMT_RGBA, PIX_FMT_RGBA},
     {IMGFMT_RGB24, PIX_FMT_RGB24},
-    {IMGFMT_RGB16, PIX_FMT_BGR565},
-    {IMGFMT_RGB15, PIX_FMT_BGR555},
+    {IMGFMT_RGB16BE, PIX_FMT_BGR565BE},
+    {IMGFMT_RGB16LE, PIX_FMT_BGR565LE},
+    {IMGFMT_RGB15BE, PIX_FMT_BGR555BE},
+    {IMGFMT_RGB15LE, PIX_FMT_BGR555LE},
     {IMGFMT_RGB8,  PIX_FMT_BGR8},
     {IMGFMT_RGB4,  PIX_FMT_BGR4},
     {IMGFMT_BGR8,  PIX_FMT_PAL8},

Modified: trunk/libmpcodecs/img_format.h
==============================================================================
--- trunk/libmpcodecs/img_format.h	Sun Jan 17 15:53:12 2010	(r30352)
+++ trunk/libmpcodecs/img_format.h	Sun Jan 17 15:54:38 2010	(r30353)
@@ -35,12 +35,28 @@
 #define IMGFMT_ARGB IMGFMT_BGR32
 #define IMGFMT_RGBA (IMGFMT_BGR32|64)
 #define IMGFMT_RGB48NE IMGFMT_RGB48BE
+#define IMGFMT_RGB15BE IMGFMT_RGB15
+#define IMGFMT_RGB15LE (IMGFMT_RGB15|64)
+#define IMGFMT_RGB16BE IMGFMT_RGB16
+#define IMGFMT_RGB16LE (IMGFMT_RGB16|64)
+#define IMGFMT_BGR15BE IMGFMT_BGR15
+#define IMGFMT_BGR15LE (IMGFMT_BGR15|64)
+#define IMGFMT_BGR16BE IMGFMT_BGR16
+#define IMGFMT_BGR16LE (IMGFMT_BGR16|64)
 #else
 #define IMGFMT_ABGR (IMGFMT_BGR32|64)
 #define IMGFMT_BGRA IMGFMT_BGR32
 #define IMGFMT_ARGB (IMGFMT_RGB32|64)
 #define IMGFMT_RGBA IMGFMT_RGB32
 #define IMGFMT_RGB48NE IMGFMT_RGB48LE
+#define IMGFMT_RGB15BE (IMGFMT_RGB15|64)
+#define IMGFMT_RGB15LE IMGFMT_RGB15
+#define IMGFMT_RGB16BE (IMGFMT_RGB16|64)
+#define IMGFMT_RGB16LE IMGFMT_RGB16
+#define IMGFMT_BGR15BE (IMGFMT_BGR15|64)
+#define IMGFMT_BGR15LE IMGFMT_BGR15
+#define IMGFMT_BGR16BE (IMGFMT_BGR16|64)
+#define IMGFMT_BGR16LE IMGFMT_BGR16
 #endif
 
 /* old names for compatibility */


More information about the MPlayer-cvslog mailing list