[MPlayer-dev-eng] [PATCH]Support 64bit tiff via opengl

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Jan 14 13:47:30 CET 2012


Hi!

I don't know what side-effects the "|64" has.

Please comment, Carl Eugen
-------------- next part --------------
Index: libmpcodecs/mp_image.c
===================================================================
--- libmpcodecs/mp_image.c	(revision 34561)
+++ libmpcodecs/mp_image.c	(working copy)
@@ -107,7 +107,9 @@
     }
     mpi->num_planes=1;
     if (IMGFMT_IS_RGB(out_fmt)) {
+        if (out_fmt == IMGFMT_RGBA64LE || out_fmt == IMGFMT_RGBA64BE) {
+            mpi->bpp = 64;
-        if (IMGFMT_RGB_DEPTH(out_fmt) < 8 && !(out_fmt&128))
+        } else if (IMGFMT_RGB_DEPTH(out_fmt) < 8 && !(out_fmt&128))
             mpi->bpp = IMGFMT_RGB_DEPTH(out_fmt);
         else
             mpi->bpp=(IMGFMT_RGB_DEPTH(out_fmt)+7)&(~7);
Index: libmpcodecs/img_format.c
===================================================================
--- libmpcodecs/img_format.c	(revision 34561)
+++ libmpcodecs/img_format.c	(working copy)
@@ -37,6 +37,8 @@
 //  case IMGFMT_RGB32:   return "RGB 32-bit";
     case IMGFMT_RGB48LE: return "RGB 48-bit LE";
     case IMGFMT_RGB48BE: return "RGB 48-bit BE";
+    case IMGFMT_RGBA64LE:return "RGB 64-bit LE";
+    case IMGFMT_RGBA64BE:return "RGB 64-bit BE";
     case IMGFMT_BGR1:    return "BGR 1-bit";
     case IMGFMT_BGR4:    return "BGR 4-bit";
     case IMGFMT_BG4B:    return "BGR 4-bit per byte";
Index: libmpcodecs/img_format.h
===================================================================
--- libmpcodecs/img_format.h	(revision 34561)
+++ libmpcodecs/img_format.h	(working copy)
@@ -36,6 +36,8 @@
 #define IMGFMT_RGB32 (IMGFMT_RGB|32)
 #define IMGFMT_RGB48LE (IMGFMT_RGB|48)
 #define IMGFMT_RGB48BE (IMGFMT_RGB|48|128)
+#define IMGFMT_RGBA64LE (IMGFMT_RGB|64)
+#define IMGFMT_RGBA64BE (IMGFMT_RGB|64|128)
 
 #define IMGFMT_BGR_MASK 0xFFFFFF00
 #define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8))
@@ -56,6 +58,7 @@
 #define IMGFMT_BGRA    (IMGFMT_RGB32|64)
 #define IMGFMT_ARGB    IMGFMT_BGR32
 #define IMGFMT_RGBA    (IMGFMT_BGR32|64)
+#define IMGFMT_RGBA64NE IMGFMT_RGBA64BE
 #define IMGFMT_RGB48NE IMGFMT_RGB48BE
 #define IMGFMT_RGB12BE IMGFMT_RGB12
 #define IMGFMT_RGB12LE (IMGFMT_RGB12|64)
@@ -74,6 +77,7 @@
 #define IMGFMT_BGRA IMGFMT_BGR32
 #define IMGFMT_ARGB (IMGFMT_RGB32|64)
 #define IMGFMT_RGBA IMGFMT_RGB32
+#define IMGFMT_RGBA64NE IMGFMT_RGBA64LE
 #define IMGFMT_RGB48NE IMGFMT_RGB48LE
 #define IMGFMT_RGB12BE (IMGFMT_RGB12|64)
 #define IMGFMT_RGB12LE IMGFMT_RGB12
Index: fmt-conversion.c
===================================================================
--- fmt-conversion.c	(revision 34561)
+++ fmt-conversion.c	(working copy)
@@ -43,6 +43,8 @@
     {IMGFMT_RGB1,    PIX_FMT_MONOBLACK},
     {IMGFMT_RG4B,    PIX_FMT_BGR4_BYTE},
     {IMGFMT_BG4B,    PIX_FMT_RGB4_BYTE},
+    {IMGFMT_RGBA64LE,PIX_FMT_RGBA64LE},
+    {IMGFMT_RGBA64BE,PIX_FMT_RGBA64BE},
     {IMGFMT_RGB48LE, PIX_FMT_RGB48LE},
     {IMGFMT_RGB48BE, PIX_FMT_RGB48BE},
     {IMGFMT_ABGR,    PIX_FMT_ABGR},
Index: codec-cfg.c
===================================================================
--- codec-cfg.c	(revision 34561)
+++ codec-cfg.c	(working copy)
@@ -198,6 +198,8 @@
     {"UYVY",        IMGFMT_UYVY},
     {"YVYU",        IMGFMT_YVYU},
 
+    {"RGBA64LE",     IMGFMT_RGBA64LE},
+    {"RGBA64BE",     IMGFMT_RGBA64BE},
     {"RGB48LE",     IMGFMT_RGB48LE},
     {"RGB48BE",     IMGFMT_RGB48BE},
     {"RGB4",        IMGFMT_RGB4},
Index: m_option.c
===================================================================
--- m_option.c	(revision 34561)
+++ m_option.c	(working copy)
@@ -1126,6 +1126,8 @@
   {"bgr4", IMGFMT_BGR4},
   {"bg4b", IMGFMT_BG4B},
   {"bgr1", IMGFMT_BGR1},
+  {"rgba64be", IMGFMT_RGBA64BE},
+  {"rgba64le", IMGFMT_RGBA64LE},
   {"rgb48be", IMGFMT_RGB48BE},
   {"rgb48le", IMGFMT_RGB48LE},
   {"rgb48ne", IMGFMT_RGB48NE},
Index: libvo/gl_common.c
===================================================================
--- libvo/gl_common.c	(revision 34561)
+++ libvo/gl_common.c	(working copy)
@@ -272,6 +272,8 @@
   *bpp = IMGFMT_IS_BGR(fmt)?IMGFMT_BGR_DEPTH(fmt):IMGFMT_RGB_DEPTH(fmt);
   *gl_texfmt = 3;
   switch (fmt) {
+    case IMGFMT_RGBA64NE:
+      *gl_texfmt = 4;
     case IMGFMT_RGB48NE:
       *gl_format = GL_RGB;
       *gl_type = GL_UNSIGNED_SHORT;
Index: etc/codecs.conf
===================================================================
--- etc/codecs.conf	(revision 34561)
+++ etc/codecs.conf	(working copy)
@@ -578,7 +578,7 @@
   fourcc "tiff" ; for TIFF-encoded QuickTime files
   driver ffmpeg
   dll tiff
-  out BGR32,BGR24,BGR8,Y800,RGB32,RGB24,RGB8
+  out BGR32,BGR24,BGR8,Y800,RGBA64LE,RGB32,RGB24,RGB8
 
 videocodec ffpcx
   info "FFmpeg PCX"


More information about the MPlayer-dev-eng mailing list