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

cehoyos subversion at mplayerhq.hu
Sun Oct 23 22:40:32 CEST 2011


Author: cehoyos
Date: Sun Oct 23 22:40:31 2011
New Revision: 34245

Log:
Support planar GBR24 decoding.

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/libmpcodecs/vf_scale.c
   trunk/m_option.c

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/codec-cfg.c	Sun Oct 23 22:40:31 2011	(r34245)
@@ -212,6 +212,7 @@ static const struct {
     {"BGR32", IMGFMT_BGR32},
     {"RGB1",  IMGFMT_RGB1},
     {"BGR1",  IMGFMT_BGR1},
+    {"GBR24P", IMGFMT_GBR24P},
 
     {"MPES",  IMGFMT_MPEGPES},
     {"ZRMJPEGNI", IMGFMT_ZRMJPEGNI},

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/etc/codecs.conf	Sun Oct 23 22:40:31 2011	(r34245)
@@ -1115,6 +1115,7 @@ videocodec ffh264
   out YV12,I420,IYUV,420P10,420P9
   out 422P,422P10
   out 444P,444P10
+  out GBR24P
 
 videocodec ffh264vdpau
   info "FFmpeg H.264 (VDPAU)"

Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/fmt-conversion.c	Sun Oct 23 22:40:31 2011	(r34245)
@@ -57,6 +57,7 @@ static const struct {
     {IMGFMT_RGB8,  PIX_FMT_BGR8},
     {IMGFMT_RGB4,  PIX_FMT_BGR4},
     {IMGFMT_BGR8,  PIX_FMT_PAL8},
+    {IMGFMT_GBR24P, PIX_FMT_GBR24P},
     {IMGFMT_YUY2,  PIX_FMT_YUYV422},
     {IMGFMT_UYVY,  PIX_FMT_UYVY422},
     {IMGFMT_NV12,  PIX_FMT_NV12},

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/libmpcodecs/img_format.c	Sun Oct 23 22:40:31 2011	(r34245)
@@ -50,6 +50,7 @@ const char *vo_format_name(int format)
     case IMGFMT_BGRA: return "BGRA";
     case IMGFMT_ARGB: return "ARGB";
     case IMGFMT_RGBA: return "RGBA";
+    case IMGFMT_GBR24P: return "Planar GBR 24-bit";
     case IMGFMT_YVU9: return "Planar YVU9";
     case IMGFMT_IF09: return "Planar IF09";
     case IMGFMT_YV12: return "Planar YV12";

Modified: trunk/libmpcodecs/img_format.h
==============================================================================
--- trunk/libmpcodecs/img_format.h	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/libmpcodecs/img_format.h	Sun Oct 23 22:40:31 2011	(r34245)
@@ -49,6 +49,8 @@
 #define IMGFMT_BGR24 (IMGFMT_BGR|24)
 #define IMGFMT_BGR32 (IMGFMT_BGR|32)
 
+#define IMGFMT_GBR24P (('G'<<24)|('B'<<16)|('R'<<8)|24)
+
 #if HAVE_BIGENDIAN
 #define IMGFMT_ABGR IMGFMT_RGB32
 #define IMGFMT_BGRA (IMGFMT_RGB32|64)

Modified: trunk/libmpcodecs/mp_image.c
==============================================================================
--- trunk/libmpcodecs/mp_image.c	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/libmpcodecs/mp_image.c	Sun Oct 23 22:40:31 2011	(r34245)
@@ -121,8 +121,13 @@ void mp_image_setfmt(mp_image_t* mpi,uns
         mpi->flags|=MP_IMGFLAG_SWAPPED;
         return;
     }
-    mpi->flags|=MP_IMGFLAG_YUV;
     mpi->num_planes=3;
+    if (out_fmt == IMGFMT_GBR24P) {
+        mpi->bpp=24;
+        mpi->flags|=MP_IMGFLAG_PLANAR;
+        return;
+    }
+    mpi->flags|=MP_IMGFLAG_YUV;
     if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) {
         mpi->flags|=MP_IMGFLAG_PLANAR;
         mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL);

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/libmpcodecs/vf_scale.c	Sun Oct 23 22:40:31 2011	(r34245)
@@ -98,6 +98,7 @@ static const unsigned int outfmt_list[]=
     IMGFMT_RGB32,
     IMGFMT_BGR24,
     IMGFMT_RGB24,
+    IMGFMT_GBR24P,
     IMGFMT_RGB48LE,
     IMGFMT_RGB48BE,
     IMGFMT_BGR16,

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	Sun Oct 23 14:14:45 2011	(r34244)
+++ trunk/m_option.c	Sun Oct 23 22:40:31 2011	(r34245)
@@ -1116,6 +1116,7 @@ static struct {
   {"argb", IMGFMT_ARGB},
   {"bgra", IMGFMT_BGRA},
   {"abgr", IMGFMT_ABGR},
+  {"gbr24p", IMGFMT_GBR24P},
   {"mjpeg", IMGFMT_MJPEG},
   {"mjpg", IMGFMT_MJPEG},
   { NULL, 0 }


More information about the MPlayer-cvslog mailing list