[Scummvm-cvs-logs] SF.net SVN: scummvm:[51928] scummvm/trunk/graphics/video/codecs/cinepak.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sun Aug 8 05:33:45 CEST 2010


Revision: 51928
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51928&view=rev
Author:   mthreepwood
Date:     2010-08-08 03:33:44 +0000 (Sun, 08 Aug 2010)

Log Message:
-----------
VIDEO: Cinepak cleanup

Modified Paths:
--------------
    scummvm/trunk/graphics/video/codecs/cinepak.cpp

Modified: scummvm/trunk/graphics/video/codecs/cinepak.cpp
===================================================================
--- scummvm/trunk/graphics/video/codecs/cinepak.cpp	2010-08-08 02:56:11 UTC (rev 51927)
+++ scummvm/trunk/graphics/video/codecs/cinepak.cpp	2010-08-08 03:33:44 UTC (rev 51928)
@@ -73,14 +73,12 @@
 
 	debug (4, "Cinepak Frame: Width = %d, Height = %d, Strip Count = %d", _curFrame.width, _curFrame.height, _curFrame.stripCount);
 
-#if 0
 	// Borrowed from FFMPEG. This should cut out the extra data Cinepak for Sega has (which is useless).
 	// The theory behind this is that this is here to confuse standard Cinepak decoders. But, we won't let that happen! ;)
 	if (_curFrame.length != (uint32)stream->size()) {
 		if (stream->readUint16BE() == 0xFE00)
 			stream->readUint32BE();
 	}
-#endif
 
 	if (!_curFrame.surface) {
 		_curFrame.surface = new Surface();
@@ -105,8 +103,6 @@
 		_curFrame.strips[i].rect.bottom = _y + stream->readUint16BE();
 		_curFrame.strips[i].rect.right = _curFrame.width; stream->readUint16BE(); // Ignore, substitute with our own
 
-		//printf ("Left = %d, Top = %d, Right = %d, Bottom = %d\n", _curFrame.strips[i].rect.left, _curFrame.strips[i].rect.top, _curFrame.strips[i].rect.right, _curFrame.strips[i].rect.bottom);
-
 		// Sanity check. Because Cinepak is based on 4x4 blocks, the width and height of each strip needs to be divisible by 4.
 		assert(!(_curFrame.strips[i].rect.width() % 4) && !(_curFrame.strips[i].rect.height() % 4));
 
@@ -184,10 +180,9 @@
 				codebook[i].u  = stream->readByte() + 128;
 				codebook[i].v  = stream->readByte() + 128;
 			} else {
-				/* this codebook type indicates either greyscale or
-				 * palettized video; if palettized, U & V components will
-				 * not be used so it is safe to set them to 128 for the
-				 * benefit of greyscale rendering in YUV420P */
+				// This codebook type indicates either greyscale or
+				// palettized video. We don't handle palettized video
+				// currently.
 				codebook[i].u  = 128;
 				codebook[i].v  = 128;
 			}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list