[MPlayer-cvslog] r36198 - in trunk: codec-cfg.c etc/codecs.conf fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/mp_image.c m_option.c

cehoyos subversion at mplayerhq.hu
Wed May 1 13:18:59 CEST 2013


Author: cehoyos
Date: Wed May  1 13:18:58 2013
New Revision: 36198

Log:
Support playback of JPEG 2000 digital cinema files.

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

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/codec-cfg.c	Wed May  1 13:18:58 2013	(r36198)
@@ -235,6 +235,7 @@ static const struct {
     {"ABGR",        IMGFMT_ABGR},
     {"RGB1",        IMGFMT_RGB1},
     {"BGR1",        IMGFMT_BGR1},
+    {"XYZ12",       IMGFMT_XYZ12},
     {"GBR24P",      IMGFMT_GBR24P},
     {"GBR12P",      IMGFMT_GBR12P},
     {"GBR14P",      IMGFMT_GBR14P},

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/etc/codecs.conf	Wed May  1 13:18:58 2013	(r36198)
@@ -1954,6 +1954,16 @@ videocodec fflibopenjpeg
   out 444P16,444P14,444P12,444P10,444P9
   out 420A,422A,444A
 
+videocodec ffjpeg2000
+  info "FFmpeg JPEG 2000 digital cinema"
+  status working
+  fourcc mjp2
+  driver ffmpeg
+  dll "jpeg2000"
+  out XYZ12
+  out Y800,Y16
+  out RGB48LE,RGB48BE,RGB32,BGR32,RGB24
+
 videocodec ffj2k
   info "FFmpeg JPEG 2000"
   status working

Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/fmt-conversion.c	Wed May  1 13:18:58 2013	(r36198)
@@ -64,6 +64,8 @@ static const struct {
     { IMGFMT_RGB64LE,    AV_PIX_FMT_RGBA64LE },
     { IMGFMT_RGB64BE,    AV_PIX_FMT_RGBA64BE },
 #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
+    { IMGFMT_XYZ12LE,    AV_PIX_FMT_XYZ12LE },
+    { IMGFMT_XYZ12BE,    AV_PIX_FMT_XYZ12BE },
     { IMGFMT_422A,       AV_PIX_FMT_YUVA422P },
     { IMGFMT_444A,       AV_PIX_FMT_YUVA444P },
     { IMGFMT_GBR24P,     AV_PIX_FMT_GBRP },

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/libmpcodecs/img_format.c	Wed May  1 13:18:58 2013	(r36198)
@@ -52,6 +52,8 @@ const char *vo_format_name(int format)
     case IMGFMT_BGRA:    return "BGRA";
     case IMGFMT_ARGB:    return "ARGB";
     case IMGFMT_RGBA:    return "RGBA";
+    case IMGFMT_XYZ12LE: return "XYZ 36-bit LE";
+    case IMGFMT_XYZ12BE: return "XYZ 36-bit BE";
     case IMGFMT_GBR24P:  return "Planar GBR 24-bit";
     case IMGFMT_GBR12P:  return "Planar GBR 36-bit";
     case IMGFMT_GBR14P:  return "Planar GBR 42-bit";

Modified: trunk/libmpcodecs/img_format.h
==============================================================================
--- trunk/libmpcodecs/img_format.h	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/libmpcodecs/img_format.h	Wed May  1 13:18:58 2013	(r36198)
@@ -51,6 +51,11 @@
 #define IMGFMT_BGR24 (IMGFMT_BGR|24)
 #define IMGFMT_BGR32 (IMGFMT_BGR|32)
 
+#define IMGFMT_XYZ_MASK 0xFFFFFF00
+#define IMGFMT_XYZ (('X'<<24)|('Y'<<16)|('Z'<<8))
+#define IMGFMT_XYZ12LE (IMGFMT_XYZ|12)
+#define IMGFMT_XYZ12BE (IMGFMT_XYZ|12|128)
+
 #define IMGFMT_GBR24P (('G'<<24)|('B'<<16)|('R'<<8)|24)
 #define IMGFMT_GBR12PLE (('G'<<24)|('B'<<16)|('R'<<8)|36)
 #define IMGFMT_GBR12PBE (('G'<<24)|('B'<<16)|('R'<<8)|36|128)
@@ -76,6 +81,7 @@
 #define IMGFMT_BGR15LE (IMGFMT_BGR15|128)
 #define IMGFMT_BGR16BE IMGFMT_BGR16
 #define IMGFMT_BGR16LE (IMGFMT_BGR16|128)
+#define IMGFMT_XYZ12  IMGFMT_XYZ12BE
 #define IMGFMT_GBR12P IMGFMT_GBR12PBE
 #define IMGFMT_GBR14P IMGFMT_GBR14PBE
 #else
@@ -97,6 +103,7 @@
 #define IMGFMT_BGR15LE IMGFMT_BGR15
 #define IMGFMT_BGR16BE (IMGFMT_BGR16|128)
 #define IMGFMT_BGR16LE IMGFMT_BGR16
+#define IMGFMT_XYZ12  IMGFMT_XYZ12LE
 #define IMGFMT_GBR12P IMGFMT_GBR12PLE
 #define IMGFMT_GBR14P IMGFMT_GBR14PLE
 #endif
@@ -107,9 +114,11 @@
 
 #define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
 #define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
+#define IMGFMT_IS_XYZ(fmt) (((fmt)&IMGFMT_XYZ_MASK)==IMGFMT_XYZ)
 
 #define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x7F)
 #define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x7F)
+#define IMGFMT_XYZ_DEPTH(fmt) ((fmt)&0x7F)
 
 
 /* Planar YUV Formats */

Modified: trunk/libmpcodecs/mp_image.c
==============================================================================
--- trunk/libmpcodecs/mp_image.c	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/libmpcodecs/mp_image.c	Wed May  1 13:18:58 2013	(r36198)
@@ -121,6 +121,10 @@ void mp_image_setfmt(mp_image_t* mpi,uns
         mpi->flags|=MP_IMGFLAG_SWAPPED;
         return;
     }
+    if (IMGFMT_IS_XYZ(out_fmt)) {
+        mpi->bpp=3*IMGFMT_XYZ_DEPTH(out_fmt);
+        return;
+    }
     mpi->num_planes=3;
     if (out_fmt == IMGFMT_GBR24P) {
         mpi->bpp=24;

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	Tue Apr 30 15:10:27 2013	(r36197)
+++ trunk/m_option.c	Wed May  1 13:18:58 2013	(r36198)
@@ -1166,6 +1166,8 @@ static struct {
   {"argb", IMGFMT_ARGB},
   {"bgra", IMGFMT_BGRA},
   {"abgr", IMGFMT_ABGR},
+  {"xyz12be",  IMGFMT_XYZ12LE},
+  {"xyz12le",  IMGFMT_XYZ12BE},
   {"gbr14pbe", IMGFMT_GBR14PLE},
   {"gbr14ple", IMGFMT_GBR14PBE},
   {"gbr12pbe", IMGFMT_GBR12PLE},


More information about the MPlayer-cvslog mailing list