[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.105,1.106

Roberto Togni CVS syncmail at mplayerhq.hu
Sun Jun 27 21:53:32 CEST 2004


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv6878

Modified Files:
	demux_mov.c 
Log Message:
Negate default palette for grayscale cvid


Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- demux_mov.c	25 Jun 2004 16:59:23 -0000	1.105
+++ demux_mov.c	27 Jun 2004 19:53:30 -0000	1.106
@@ -1180,8 +1180,18 @@
 		      mp_msg(MSGT_DEMUX, MSGL_INFO, "Using default QT grayscale palette\n");
 		      if (palette_count == 16)
 		        memcpy(palette_map, qt_default_grayscale_palette_16, 16 * 4);
-		      else if (palette_count == 256)
+		      else if (palette_count == 256) {
 		        memcpy(palette_map, qt_default_grayscale_palette_256, 256 * 4);
+		        if (trak->fourcc == mmioFOURCC('c','v','i','d')) {
+		          int i;
+		          // Hack for grayscale CVID, negative palette
+		          // If you have samples where this is not required contact me (rxt)
+		          mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: greyscale cvid with default palette,"
+		            " enabling negative palette hack.\n");
+		          for (i = 0; i < 256 * 4; i++)
+		            palette_map[i] = palette_map[i] ^ 0xff;
+		        }
+		      }
 		    }
 		    else
 		    {




More information about the MPlayer-cvslog mailing list