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

cehoyos subversion at mplayerhq.hu
Tue Dec 30 11:12:33 CET 2014


Author: cehoyos
Date: Tue Dec 30 11:12:32 2014
New Revision: 37348

Log:
Support 48-bit BGR as used in r10k.

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

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/codec-cfg.c	Tue Dec 30 11:12:32 2014	(r37348)
@@ -216,6 +216,8 @@ static const struct {
     {"RGB64BE",     IMGFMT_RGB64BE},
     {"RGB48LE",     IMGFMT_RGB48LE},
     {"RGB48BE",     IMGFMT_RGB48BE},
+    {"BGR48LE",     IMGFMT_BGR48LE},
+    {"BGR48BE",     IMGFMT_BGR48BE},
     {"RGB4",        IMGFMT_RGB4},
     {"RGB8",        IMGFMT_RGB8},
     {"RGB15",       IMGFMT_RGB15},

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/etc/codecs.conf	Tue Dec 30 11:12:32 2014	(r37348)
@@ -270,9 +270,11 @@ videocodec ffr10k
   info "FFmpeg R10k - 10-bit RGB"
   status working
   fourcc R10k,R10g
+  fourcc r10k
   driver ffmpeg
   dll "r10k"
   out RGB48BE,RGB48LE
+  out BGR48BE,BGR48LE
 
 videocodec ffavrp
   info "FFmpeg Avid 1:1 10-bit RGB Packer"

Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/fmt-conversion.c	Tue Dec 30 11:12:32 2014	(r37348)
@@ -30,6 +30,8 @@ static const struct {
 } conversion_map[] = {
     { IMGFMT_ARGB,       AV_PIX_FMT_ARGB },
     { IMGFMT_BGRA,       AV_PIX_FMT_BGRA },
+    { IMGFMT_BGR48LE,    AV_PIX_FMT_BGR48LE },
+    { IMGFMT_BGR48BE,    AV_PIX_FMT_BGR48BE },
     { IMGFMT_BGR24,      AV_PIX_FMT_BGR24 },
     { IMGFMT_BGR16BE,    AV_PIX_FMT_RGB565BE },
     { IMGFMT_BGR16LE,    AV_PIX_FMT_RGB565LE },

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/libmpcodecs/img_format.c	Tue Dec 30 11:12:32 2014	(r37348)
@@ -48,6 +48,8 @@ const char *vo_format_name(int format)
     case IMGFMT_BGR16:   return "BGR 16-bit";
     case IMGFMT_BGR24:   return "BGR 24-bit";
 //  case IMGFMT_BGR32:   return "BGR 32-bit";
+    case IMGFMT_BGR48LE: return "BGR 48-bit LE";
+    case IMGFMT_BGR48BE: return "BGR 48-bit BE";
     case IMGFMT_ABGR:    return "ABGR";
     case IMGFMT_BGRA:    return "BGRA";
     case IMGFMT_ARGB:    return "ARGB";

Modified: trunk/libmpcodecs/img_format.h
==============================================================================
--- trunk/libmpcodecs/img_format.h	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/libmpcodecs/img_format.h	Tue Dec 30 11:12:32 2014	(r37348)
@@ -50,6 +50,8 @@
 #define IMGFMT_BGR16 (IMGFMT_BGR|16)
 #define IMGFMT_BGR24 (IMGFMT_BGR|24)
 #define IMGFMT_BGR32 (IMGFMT_BGR|32)
+#define IMGFMT_BGR48LE (IMGFMT_BGR|48)
+#define IMGFMT_BGR48BE (IMGFMT_BGR|48|128)
 
 #define IMGFMT_XYZ_MASK 0xFFFFFF00
 #define IMGFMT_XYZ (('X'<<24)|('Y'<<16)|('Z'<<8))
@@ -75,6 +77,7 @@
 #define IMGFMT_RGB15LE (IMGFMT_RGB15|128)
 #define IMGFMT_RGB16BE IMGFMT_RGB16
 #define IMGFMT_RGB16LE (IMGFMT_RGB16|128)
+#define IMGFMT_BGR48NE IMGFMT_BGR48BE
 #define IMGFMT_BGR12BE IMGFMT_BGR12
 #define IMGFMT_BGR12LE (IMGFMT_BGR12|128)
 #define IMGFMT_BGR15BE IMGFMT_BGR15
@@ -97,6 +100,7 @@
 #define IMGFMT_RGB15LE IMGFMT_RGB15
 #define IMGFMT_RGB16BE (IMGFMT_RGB16|128)
 #define IMGFMT_RGB16LE IMGFMT_RGB16
+#define IMGFMT_BGR48NE IMGFMT_BGR48LE
 #define IMGFMT_BGR12BE (IMGFMT_BGR12|128)
 #define IMGFMT_BGR12LE IMGFMT_BGR12
 #define IMGFMT_BGR15BE (IMGFMT_BGR15|128)

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/libvo/gl_common.c	Tue Dec 30 11:12:32 2014	(r37348)
@@ -392,6 +392,10 @@ int glFindFormat(uint32_t fmt, int *bpp,
       *gl_format = GL_BGRA;
       *gl_type = GL_UNSIGNED_BYTE;
       break;
+    case IMGFMT_BGR48NE:
+      *gl_format = GL_BGR;
+      *gl_type = GL_UNSIGNED_SHORT;
+      break;
     default:
       *gl_texfmt = GL_RGBA;
       *gl_format = GL_RGBA;

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	Tue Dec 30 09:59:22 2014	(r37347)
+++ trunk/m_option.c	Tue Dec 30 11:12:32 2014	(r37348)
@@ -1127,6 +1127,8 @@ static struct {
   {"y16le", IMGFMT_Y16_LE},
   {"nv12", IMGFMT_NV12},
   {"nv21", IMGFMT_NV21},
+  {"bgr48le", IMGFMT_BGR48LE},
+  {"bgr48be", IMGFMT_BGR48BE},
   {"bgr24", IMGFMT_BGR24},
   {"bgr32", IMGFMT_BGR32},
   {"bgr16", IMGFMT_BGR16},


More information about the MPlayer-cvslog mailing list