diff options
author | Filippos Karapetis | 2009-05-26 07:25:12 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-26 07:25:12 +0000 |
commit | 5e94e688e96760acc6f2f78cbff9d2e970b3fad0 (patch) | |
tree | 3868580816baa190a63d971bb035ba49e9b74749 | |
parent | 4cc2d06b154736f35e050dda19cfd3ba9dff7f97 (diff) | |
download | scummvm-rg350-5e94e688e96760acc6f2f78cbff9d2e970b3fad0.tar.gz scummvm-rg350-5e94e688e96760acc6f2f78cbff9d2e970b3fad0.tar.bz2 scummvm-rg350-5e94e688e96760acc6f2f78cbff9d2e970b3fad0.zip |
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
svn-id: r40900
-rw-r--r-- | graphics/video/smk_decoder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/graphics/video/smk_decoder.cpp b/graphics/video/smk_decoder.cpp index 3d83bbd8ea..7c8ec9a855 100644 --- a/graphics/video/smk_decoder.cpp +++ b/graphics/video/smk_decoder.cpp @@ -123,6 +123,7 @@ public: uint32 bit = _bs.getBit(); assert(bit); + _tree.reserve(256); decodeTree(0); bit = _bs.getBit(); @@ -227,6 +228,7 @@ BigHuffmanTree::BigHuffmanTree(BitStream &bs) _last[0] = _last[1] = _last[2] = 0xffffffff; + _tree.reserve(256); decodeTree(0, 0); bit = _bs.getBit(); assert(!bit); |