changeset 34572:2a372b469420

Support displaying 64bit RGB via OpenGL.
author cehoyos
date Tue, 07 Feb 2012 23:04:30 +0000
parents 463e0da69743
children 2d60b7bc2918
files codec-cfg.c etc/codecs.conf fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libvo/gl_common.c m_option.c
diffstat 7 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/codec-cfg.c	Tue Feb 07 22:07:09 2012 +0000
+++ b/codec-cfg.c	Tue Feb 07 23:04:30 2012 +0000
@@ -199,6 +199,8 @@
     {"UYVY",        IMGFMT_UYVY},
     {"YVYU",        IMGFMT_YVYU},
 
+    {"RGB64LE",     IMGFMT_RGB64LE},
+    {"RGB64BE",     IMGFMT_RGB64BE},
     {"RGB48LE",     IMGFMT_RGB48LE},
     {"RGB48BE",     IMGFMT_RGB48BE},
     {"RGB4",        IMGFMT_RGB4},
--- a/etc/codecs.conf	Tue Feb 07 22:07:09 2012 +0000
+++ b/etc/codecs.conf	Tue Feb 07 23:04:30 2012 +0000
@@ -579,7 +579,7 @@
   fourcc "dpx " ; "dpx " is an internal MPlayer FOURCC
   driver ffmpeg
   dll dpx
-  out RGB48BE,RGB48LE,RGB24,RGBA
+  out RGB64BE,RGB64LE,RGB48BE,RGB48LE,RGB24,RGBA
 
 videocodec ffgif
   info "FFmpeg GIF"
@@ -595,7 +595,7 @@
   fourcc "tiff" ; for TIFF-encoded QuickTime files
   driver ffmpeg
   dll tiff
-  out BGR8,Y800,RGB48BE,RGB48LE,RGBA,RGB32,RGB24
+  out BGR32,BGR24,BGR8,Y800,RGB64LE,RGB64BE,RGB32,RGB24,RGB8
 
 videocodec ffpcx
   info "FFmpeg PCX"
@@ -612,7 +612,7 @@
   fourcc "png " ; for PNG-encoded QuickTime files
   driver ffmpeg
   dll png
-  out BGR32,BGR8,Y800,RGB48BE,RGBA,RGB24
+  out BGR32,BGR8,Y800,RGB64BE,RGB48BE,RGBA,RGB24
 
 videocodec mpng
   info "PNG image"
@@ -655,7 +655,7 @@
   fourcc SGI1 ; SGI1 is an internal MPlayer FOURCC
   driver ffmpeg
   dll sgi
-  out RGB24,Y800,RGB48BE,RGBA
+  out RGB24,Y800,RGB64BE,RGB48BE,RGBA
 
 videocodec sgi
   info "SGI image"
@@ -1798,6 +1798,7 @@
   fourcc mjp2
   driver ffmpeg
   dll "libopenjpeg"
+  out RGB64LE,RGB64BE
   out RGB24,RGB32,BGR32,Y8,Y800
   out 420P16,420P10,420P9
   out 422P16,422P10,422P9
--- a/fmt-conversion.c	Tue Feb 07 22:07:09 2012 +0000
+++ b/fmt-conversion.c	Tue Feb 07 23:04:30 2012 +0000
@@ -63,6 +63,8 @@
     {IMGFMT_BGR32,   PIX_FMT_0RGB32},
     {IMGFMT_BGRA,    PIX_FMT_BGR0},
     {IMGFMT_RGBA,    PIX_FMT_RGB0},
+    {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
+    {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
     {IMGFMT_444A,    PIX_FMT_YUVA444P},
 #endif
 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
--- a/libmpcodecs/img_format.c	Tue Feb 07 22:07:09 2012 +0000
+++ b/libmpcodecs/img_format.c	Tue Feb 07 23:04:30 2012 +0000
@@ -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_RGB64LE: return "RGB 64-bit LE";
+    case IMGFMT_RGB64BE: 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";
--- a/libmpcodecs/img_format.h	Tue Feb 07 22:07:09 2012 +0000
+++ b/libmpcodecs/img_format.h	Tue Feb 07 23:04:30 2012 +0000
@@ -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_RGB64LE (IMGFMT_RGB|64)
+#define IMGFMT_RGB64BE (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|128)
 #define IMGFMT_ARGB    IMGFMT_BGR32
 #define IMGFMT_RGBA    (IMGFMT_BGR32|128)
+#define IMGFMT_RGB64NE IMGFMT_RGB64BE
 #define IMGFMT_RGB48NE IMGFMT_RGB48BE
 #define IMGFMT_RGB12BE IMGFMT_RGB12
 #define IMGFMT_RGB12LE (IMGFMT_RGB12|128)
@@ -74,6 +77,7 @@
 #define IMGFMT_BGRA IMGFMT_BGR32
 #define IMGFMT_ARGB (IMGFMT_RGB32|128)
 #define IMGFMT_RGBA IMGFMT_RGB32
+#define IMGFMT_RGB64NE IMGFMT_RGB64LE
 #define IMGFMT_RGB48NE IMGFMT_RGB48LE
 #define IMGFMT_RGB12BE (IMGFMT_RGB12|128)
 #define IMGFMT_RGB12LE IMGFMT_RGB12
@@ -96,8 +100,8 @@
 #define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
 #define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
 
-#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x3F)
-#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x3F)
+#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x7F)
+#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x7F)
 
 
 /* Planar YUV Formats */
--- a/libvo/gl_common.c	Tue Feb 07 22:07:09 2012 +0000
+++ b/libvo/gl_common.c	Tue Feb 07 23:04:30 2012 +0000
@@ -272,6 +272,8 @@
   *bpp = IMGFMT_IS_BGR(fmt)?IMGFMT_BGR_DEPTH(fmt):IMGFMT_RGB_DEPTH(fmt);
   *gl_texfmt = 3;
   switch (fmt) {
+    case IMGFMT_RGB64NE:
+      *gl_texfmt = 4;
     case IMGFMT_RGB48NE:
       *gl_format = GL_RGB;
       *gl_type = GL_UNSIGNED_SHORT;
--- a/m_option.c	Tue Feb 07 22:07:09 2012 +0000
+++ b/m_option.c	Tue Feb 07 23:04:30 2012 +0000
@@ -1127,6 +1127,8 @@
   {"bgr4", IMGFMT_BGR4},
   {"bg4b", IMGFMT_BG4B},
   {"bgr1", IMGFMT_BGR1},
+  {"rgb64be", IMGFMT_RGB64BE},
+  {"rgb64le", IMGFMT_RGB64LE},
   {"rgb48be", IMGFMT_RGB48BE},
   {"rgb48le", IMGFMT_RGB48LE},
   {"rgb48ne", IMGFMT_RGB48NE},