[MPlayer-dev-eng] [PATCH] add rgb24 to -rawvideo

Jim Radford radford_mplayer at blackbean.org
Sun Jan 4 01:59:09 CET 2004


Hi MPlayers,

Surprisingly, this is all I had to do to add the ability to play rgb24
raw video.  Given this, I assume there are more color formats that can
be added just as easily.  Anyone have a list?

Thanks for all your work on mplayer,
-Jim

Index: DOCS/man/en/mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v
retrieving revision 1.514
diff -u -r1.514 mplayer.1
--- DOCS/man/en/mplayer.1	2 Jan 2004 23:21:45 -0000	1.514
+++ DOCS/man/en/mplayer.1	4 Jan 2004 00:52:35 -0000
@@ -876,7 +876,7 @@
 image width in pixels
 .IPs h=<value>
 image height in pixels
-.IPs y420|yv12|yuy2|y8
+.IPs y420|yv12|yuy2|y8|rgb24
 set colorspace
 .IPs format=<value>
 colorspace (fourcc) in hex
Index: libmpdemux/demux_rawvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rawvideo.c,v
retrieving revision 1.6
diff -u -r1.6 demux_rawvideo.c
--- libmpdemux/demux_rawvideo.c	13 Aug 2003 19:02:34 -0000	1.6
+++ libmpdemux/demux_rawvideo.c	4 Jan 2004 00:52:36 -0000
@@ -45,6 +45,7 @@
   { "yuy2", &format, CONF_TYPE_FLAG, 0, 0 , IMGFMT_YUY2, NULL },
   { "uyvy", &format, CONF_TYPE_FLAG, 0, 0 , IMGFMT_UYVY, NULL },
   { "y8", &format, CONF_TYPE_FLAG, 0, 0 , IMGFMT_Y8, NULL },
+  { "rgb24", &format, CONF_TYPE_FLAG, 0, 0 , IMGFMT_RGB24, NULL },
   // misc:
   { "fps", &fps, CONF_TYPE_FLOAT,CONF_RANGE,0.001,1000, NULL },
   { "size", &imgsize, CONF_TYPE_INT, CONF_RANGE, 1 , 8192*8192*4, NULL },
@@ -81,6 +82,7 @@
   case IMGFMT_YUY2: imgsize=width*height*2;break;
   case IMGFMT_UYVY: imgsize=width*height*2;break;
   case IMGFMT_Y8: imgsize=width*height;break;
+  case IMGFMT_RGB24: imgsize=width*height*3;break;
   default:
       mp_msg(MSGT_DEMUX,MSGL_ERR,"rawvideo: img size not specified and unknown format!\n");
       return 0;




More information about the MPlayer-dev-eng mailing list