[MPlayer-cvslog] r35026 - in trunk: codec-cfg.c fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/mp_image.c libmpcodecs/vf_scale.c m_option.c

cehoyos subversion at mplayerhq.hu
Sun Jul 15 22:27:13 CEST 2012


Author: cehoyos
Date: Sun Jul 15 22:27:13 2012
New Revision: 35026

Log:
Add missing aequivalents for PIX_FMT_GRAY8A and PIX_FMT_GRAY16*.

Modified:
   trunk/codec-cfg.c
   trunk/fmt-conversion.c
   trunk/libmpcodecs/img_format.c
   trunk/libmpcodecs/img_format.h
   trunk/libmpcodecs/mp_image.c
   trunk/libmpcodecs/vf_scale.c
   trunk/m_option.c

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/codec-cfg.c	Sun Jul 15 22:27:13 2012	(r35026)
@@ -200,7 +200,11 @@ static const struct {
     {"411P",        IMGFMT_411P},
     {"440P",        IMGFMT_440P},
     {"Y800",        IMGFMT_Y800},
+    {"Y8A",         IMGFMT_Y8A},
     {"Y8",          IMGFMT_Y8},
+    {"Y16",         IMGFMT_Y16},
+    {"Y16LE",       IMGFMT_Y16_LE},
+    {"Y16BE",       IMGFMT_Y16_BE},
 
     {"YUY2",        IMGFMT_YUY2},
     {"UYVY",        IMGFMT_UYVY},

Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/fmt-conversion.c	Sun Jul 15 22:27:13 2012	(r35026)
@@ -86,7 +86,10 @@ static const struct {
     {IMGFMT_444P14_BE,  PIX_FMT_YUV444P14BE},
     {IMGFMT_444P12_LE,  PIX_FMT_YUV444P12LE},
     {IMGFMT_444P12_BE,  PIX_FMT_YUV444P12BE},
+    {IMGFMT_Y8A,        PIX_FMT_GRAY8A},
 #endif
+    {IMGFMT_Y16_LE,  PIX_FMT_GRAY16LE},
+    {IMGFMT_Y16_BE,  PIX_FMT_GRAY16BE},
     {IMGFMT_YUY2,    PIX_FMT_YUYV422},
     {IMGFMT_UYVY,    PIX_FMT_UYVY422},
     {IMGFMT_NV12,    PIX_FMT_NV12},

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/libmpcodecs/img_format.c	Sun Jul 15 22:27:13 2012	(r35026)
@@ -63,6 +63,9 @@ const char *vo_format_name(int format)
     case IMGFMT_CLPL:    return "Planar CLPL";
     case IMGFMT_Y800:    return "Planar Y800";
     case IMGFMT_Y8:      return "Planar Y8";
+    case IMGFMT_Y8A:     return "Planar Y8 with alpha";
+    case IMGFMT_Y16_LE:  return "Planar Y16 little-endian";
+    case IMGFMT_Y16_BE:  return "Planar Y16 big-endian";
     case IMGFMT_420P16_LE: return "Planar 420P 16-bit little-endian";
     case IMGFMT_420P16_BE: return "Planar 420P 16-bit big-endian";
     case IMGFMT_420P14_LE: return "Planar 420P 14-bit little-endian";

Modified: trunk/libmpcodecs/img_format.h
==============================================================================
--- trunk/libmpcodecs/img_format.h	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/libmpcodecs/img_format.h	Sun Jul 15 22:27:13 2012	(r35026)
@@ -124,6 +124,7 @@
 #define IMGFMT_Y8   0x20203859
 #define IMGFMT_NV12 0x3231564E
 #define IMGFMT_NV21 0x3132564E
+#define IMGFMT_Y16_LE 0x20363159
 
 /* unofficial Planar Formats, FIXME if official 4CC exists */
 #define IMGFMT_444P 0x50343434
@@ -131,7 +132,10 @@
 #define IMGFMT_411P 0x50313134
 #define IMGFMT_440P 0x50303434
 #define IMGFMT_HM12 0x32314D48
+#define IMGFMT_Y16_BE 0x59313620
 
+// Gray with alpha
+#define IMGFMT_Y8A 0x59320008
 // 4:2:0 planar with alpha
 #define IMGFMT_420A 0x41303234
 // 4:2:2 planar with alpha
@@ -185,6 +189,7 @@
 #define IMGFMT_420P12 IMGFMT_420P12_BE
 #define IMGFMT_420P10 IMGFMT_420P10_BE
 #define IMGFMT_420P9  IMGFMT_420P9_BE
+#define IMGFMT_Y16    IMGFMT_Y16_BE
 #define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_BE(fmt)
 #else
 #define IMGFMT_444P16 IMGFMT_444P16_LE
@@ -202,6 +207,7 @@
 #define IMGFMT_420P12 IMGFMT_420P12_LE
 #define IMGFMT_420P10 IMGFMT_420P10_LE
 #define IMGFMT_420P9  IMGFMT_420P9_LE
+#define IMGFMT_Y16    IMGFMT_Y16_LE
 #define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_LE(fmt)
 #endif
 

Modified: trunk/libmpcodecs/mp_image.c
==============================================================================
--- trunk/libmpcodecs/mp_image.c	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/libmpcodecs/mp_image.c	Sun Jul 15 22:27:13 2012	(r35026)
@@ -189,12 +189,18 @@ void mp_image_setfmt(mp_image_t* mpi,uns
     case IMGFMT_420P9_LE:
     case IMGFMT_420P9_BE:
         return;
+    case IMGFMT_Y16_LE:
+    case IMGFMT_Y16_BE:
+        mpi->bpp=16;
     case IMGFMT_Y800:
     case IMGFMT_Y8:
         /* they're planar ones, but for easier handling use them as packed */
         mpi->flags&=~MP_IMGFLAG_PLANAR;
         mpi->num_planes=1;
         return;
+    case IMGFMT_Y8A:
+        mpi->num_planes=2;
+        return;
     case IMGFMT_UYVY:
         mpi->flags|=MP_IMGFLAG_SWAPPED;
     case IMGFMT_YUY2:

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/libmpcodecs/vf_scale.c	Sun Jul 15 22:27:13 2012	(r35026)
@@ -131,6 +131,9 @@ static const unsigned int outfmt_list[]=
     IMGFMT_RGB12,
     IMGFMT_Y800,
     IMGFMT_Y8,
+    IMGFMT_Y8A,
+    IMGFMT_Y16_LE,
+    IMGFMT_Y16_BE,
     IMGFMT_BGR8,
     IMGFMT_RGB8,
     IMGFMT_BGR4,

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	Sun Jul 15 15:07:46 2012	(r35025)
+++ trunk/m_option.c	Sun Jul 15 22:27:13 2012	(r35026)
@@ -1125,6 +1125,9 @@ static struct {
   {"hm12", IMGFMT_HM12},
   {"y800", IMGFMT_Y800},
   {"y8",   IMGFMT_Y8},
+  {"y8a",  IMGFMT_Y8A},
+  {"y16be", IMGFMT_Y16_BE},
+  {"y16le", IMGFMT_Y16_LE},
   {"nv12", IMGFMT_NV12},
   {"nv21", IMGFMT_NV21},
   {"bgr24", IMGFMT_BGR24},


More information about the MPlayer-cvslog mailing list