Support 48-bit BGR as used in r10k.
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>
Tue, 30 Dec 2014 10:12:32 +0000 (10:12 +0000)
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>
Tue, 30 Dec 2014 10:12:32 +0000 (10:12 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@37348 b3059339-0415-0410-9bf9-f77b7e298cf2

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

index 4ca7ae6..b6825cc 100644 (file)
@@ -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},
index 15ac417..ee83f02 100644 (file)
@@ -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"
index 3f31552..4ff12bd 100644 (file)
@@ -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 },
index 3904bc1..085b38b 100644 (file)
@@ -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";
index 2b5296c..5f42378 100644 (file)
@@ -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
 #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)
index 3fa9bb6..5b9909d 100644 (file)
@@ -392,6 +392,10 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt,
       *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;
index 94b889e..2a15a5c 100644 (file)
@@ -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},