[Scummvm-cvs-logs] SF.net SVN: scummvm:[40900] scummvm/trunk/graphics/video/smk_decoder.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue May 26 09:25:12 CEST 2009


Revision: 40900
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40900&view=rev
Author:   thebluegr
Date:     2009-05-26 07:25:12 +0000 (Tue, 26 May 2009)

Log Message:
-----------
Reserve some space in the Huffman tree arrays before starting to decode the Huffman trees. Hopefully, this will speed up the tree constructing phase somewhat

Modified Paths:
--------------
    scummvm/trunk/graphics/video/smk_decoder.cpp

Modified: scummvm/trunk/graphics/video/smk_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/smk_decoder.cpp	2009-05-26 01:25:44 UTC (rev 40899)
+++ scummvm/trunk/graphics/video/smk_decoder.cpp	2009-05-26 07:25:12 UTC (rev 40900)
@@ -123,6 +123,7 @@
 		uint32 bit = _bs.getBit();
 		assert(bit);
 
+		_tree.reserve(256);
 		decodeTree(0);
 
 		bit = _bs.getBit();
@@ -227,6 +228,7 @@
 
 	_last[0] = _last[1] = _last[2] = 0xffffffff;
 
+	_tree.reserve(256);
 	decodeTree(0, 0);
 	bit = _bs.getBit();
 	assert(!bit);


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