<div dir="ltr">Hi Matt,<div><br></div><div>Could you please enlighten me where this was discussed? And what is the reason for this refactoring?</div><div><br></div><div><br></div><div>Eugene</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On 28 February 2014 07:42, clone2727 <span dir="ltr"><<a href="mailto:clone2727@gmail.com" target="_blank">clone2727@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

This automated email contains information about 10 new commits which have been<br>
pushed to the 'scummvm' repo located at <a href="https://github.com/scummvm/scummvm" target="_blank">https://github.com/scummvm/scummvm</a> .<br>
<br>
Summary:<br>
740b6e8fbd IMAGE: Move all ImageDecoders to image/<br>
b568ac73b9 IMAGE: Move video codecs to image/<br>
c432b96cf6 IMAGE: Merge the JPEG codec into the ImageDecoder<br>
e6717aaf43 IMAGE: Clarify difference between ImageDecoder and Codec a bit<br>
08ea14a8d0 IMAGE: Make Codec take a stream reference; change function name to decodeFrame<br>
0f07f85a94 IMAGE: Split raw bitmap decoding into a Codec<br>
231a02c759 VIDEO: Use the bitmap header compression field for AVI codecs<br>
05e9ff136a IMAGE: Share the same pool of codecs between bitmap and AVI<br>
acec700c11 IMAGE: Share the same pool of codecs between PICT and QuickTime<br>
57aa610f0c IMAGE: Update comments<br>
<br>
<br>
Commit: 740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7<br>
    <a href="https://github.com/scummvm/scummvm/commit/740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7" target="_blank">https://github.com/scummvm/scummvm/commit/740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:27:28-08:00<br>
<br>
Commit Message:<br>
IMAGE: Move all ImageDecoders to image/<br>
<br>
Changed paths:<br>
  A image/bmp.cpp<br>
  A image/bmp.h<br>
  A image/iff.cpp<br>
  A image/iff.h<br>
  A image/image_decoder.h<br>
  A image/jpeg.cpp<br>
  A image/jpeg.h<br>
  A image/<a href="http://module.mk" target="_blank">module.mk</a><br>
  A image/pcx.cpp<br>
  A image/pcx.h<br>
  A image/pict.cpp<br>
  A image/pict.h<br>
  A image/png.cpp<br>
  A image/png.h<br>
  A image/tga.cpp<br>
  A image/tga.h<br>
  R graphics/decoders/bmp.cpp<br>
  R graphics/decoders/bmp.h<br>
  R graphics/decoders/iff.cpp<br>
  R graphics/decoders/iff.h<br>
  R graphics/decoders/image_decoder.h<br>
  R graphics/decoders/jpeg.cpp<br>
  R graphics/decoders/jpeg.h<br>
  R graphics/decoders/pcx.cpp<br>
  R graphics/decoders/pcx.h<br>
  R graphics/decoders/pict.cpp<br>
  R graphics/decoders/pict.h<br>
  R graphics/decoders/png.cpp<br>
  R graphics/decoders/png.h<br>
  R graphics/decoders/tga.cpp<br>
  R graphics/decoders/tga.h<br>
    Makefile.common<br>
    backends/vkeybd/virtual-keyboard-parser.cpp<br>
    devtools/create_project/create_project.cpp<br>
    engines/dreamweb/vgagrafx.cpp<br>
    engines/gob/inter_v7.cpp<br>
    engines/gob/surface.cpp<br>
    engines/groovie/roq.cpp<br>
    engines/hopkins/graphics.cpp<br>
    engines/hugo/dialogs.cpp<br>
    engines/hugo/file.cpp<br>
    engines/mohawk/bitmap.cpp<br>
    engines/mohawk/myst_graphics.cpp<br>
    engines/parallaction/disk_br.cpp<br>
    engines/parallaction/disk_ns.cpp<br>
    engines/pegasus/cursor.cpp<br>
    engines/pegasus/surface.cpp<br>
    engines/queen/display.cpp<br>
    engines/saga/scene.cpp<br>
    engines/sci/graphics/maciconbar.cpp<br>
    engines/sword25/gfx/image/imgloader.cpp<br>
    engines/tucker/resource.cpp<br>
    engines/wintermute/base/base_persistence_manager.cpp<br>
    engines/wintermute/base/gfx/base_image.cpp<br>
    engines/wintermute/base/gfx/base_image.h<br>
    engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp<br>
    engines/zvision/graphics/render_manager.cpp<br>
    graphics/<a href="http://module.mk" target="_blank">module.mk</a><br>
    gui/ThemeEngine.cpp<br>
    video/codecs/jpeg.cpp<br>
    video/codecs/mjpeg.cpp<br>
<br>
<br>
<br>
diff --git a/Makefile.common b/Makefile.common<br>
index b56300a..4071d97 100644<br>
--- a/Makefile.common<br>
+++ b/Makefile.common<br>
@@ -25,6 +25,7 @@ MODULES += \<br>
        engines \<br>
        video \<br>
        graphics \<br>
+       image \<br>
        audio \<br>
        common \<br>
        po<br>
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp<br>
index bb8286d..25c0161 100644<br>
--- a/backends/vkeybd/virtual-keyboard-parser.cpp<br>
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp<br>
@@ -34,7 +34,7 @@<br>
 #include "common/tokenizer.h"<br>
 #include "common/stream.h"<br>
<br>
-#include "graphics/decoders/bmp.h"<br>
+#include "image/bmp.h"<br>
<br>
 namespace Common {<br>
<br>
@@ -267,7 +267,7 @@ bool VirtualKeyboardParser::parserCallback_layout(ParserNode *node) {<br>
        const Graphics::PixelFormat format = g_system->getOverlayFormat();<br>
<br>
        {<br>
-               Graphics::BitmapDecoder bmp;<br>
+               Image::BitmapDecoder bmp;<br>
                if (!bmp.loadStream(*file))<br>
                        return parserError("Error loading bitmap '" + _mode->bitmapName + "'");<br>
<br>
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp<br>
index 9d7ed53..876c116 100644<br>
--- a/devtools/create_project/create_project.cpp<br>
+++ b/devtools/create_project/create_project.cpp<br>
@@ -1305,6 +1305,7 @@ void ProjectProvider::createProject(BuildSetup &setup) {<br>
                createModuleList(setup.srcDir + "/audio", setup.defines, setup.testDirs, in, ex);<br>
                createModuleList(setup.srcDir + "/audio/softsynth/mt32", setup.defines, setup.testDirs, in, ex);<br>
                createModuleList(setup.srcDir + "/video", setup.defines, setup.testDirs, in, ex);<br>
+               createModuleList(setup.srcDir + "/image", setup.defines, setup.testDirs, in, ex);<br>
<br>
                // Resource files<br>
                in.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico");<br>
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp<br>
index e853134..c59d3e3 100644<br>
--- a/engines/dreamweb/vgagrafx.cpp<br>
+++ b/engines/dreamweb/vgagrafx.cpp<br>
@@ -23,7 +23,7 @@<br>
 #include "dreamweb/dreamweb.h"<br>
 #include "engines/util.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/pcx.h"<br>
+#include "image/pcx.h"<br>
<br>
 namespace DreamWeb {<br>
<br>
@@ -161,7 +161,7 @@ void DreamWebEngine::showPCX(const Common::String &suffix) {<br>
                return;<br>
        }<br>
<br>
-       Graphics::PCXDecoder pcx;<br>
+       Image::PCXDecoder pcx;<br>
        if (!pcx.loadStream(pcxFile)) {<br>
                warning("showpcx: Could not process '%s'", name.c_str());<br>
                return;<br>
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp<br>
index 75278d9..fd94060 100644<br>
--- a/engines/gob/inter_v7.cpp<br>
+++ b/engines/gob/inter_v7.cpp<br>
@@ -27,7 +27,8 @@<br>
<br>
 #include "graphics/cursorman.h"<br>
 #include "graphics/wincursor.h"<br>
-#include "graphics/decoders/iff.h"<br>
+<br>
+#include "image/iff.h"<br>
<br>
 #include "gob/gob.h"<br>
 #include "gob/global.h"<br>
@@ -547,7 +548,7 @@ void Inter_v7::o7_loadIFFPalette() {<br>
                return;<br>
        }<br>
<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.loadStream(*iffFile);<br>
        if (!decoder.getPalette() || decoder.getPaletteColorCount() != 256) {<br>
                warning("o7_loadIFFPalette(): Failed reading palette from IFF \"%s\"", file.c_str());<br>
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp<br>
index 00203ff..42ac2b0 100644<br>
--- a/engines/gob/surface.cpp<br>
+++ b/engines/gob/surface.cpp<br>
@@ -31,7 +31,8 @@<br>
 #include "graphics/primitives.h"<br>
 #include "graphics/pixelformat.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/iff.h"<br>
+<br>
+#include "image/iff.h"<br>
<br>
 namespace Gob {<br>
<br>
@@ -814,7 +815,7 @@ bool Surface::loadTGA(Common::SeekableReadStream &stream) {<br>
 }<br>
<br>
 bool Surface::loadIFF(Common::SeekableReadStream &stream) {<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.loadStream(stream);<br>
<br>
        if (!decoder.getSurface())<br>
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp<br>
index 88f14b8..4b3fb81 100644<br>
--- a/engines/groovie/roq.cpp<br>
+++ b/engines/groovie/roq.cpp<br>
@@ -32,7 +32,7 @@<br>
 #include "common/textconsole.h"<br>
<br>
 #include "graphics/palette.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
+#include "image/jpeg.h"<br>
<br>
 #ifdef USE_RGB_COLOR<br>
 // Required for the YUV to RGB conversion<br>
@@ -435,20 +435,18 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) {<br>
<br>
        warning("Groovie::ROQ: JPEG frame (unfinished)");<br>
<br>
-       Graphics::JPEGDecoder *jpg = new Graphics::JPEGDecoder();<br>
-       jpg->setOutputColorSpace(Graphics::JPEGDecoder::kColorSpaceYUV);<br>
+       Image::JPEGDecoder jpg;<br>
+       jpg.setOutputColorSpace(Image::JPEGDecoder::kColorSpaceYUV);<br>
<br>
        uint32 startPos = _file->pos();<br>
        Common::SeekableSubReadStream subStream(_file, startPos, startPos + blockHeader.size, DisposeAfterUse::NO);<br>
-       jpg->loadStream(subStream);<br>
+       jpg.loadStream(subStream);<br>
<br>
-       const Graphics::Surface *srcSurf = jpg->getSurface();<br>
+       const Graphics::Surface *srcSurf = jpg.getSurface();<br>
        const byte *src = (const byte *)srcSurf->getPixels();<br>
        byte *ptr = (byte *)_currBuf->getPixels();<br>
        memcpy(ptr, src, _currBuf->w * _currBuf->h * srcSurf->format.bytesPerPixel);<br>
<br>
-       delete jpg;<br>
-<br>
        _file->seek(startPos + blockHeader.size);<br>
        return true;<br>
 }<br>
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp<br>
index e1f5037..7227c3e 100644<br>
--- a/engines/hopkins/graphics.cpp<br>
+++ b/engines/hopkins/graphics.cpp<br>
@@ -28,7 +28,7 @@<br>
<br>
 #include "common/system.h"<br>
 #include "graphics/palette.h"<br>
-#include "graphics/decoders/pcx.h"<br>
+#include "image/pcx.h"<br>
 #include "common/file.h"<br>
 #include "common/rect.h"<br>
 #include "engines/util.h"<br>
@@ -301,7 +301,7 @@ void GraphicsManager::fillSurface(byte *surface, byte *col, int size) {<br>
<br>
 void GraphicsManager::loadPCX640(byte *surface, const Common::String &file, byte *palette, bool typeFlag) {<br>
        Common::File f;<br>
-       Graphics::PCXDecoder pcxDecoder;<br>
+       Image::PCXDecoder pcxDecoder;<br>
<br>
        // Clear the passed surface<br>
        memset(surface, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);<br>
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp<br>
index 6894030..8b145b7 100644<br>
--- a/engines/hugo/dialogs.cpp<br>
+++ b/engines/hugo/dialogs.cpp<br>
@@ -21,9 +21,9 @@<br>
  */<br>
<br>
 #include "common/substream.h"<br>
-#include "graphics/decoders/bmp.h"<br>
 #include "gui/gui-manager.h"<br>
 #include "gui/ThemeEval.h"<br>
+#include "image/bmp.h"<br>
<br>
 #include "hugo/hugo.h"<br>
 #include "hugo/display.h"<br>
@@ -130,7 +130,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {<br>
                uint32 filPos = in.pos();<br>
                Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize);<br>
<br>
-               Graphics::BitmapDecoder bitmapDecoder;<br>
+               Image::BitmapDecoder bitmapDecoder;<br>
                if (!bitmapDecoder.loadStream(stream))<br>
                        error("TopMenu::loadBmpArr(): Could not load bitmap");<br>
<br>
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp<br>
index 359d4a3..e263397 100644<br>
--- a/engines/hugo/file.cpp<br>
+++ b/engines/hugo/file.cpp<br>
@@ -34,11 +34,12 @@<br>
 #include "common/config-manager.h"<br>
<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/pcx.h"<br>
 #include "graphics/thumbnail.h"<br>
<br>
 #include "gui/saveload.h"<br>
<br>
+#include "image/pcx.h"<br>
+<br>
 #include "hugo/hugo.h"<br>
 #include "hugo/file.h"<br>
 #include "hugo/schedule.h"<br>
@@ -110,7 +111,7 @@ Seq *FileManager::readPCX(Common::SeekableReadStream &f, Seq *seqPtr, byte *imag<br>
                        error("Insufficient memory to run game.");<br>
        }<br>
<br>
-       Graphics::PCXDecoder pcx;<br>
+       Image::PCXDecoder pcx;<br>
        if (!pcx.loadStream(f))<br>
                error("Error while reading PCX image");<br>
<br>
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp<br>
index fe2a308..6435daf 100644<br>
--- a/engines/mohawk/bitmap.cpp<br>
+++ b/engines/mohawk/bitmap.cpp<br>
@@ -29,7 +29,7 @@<br>
 #include "common/substream.h"<br>
 #include "common/system.h"<br>
 #include "common/textconsole.h"<br>
-#include "graphics/decoders/bmp.h"<br>
+#include "image/bmp.h"<br>
<br>
 namespace Mohawk {<br>
<br>
@@ -635,7 +635,7 @@ MohawkSurface *MystBitmap::decodeImage(Common::SeekableReadStream *stream) {<br>
        Common::SeekableReadStream *bmpStream = decompressLZ(stream, uncompressedSize);<br>
        delete stream;<br>
<br>
-       Graphics::BitmapDecoder bitmapDecoder;<br>
+       Image::BitmapDecoder bitmapDecoder;<br>
        if (!bitmapDecoder.loadStream(*bmpStream))<br>
                error("Could not decode Myst bitmap");<br>
<br>
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp<br>
index 6f7e8a8..9ea9f15 100644<br>
--- a/engines/mohawk/myst_graphics.cpp<br>
+++ b/engines/mohawk/myst_graphics.cpp<br>
@@ -28,8 +28,7 @@<br>
 #include "common/system.h"<br>
 #include "common/textconsole.h"<br>
 #include "engines/util.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
-#include "graphics/decoders/pict.h"<br>
+#include "image/pict.h"<br>
<br>
 namespace Mohawk {<br>
<br>
@@ -94,7 +93,7 @@ MohawkSurface *MystGraphics::decodeImage(uint16 id) {<br>
        MohawkSurface *mhkSurface = 0;<br>
<br>
        if (isPict) {<br>
-               Graphics::PICTDecoder pict;<br>
+               Image::PICTDecoder pict;<br>
<br>
                if (!pict.loadStream(*dataStream))<br>
                        error("Could not decode Myst ME PICT");<br>
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp<br>
index b31418a..7458065 100644<br>
--- a/engines/parallaction/disk_br.cpp<br>
+++ b/engines/parallaction/disk_br.cpp<br>
@@ -23,7 +23,7 @@<br>
 #include "common/config-manager.h"<br>
 #include "common/fs.h"<br>
 #include "common/textconsole.h"<br>
-#include "graphics/decoders/iff.h"<br>
+#include "image/iff.h"<br>
 #include "parallaction/parallaction.h"<br>
 #include "parallaction/parser.h"<br>
<br>
@@ -460,7 +460,7 @@ void AmigaDisk_br::loadBackground(BackgroundInfo& info, const char *filename) {<br>
        byte r,g,b;<br>
        const byte *p;<br>
        Common::SeekableReadStream *stream;<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        uint i;<br>
<br>
        stream = tryOpenFile("backs/" + Common::String(filename), ".ap");<br>
@@ -544,7 +544,7 @@ MaskBuffer *AmigaDisk_br::loadMask(const char *name, uint32 w, uint32 h) {<br>
                return 0;<br>
        }<br>
<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.setNumRelevantPlanes(2); // use only 2 first bits from each pixels<br>
        decoder.setPixelPacking(true); // pack 4 2bit pixels into 1 byte<br>
        decoder.loadStream(*stream);<br>
@@ -583,7 +583,7 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) {<br>
<br>
        Common::String sName = name;<br>
        Common::SeekableReadStream *stream = openFile("ras/" + sName, ".ras");<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.loadStream(*stream);<br>
<br>
        Graphics::Surface *surf = new Graphics::Surface;<br>
@@ -720,7 +720,7 @@ GfxObj* AmigaDisk_br::loadObjects(const char *name, uint8 part) {<br>
        debugC(5, kDebugDisk, "AmigaDisk_br::loadObjects");<br>
<br>
        Common::SeekableReadStream *stream = openFile(name);<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.loadStream(*stream);<br>
<br>
        uint16 max = objectsMax[part];<br>
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp<br>
index a5fef16..28e61b0 100644<br>
--- a/engines/parallaction/disk_ns.cpp<br>
+++ b/engines/parallaction/disk_ns.cpp<br>
@@ -26,7 +26,7 @@<br>
 #include "common/memstream.h"<br>
 #include "common/substream.h"<br>
 #include "common/textconsole.h"<br>
-#include "graphics/decoders/iff.h"<br>
+#include "image/iff.h"<br>
 #include "parallaction/parser.h"<br>
 #include "parallaction/parallaction.h"<br>
<br>
@@ -917,7 +917,7 @@ void AmigaDisk_ns::buildMask(byte* buf) {<br>
<br>
 void AmigaDisk_ns::loadBackground(BackgroundInfo& info, const char *name) {<br>
        Common::SeekableReadStream *s = openFile(name);<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.loadStream(*s);<br>
<br>
        info.bg.copyFrom(*decoder.getSurface());<br>
@@ -935,7 +935,7 @@ void AmigaDisk_ns::loadBackground(BackgroundInfo& info, const char *name) {<br>
                info.palette.setEntry(i, r, g, b);<br>
        }<br>
<br>
-       const Common::Array<Graphics::IFFDecoder::PaletteRange> &paletteRanges = decoder.getPaletteRanges();<br>
+       const Common::Array<Image::IFFDecoder::PaletteRange> &paletteRanges = decoder.getPaletteRanges();<br>
        for (uint j = 0; j < 6 && j < paletteRanges.size(); j++) {<br>
                PaletteFxRange range;<br>
                range._timer = paletteRanges[j].timer;<br>
@@ -959,7 +959,7 @@ void AmigaDisk_ns::loadMask_internal(BackgroundInfo& info, const char *name) {<br>
                return; // no errors if missing mask files: not every location has one<br>
        }<br>
<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.setNumRelevantPlanes(2); // use only 2 first bits from each pixel<br>
        decoder.setPixelPacking(true); // pack 4 2bit pixels into 1 byte<br>
        decoder.loadStream(*s);<br>
@@ -990,7 +990,7 @@ void AmigaDisk_ns::loadPath_internal(BackgroundInfo& info, const char *name) {<br>
                return; // no errors if missing path files: not every location has one<br>
        }<br>
<br>
-       Graphics::IFFDecoder decoder;<br>
+       Image::IFFDecoder decoder;<br>
        decoder.setNumRelevantPlanes(1); // use only first bit from each pixel<br>
        decoder.setPixelPacking(true); // pack 8 1bit pixels into 1 byte<br>
        decoder.loadStream(*s);<br>
diff --git a/engines/pegasus/cursor.cpp b/engines/pegasus/cursor.cpp<br>
index ad0d2c2..602ae88 100644<br>
--- a/engines/pegasus/cursor.cpp<br>
+++ b/engines/pegasus/cursor.cpp<br>
@@ -28,7 +28,7 @@<br>
 #include "common/system.h"<br>
 #include "graphics/cursorman.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/pict.h"<br>
+#include "image/pict.h"<br>
<br>
 #include "pegasus/cursor.h"<br>
 #include "pegasus/graphics.h"<br>
@@ -148,7 +148,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {<br>
                Common::SeekableReadStream *pictStream = vm->_resFork->getResource(MKTAG('P', 'I', 'C', 'T'), cursorInfo.tag + 1000);<br>
<br>
                if (pictStream) {<br>
-                       Graphics::PICTDecoder pict;<br>
+                       Image::PICTDecoder pict;<br>
                        if (!pict.loadStream(*pictStream))<br>
                                error("Failed to decode cursor PICT %d", cursorInfo.tag + 1000);<br>
<br>
@@ -166,7 +166,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {<br>
                error("Failed to find color icon %d", cursorInfo.tag);<br>
<br>
        // PixMap section<br>
-       Graphics::PICTDecoder::PixMap pixMap = Graphics::PICTDecoder::readPixMap(*cicnStream);<br>
+       Image::PICTDecoder::PixMap pixMap = Image::PICTDecoder::readPixMap(*cicnStream);<br>
<br>
        // Mask section<br>
        cicnStream->readUint32BE(); // mask baseAddr<br>
diff --git a/engines/pegasus/surface.cpp b/engines/pegasus/surface.cpp<br>
index cdcb3c6..cb1e2e7 100644<br>
--- a/engines/pegasus/surface.cpp<br>
+++ b/engines/pegasus/surface.cpp<br>
@@ -28,7 +28,7 @@<br>
 #include "common/stream.h"<br>
 #include "common/system.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/pict.h"<br>
+#include "image/pict.h"<br>
 #include "video/video_decoder.h"<br>
<br>
 #include "pegasus/pegasus.h"<br>
@@ -101,7 +101,7 @@ void Surface::getImageFromPICTResource(Common::MacResManager *resFork, uint16 id<br>
 }<br>
<br>
 bool Surface::getImageFromPICTStream(Common::SeekableReadStream *stream) {<br>
-       Graphics::PICTDecoder pict;<br>
+       Image::PICTDecoder pict;<br>
<br>
        if (!pict.loadStream(*stream))<br>
                return false;<br>
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp<br>
index 85cc7ca..b2213f7 100644<br>
--- a/engines/queen/display.cpp<br>
+++ b/engines/queen/display.cpp<br>
@@ -29,8 +29,9 @@<br>
 #include "graphics/cursorman.h"<br>
 #include "graphics/palette.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/iff.h"<br>
-#include "graphics/decoders/pcx.h"<br>
+<br>
+#include "image/iff.h"<br>
+#include "image/pcx.h"<br>
<br>
 #include "queen/display.h"<br>
 #include "queen/input.h"<br>
@@ -813,7 +814,7 @@ void Display::fill(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint16 w,<br>
 void Display::decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd) {<br>
        Common::MemoryReadStream str(src, srcSize);<br>
<br>
-       ::Graphics::PCXDecoder pcx;<br>
+       Image::PCXDecoder pcx;<br>
        if (!pcx.loadStream(str))<br>
                error("Error while reading PCX image");<br>
<br>
@@ -832,7 +833,7 @@ void Display::decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dst<br>
 void Display::decodeIFF(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase) {<br>
        Common::MemoryReadStream str(src, srcSize);<br>
<br>
-       ::Graphics::IFFDecoder iff;<br>
+       Image::IFFDecoder iff;<br>
        if (!iff.loadStream(str))<br>
                error("Error while reading IFF image");<br>
<br>
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp<br>
index 5ca2f8d..7f77cba 100644<br>
--- a/engines/saga/scene.cpp<br>
+++ b/engines/saga/scene.cpp<br>
@@ -43,7 +43,7 @@<br>
<br>
 #include "common/util.h"<br>
<br>
-#include "graphics/decoders/iff.h"<br>
+#include "image/iff.h"<br>
<br>
 namespace Saga {<br>
<br>
@@ -463,7 +463,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy<br>
                                _vm->_interface->setMode(kPanelSceneSubstitute);<br>
<br>
                                if (file.open(sceneSubstitutes[i].image)) {<br>
-                                       Graphics::IFFDecoder decoder;<br>
+                                       Image::IFFDecoder decoder;<br>
                                        decoder.loadStream(file);<br>
                                        pal = decoder.getPalette();<br>
                                        rect.setWidth(decoder.getSurface()->w);<br>
diff --git a/engines/sci/graphics/maciconbar.cpp b/engines/sci/graphics/maciconbar.cpp<br>
index db9843f..8e2e12b 100644<br>
--- a/engines/sci/graphics/maciconbar.cpp<br>
+++ b/engines/sci/graphics/maciconbar.cpp<br>
@@ -32,7 +32,7 @@<br>
 #include "common/memstream.h"<br>
 #include "common/system.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/pict.h"<br>
+#include "image/pict.h"<br>
<br>
 namespace Sci {<br>
<br>
@@ -201,12 +201,12 @@ void GfxMacIconBar::setInventoryIcon(int16 icon) {<br>
 }<br>
<br>
 Graphics::Surface *GfxMacIconBar::loadPict(ResourceId id) {<br>
-       Graphics::PICTDecoder pictDecoder;<br>
        Resource *res = g_sci->getResMan()->findResource(id, false);<br>
<br>
        if (!res || res->size == 0)<br>
                return 0;<br>
<br>
+       Image::PICTDecoder pictDecoder;<br>
        Common::MemoryReadStream stream(res->data, res->size);<br>
        if (!pictDecoder.loadStream(stream))<br>
                return 0;<br>
diff --git a/engines/sword25/gfx/image/imgloader.cpp b/engines/sword25/gfx/image/imgloader.cpp<br>
index 3212c8d..b4b3030 100644<br>
--- a/engines/sword25/gfx/image/imgloader.cpp<br>
+++ b/engines/sword25/gfx/image/imgloader.cpp<br>
@@ -33,14 +33,14 @@<br>
 #include "sword25/gfx/image/image.h"<br>
 #include "sword25/gfx/image/imgloader.h"<br>
 #include "graphics/pixelformat.h"<br>
-#include "graphics/decoders/png.h"<br>
+#include "image/png.h"<br>
<br>
 namespace Sword25 {<br>
<br>
 bool ImgLoader::decodePNGImage(const byte *fileDataPtr, uint fileSize, byte *&uncompressedDataPtr, int &width, int &height, int &pitch) {<br>
        Common::MemoryReadStream *fileStr = new Common::MemoryReadStream(fileDataPtr, fileSize, DisposeAfterUse::NO);<br>
<br>
-       Graphics::PNGDecoder png;<br>
+       ::Image::PNGDecoder png;<br>
        if (!png.loadStream(*fileStr)) // the fileStr pointer, and thus pFileData will be deleted after this is done<br>
                error("Error while reading PNG image");<br>
<br>
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp<br>
index 1c223c6..48ddefe 100644<br>
--- a/engines/tucker/resource.cpp<br>
+++ b/engines/tucker/resource.cpp<br>
@@ -30,7 +30,8 @@<br>
 #include "audio/decoders/wave.h"<br>
<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/pcx.h"<br>
+<br>
+#include "image/pcx.h"<br>
<br>
 #include "tucker/tucker.h"<br>
 #include "tucker/graphics.h"<br>
@@ -302,7 +303,7 @@ void TuckerEngine::loadImage(const char *fname, uint8 *dst, int type) {<br>
                }<br>
        }<br>
<br>
-       ::Graphics::PCXDecoder pcx;<br>
+       Image::PCXDecoder pcx;<br>
        if (!pcx.loadStream(f))<br>
                error("Error while reading PCX image");<br>
<br>
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp<br>
index 3b7026c..bea55fb 100644<br>
--- a/engines/wintermute/base/base_persistence_manager.cpp<br>
+++ b/engines/wintermute/base/base_persistence_manager.cpp<br>
@@ -38,8 +38,8 @@<br>
 #include "engines/wintermute/base/sound/base_sound.h"<br>
 #include "engines/wintermute/graphics/transparent_surface.h"<br>
 #include "engines/wintermute/wintermute.h"<br>
-#include "graphics/decoders/bmp.h"<br>
 #include "graphics/scaler.h"<br>
+#include "image/bmp.h"<br>
 #include "common/memstream.h"<br>
 #include "common/str.h"<br>
 #include "common/system.h"<br>
@@ -170,7 +170,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des<br>
<br>
        if (thumbSize > 0) {<br>
                Common::MemoryReadStream thumbStream(thumbData, thumbSize, DisposeAfterUse::NO);<br>
-               Graphics::BitmapDecoder bmpDecoder;<br>
+               Image::BitmapDecoder bmpDecoder;<br>
                if (bmpDecoder.loadStream(thumbStream)) {<br>
                        const Graphics::Surface *bmpSurface = bmpDecoder.getSurface();<br>
                        TransparentSurface *scaleableSurface = new TransparentSurface(*bmpSurface, false);<br>
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp<br>
index e5ec879..e676faf 100644<br>
--- a/engines/wintermute/base/gfx/base_image.cpp<br>
+++ b/engines/wintermute/base/gfx/base_image.cpp<br>
@@ -29,11 +29,11 @@<br>
 #include "engines/wintermute/base/gfx/base_image.h"<br>
 #include "engines/wintermute/base/base_file_manager.h"<br>
 #include "engines/wintermute/graphics/transparent_surface.h"<br>
-#include "graphics/decoders/png.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
-#include "graphics/decoders/bmp.h"<br>
-#include "graphics/decoders/tga.h"<br>
 #include "graphics/surface.h"<br>
+#include "image/png.h"<br>
+#include "image/jpeg.h"<br>
+#include "image/bmp.h"<br>
+#include "image/tga.h"<br>
 #include "common/textconsole.h"<br>
 #include "common/stream.h"<br>
 #include "common/system.h"<br>
@@ -62,16 +62,14 @@ BaseImage::~BaseImage() {<br>
 bool BaseImage::loadFile(const Common::String &filename) {<br>
        _filename = filename;<br>
        _filename.toLowercase();<br>
-       if (filename.hasPrefix("savegame:")) {<br>
-               _decoder = new Graphics::BitmapDecoder();<br>
+       if (filename.hasPrefix("savegame:") || _filename.hasSuffix(".bmp")) {<br>
+               _decoder = new Image::BitmapDecoder();<br>
        } else if (_filename.hasSuffix(".png")) {<br>
-               _decoder = new Graphics::PNGDecoder();<br>
-       } else if (_filename.hasSuffix(".bmp")) {<br>
-               _decoder = new Graphics::BitmapDecoder();<br>
+               _decoder = new Image::PNGDecoder();<br>
        } else if (_filename.hasSuffix(".tga")) {<br>
-               _decoder = new Graphics::TGADecoder();<br>
+               _decoder = new Image::TGADecoder();<br>
        } else if (_filename.hasSuffix(".jpg")) {<br>
-               _decoder = new Graphics::JPEGDecoder();<br>
+               _decoder = new Image::JPEGDecoder();<br>
        } else {<br>
                error("BaseImage::loadFile : Unsupported fileformat %s", filename.c_str());<br>
        }<br>
diff --git a/engines/wintermute/base/gfx/base_image.h b/engines/wintermute/base/gfx/base_image.h<br>
index a7d6846..56be9fc 100644<br>
--- a/engines/wintermute/base/gfx/base_image.h<br>
+++ b/engines/wintermute/base/gfx/base_image.h<br>
@@ -31,11 +31,14 @@<br>
<br>
 #include "graphics/surface.h"<br>
 #include "graphics/pixelformat.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
 #include "common/endian.h"<br>
 #include "common/str.h"<br>
 #include "common/stream.h"<br>
<br>
+namespace Image {<br>
+class ImageDecoder;<br>
+}<br>
+<br>
 namespace Wintermute {<br>
 class BaseSurface;<br>
 class BaseFileManager;<br>
@@ -60,7 +63,7 @@ public:<br>
        void copyFrom(const Graphics::Surface *surface);<br>
 private:<br>
        Common::String _filename;<br>
-       Graphics::ImageDecoder *_decoder;<br>
+       Image::ImageDecoder *_decoder;<br>
        const Graphics::Surface *_surface;<br>
        Graphics::Surface *_deletableSurface;<br>
        const byte *_palette;<br>
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp<br>
index bb57d30..983f9c1 100644<br>
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp<br>
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp<br>
@@ -32,10 +32,6 @@<br>
 #include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"<br>
 #include "engines/wintermute/base/gfx/base_image.h"<br>
 #include "engines/wintermute/platform_osystem.h"<br>
-#include "graphics/decoders/png.h"<br>
-#include "graphics/decoders/bmp.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
-#include "graphics/decoders/tga.h"<br>
 #include "engines/wintermute/graphics/transparent_surface.h"<br>
 #include "engines/wintermute/graphics/transform_tools.h"<br>
 #include "graphics/pixelformat.h"<br>
diff --git a/engines/zvision/graphics/render_manager.cpp b/engines/zvision/graphics/render_manager.cpp<br>
index 86e27aa..aed30ea 100644<br>
--- a/engines/zvision/graphics/render_manager.cpp<br>
+++ b/engines/zvision/graphics/render_manager.cpp<br>
@@ -32,7 +32,7 @@<br>
<br>
 #include "engines/util.h"<br>
<br>
-#include "graphics/decoders/tga.h"<br>
+#include "image/tga.h"<br>
<br>
<br>
 namespace ZVision {<br>
@@ -238,7 +238,7 @@ void RenderManager::readImageToSurface(const Common::String &fileName, Graphics:<br>
<br>
        uint32 imageWidth;<br>
        uint32 imageHeight;<br>
-       Graphics::TGADecoder tga;<br>
+       Image::TGADecoder tga;<br>
        uint16 *buffer;<br>
        bool isTransposed = _renderTable.getRenderState() == RenderTable::PANORAMA;<br>
        // All ZVision images are in RGB 555<br>
diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp<br>
deleted file mode 100644<br>
index 608c843..0000000<br>
--- a/graphics/decoders/bmp.cpp<br>
+++ /dev/null<br>
@@ -1,183 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#include "common/stream.h"<br>
-#include "common/textconsole.h"<br>
-<br>
-#include "graphics/pixelformat.h"<br>
-#include "graphics/surface.h"<br>
-#include "graphics/decoders/bmp.h"<br>
-<br>
-namespace Graphics {<br>
-<br>
-BitmapDecoder::BitmapDecoder() {<br>
-       _surface = 0;<br>
-       _palette = 0;<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-BitmapDecoder::~BitmapDecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-void BitmapDecoder::destroy() {<br>
-       if (_surface) {<br>
-               _surface->free();<br>
-               delete _surface; _surface = 0;<br>
-       }<br>
-<br>
-       delete[] _palette; _palette = 0;<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
-       destroy();<br>
-<br>
-       if (stream.readByte() != 'B')<br>
-               return false;<br>
-<br>
-       if (stream.readByte() != 'M')<br>
-               return false;<br>
-<br>
-       /* uint32 fileSize = */ stream.readUint32LE();<br>
-       /* uint16 res1 = */ stream.readUint16LE();<br>
-       /* uint16 res2 = */ stream.readUint16LE();<br>
-       uint32 imageOffset = stream.readUint32LE();<br>
-<br>
-       uint32 infoSize = stream.readUint32LE();<br>
-       if (infoSize != 40) {<br>
-               warning("Only Windows v3 bitmaps are supported");<br>
-               return false;<br>
-       }<br>
-<br>
-       uint32 width = stream.readUint32LE();<br>
-       int32 height = stream.readSint32LE();<br>
-<br>
-       if (width == 0 || height == 0)<br>
-               return false;<br>
-<br>
-       if (height < 0) {<br>
-               warning("Right-side up bitmaps not supported");<br>
-               return false;<br>
-       }<br>
-<br>
-       /* uint16 planes = */ stream.readUint16LE();<br>
-       uint16 bitsPerPixel = stream.readUint16LE();<br>
-<br>
-       if (bitsPerPixel != 8 && bitsPerPixel != 24 && bitsPerPixel != 32) {<br>
-               warning("%dbpp bitmaps not supported", bitsPerPixel);<br>
-               return false;<br>
-       }<br>
-<br>
-       uint32 compression = stream.readUint32LE();<br>
-<br>
-       if (compression != 0) {<br>
-               warning("Compressed bitmaps not supported");<br>
-               return false;<br>
-       }<br>
-<br>
-       /* uint32 imageSize = */ stream.readUint32LE();<br>
-       /* uint32 pixelsPerMeterX = */ stream.readUint32LE();<br>
-       /* uint32 pixelsPerMeterY = */ stream.readUint32LE();<br>
-       _paletteColorCount = stream.readUint32LE();<br>
-       /* uint32 colorsImportant = */ stream.readUint32LE();<br>
-<br>
-       if (bitsPerPixel == 8) {<br>
-               if (_paletteColorCount == 0)<br>
-                       _paletteColorCount = 256;<br>
-<br>
-               // Read the palette<br>
-               _palette = new byte[_paletteColorCount * 3];<br>
-               for (uint16 i = 0; i < _paletteColorCount; i++) {<br>
-                       _palette[i * 3 + 2] = stream.readByte();<br>
-                       _palette[i * 3 + 1] = stream.readByte();<br>
-                       _palette[i * 3 + 0] = stream.readByte();<br>
-                       stream.readByte();<br>
-               }<br>
-       }<br>
-<br>
-       // Start us at the beginning of the image<br>
-       stream.seek(imageOffset);<br>
-<br>
-       Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();<br>
-<br>
-       // BGRA for 24bpp and 32 bpp<br>
-       if (bitsPerPixel == 24 || bitsPerPixel == 32)<br>
-               format = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);<br>
-<br>
-       _surface = new Graphics::Surface();<br>
-       _surface->create(width, height, format);<br>
-<br>
-       int srcPitch = width * (bitsPerPixel >> 3);<br>
-       const int extraDataLength = (srcPitch % 4) ? 4 - (srcPitch % 4) : 0;<br>
-<br>
-       if (bitsPerPixel == 8) {<br>
-               byte *dst = (byte *)_surface->getPixels();<br>
-<br>
-               for (int32 i = 0; i < height; i++) {<br>
-                       stream.read(dst + (height - i - 1) * width, width);<br>
-                       stream.skip(extraDataLength);<br>
-               }<br>
-       } else if (bitsPerPixel == 24) {<br>
-               byte *dst = (byte *)_surface->getBasePtr(0, height - 1);<br>
-<br>
-               for (int32 i = 0; i < height; i++) {<br>
-                       for (uint32 j = 0; j < width; j++) {<br>
-                               byte b = stream.readByte();<br>
-                               byte g = stream.readByte();<br>
-                               byte r = stream.readByte();<br>
-                               uint32 color = format.RGBToColor(r, g, b);<br>
-<br>
-                               *((uint32 *)dst) = color;<br>
-                               dst += format.bytesPerPixel;<br>
-                       }<br>
-<br>
-                       stream.skip(extraDataLength);<br>
-                       dst -= _surface->pitch * 2;<br>
-               }<br>
-       } else { // 32 bpp<br>
-               byte *dst = (byte *)_surface->getBasePtr(0, height - 1);<br>
-<br>
-               for (int32 i = 0; i < height; i++) {<br>
-                       for (uint32 j = 0; j < width; j++) {<br>
-                               byte b = stream.readByte();<br>
-                               byte g = stream.readByte();<br>
-                               byte r = stream.readByte();<br>
-                               // Ignore the last byte, as in v3 it is unused<br>
-                               // and should thus NOT be used as alpha.<br>
-                               // ref: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx</a><br>


-                               stream.readByte();<br>
-                               uint32 color = format.RGBToColor(r, g, b);<br>
-<br>
-                               *((uint32 *)dst) = color;<br>
-                               dst += format.bytesPerPixel;<br>
-                       }<br>
-<br>
-                       stream.skip(extraDataLength);<br>
-                       dst -= _surface->pitch * 2;<br>
-               }<br>
-       }<br>
-<br>
-       return true;<br>
-}<br>
-<br>
-} // End of namespace Graphics<br>
diff --git a/graphics/decoders/bmp.h b/graphics/decoders/bmp.h<br>
deleted file mode 100644<br>
index da11f04..0000000<br>
--- a/graphics/decoders/bmp.h<br>
+++ /dev/null<br>
@@ -1,67 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/**<br>
- * @file<br>
- * Image decoder used in engines:<br>
- *  - hugo<br>
- *  - mohawk<br>
- *  - wintermute<br>
- */<br>
-<br>
-#ifndef GRAPHICS_DECODERS_BMP_H<br>
-#define GRAPHICS_DECODERS_BMP_H<br>
-<br>
-#include "common/scummsys.h"<br>
-#include "common/str.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
-<br>
-namespace Common{<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-struct PixelFormat;<br>
-struct Surface;<br>
-<br>
-class BitmapDecoder : public ImageDecoder {<br>
-public:<br>
-       BitmapDecoder();<br>
-       virtual ~BitmapDecoder();<br>
-<br>
-       // ImageDecoder API<br>
-       void destroy();<br>
-       virtual bool loadStream(Common::SeekableReadStream &stream);<br>
-       virtual const Surface *getSurface() const { return _surface; }<br>
-       const byte *getPalette() const { return _palette; }<br>
-       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
-<br>
-private:<br>
-       Surface *_surface;<br>
-       byte *_palette;<br>
-       uint16 _paletteColorCount;<br>
-};<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif<br>
diff --git a/graphics/decoders/iff.cpp b/graphics/decoders/iff.cpp<br>
deleted file mode 100644<br>
index c5fd46b..0000000<br>
--- a/graphics/decoders/iff.cpp<br>
+++ /dev/null<br>
@@ -1,244 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#include "common/iff_container.h"<br>
-#include "common/stream.h"<br>
-#include "common/util.h"<br>
-<br>
-#include "graphics/decoders/iff.h"<br>
-<br>
-namespace Graphics {<br>
-<br>
-IFFDecoder::IFFDecoder() {<br>
-       _surface = 0;<br>
-       _palette = 0;<br>
-<br>
-       // these 2 properties are not reset by destroy(), so the default is set here.<br>
-       _numRelevantPlanes = 8;<br>
-       _pixelPacking = false;<br>
-<br>
-       destroy();<br>
-}<br>
-<br>
-IFFDecoder::~IFFDecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-void IFFDecoder::destroy() {<br>
-       if (_surface) {<br>
-               _surface->free();<br>
-               delete _surface;<br>
-               _surface = 0;<br>
-       }<br>
-<br>
-       if (_palette) {<br>
-               delete[] _palette;<br>
-               _palette = 0;<br>
-       }<br>
-<br>
-       memset(&_header, 0, sizeof(Header));<br>
-       _paletteRanges.clear();<br>
-       _type = TYPE_UNKNOWN;<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-bool IFFDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
-       destroy();<br>
-<br>
-       const uint32 form = stream.readUint32BE();<br>
-<br>
-       if (form != ID_FORM) {<br>
-               warning("Failed reading IFF-file");<br>
-               return false;<br>
-       }<br>
-<br>
-       stream.skip(4);<br>
-<br>
-       const uint32 type = stream.readUint32BE();<br>
-<br>
-       switch (type) {<br>
-               case ID_ILBM:<br>
-                       _type = TYPE_ILBM;<br>
-                       break;<br>
-               case ID_PBM:<br>
-                       _type = TYPE_PBM;<br>
-                       break;<br>
-       }<br>
-<br>
-       if (type == TYPE_UNKNOWN) {<br>
-               warning("Failed reading IFF-file");<br>
-               return false;<br>
-       }<br>
-<br>
-       while (1) {<br>
-               const uint32 chunkType = stream.readUint32BE();<br>
-               const uint32 chunkSize = stream.readUint32BE();<br>
-<br>
-               if (stream.eos())<br>
-                       break;<br>
-<br>
-               switch (chunkType) {<br>
-               case ID_BMHD:<br>
-                       loadHeader(stream);<br>
-                       break;<br>
-               case ID_CMAP:<br>
-                       loadPalette(stream, chunkSize);<br>
-                       break;<br>
-               case ID_CRNG:<br>
-                       loadPaletteRange(stream, chunkSize);<br>
-                       break;<br>
-               case ID_BODY:<br>
-                       loadBitmap(stream);<br>
-                       break;<br>
-               default:<br>
-                       stream.skip(chunkSize);<br>
-               }<br>
-       }<br>
-<br>
-       return true;<br>
-}<br>
-<br>
-void IFFDecoder::loadHeader(Common::SeekableReadStream &stream) {<br>
-       _header.width = stream.readUint16BE();<br>
-       _header.height = stream.readUint16BE();<br>
-       _header.x = stream.readUint16BE();<br>
-       _header.y = stream.readUint16BE();<br>
-       _header.numPlanes = stream.readByte();<br>
-       _header.masking = stream.readByte();<br>
-       _header.compression = stream.readByte();<br>
-       _header.flags = stream.readByte();<br>
-       _header.transparentColor = stream.readUint16BE();<br>
-       _header.xAspect = stream.readByte();<br>
-       _header.yAspect = stream.readByte();<br>
-       _header.pageWidth = stream.readUint16BE();<br>
-       _header.pageHeight = stream.readUint16BE();<br>
-<br>
-       assert(_header.width >= 1);<br>
-       assert(_header.height >= 1);<br>
-       assert(_header.numPlanes >= 1 && _header.numPlanes <= 8 && _header.numPlanes != 7);<br>
-}<br>
-<br>
-void IFFDecoder::loadPalette(Common::SeekableReadStream &stream, const uint32 size) {<br>
-       _palette = new byte[size];<br>
-       stream.read(_palette, size);<br>
-       _paletteColorCount = size / 3;<br>
-}<br>
-<br>
-void IFFDecoder::loadPaletteRange(Common::SeekableReadStream &stream, const uint32 size) {<br>
-       PaletteRange range;<br>
-<br>
-       range.timer = stream.readSint16BE();<br>
-       range.step = stream.readSint16BE();<br>
-       range.flags = stream.readSint16BE();<br>
-       range.first = stream.readByte();<br>
-       range.last = stream.readByte();<br>
-<br>
-       _paletteRanges.push_back(range);<br>
-}<br>
-<br>
-void IFFDecoder::loadBitmap(Common::SeekableReadStream &stream) {<br>
-       _numRelevantPlanes = MIN(_numRelevantPlanes, _header.numPlanes);<br>
-<br>
-       if (_numRelevantPlanes != 1 && _numRelevantPlanes != 2 && _numRelevantPlanes != 4)<br>
-               _pixelPacking = false;<br>
-<br>
-       uint16 outPitch = _header.width;<br>
-<br>
-       if (_pixelPacking)<br>
-               outPitch /= (8 / _numRelevantPlanes);<br>
-<br>
-       // FIXME: CLUT8 is not a proper format for packed bitmaps but there is no way to tell it to use 1, 2 or 4 bits per pixel<br>
-       _surface = new Graphics::Surface();<br>
-       _surface->create(outPitch, _header.height, Graphics::PixelFormat::createFormatCLUT8());<br>
-<br>
-       if (_type == TYPE_ILBM) {<br>
-               uint32 scanlinePitch = ((_header.width + 15) >> 4) << 1;<br>
-               byte *scanlines = new byte[scanlinePitch * _header.numPlanes];<br>
-               byte *data = (byte *)_surface->getPixels();<br>
-<br>
-               for (uint16 i = 0; i < _header.height; ++i) {<br>
-                       byte *scanline = scanlines;<br>
-<br>
-                       for (uint16 j = 0; j < _header.numPlanes; ++j) {<br>
-                               uint16 outSize = scanlinePitch;<br>
-<br>
-                               if (_header.compression) {<br>
-                                       Common::PackBitsReadStream packStream(stream);<br>
-                                       packStream.read(scanline, outSize);<br>
-                               } else {<br>
-                                       stream.read(scanline, outSize);<br>
-                               }<br>
-<br>
-                               scanline += outSize;<br>
-                       }<br>
-<br>
-                       packPixels(scanlines, data, scanlinePitch, outPitch);<br>
-                       data += outPitch;<br>
-               }<br>
-<br>
-               delete[] scanlines;<br>
-       } else if (_type == TYPE_PBM) {<br>
-               byte *data = (byte *)_surface->getPixels();<br>
-               uint32 outSize = _header.width * _header.height;<br>
-<br>
-               if (_header.compression) {<br>
-                       Common::PackBitsReadStream packStream(stream);<br>
-                       packStream.read(data, outSize);<br>
-               } else {<br>
-                       stream.read(data, outSize);<br>
-               }<br>
-       }<br>
-}<br>
-<br>
-void IFFDecoder::packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch) {<br>
-       uint32 numPixels = _header.width;<br>
-<br>
-       if (_pixelPacking)<br>
-               numPixels = outPitch * (8 / _numRelevantPlanes);<br>
-<br>
-       for (uint32 x = 0; x < numPixels; ++x) {<br>
-               byte *scanline = scanlines;<br>
-               byte pixel = 0;<br>
-               byte offset = x >> 3;<br>
-               byte bit = 0x80 >> (x & 7);<br>
-<br>
-               // first build a pixel by scanning all the usable planes in the input<br>
-               for (uint32 plane = 0; plane < _numRelevantPlanes; ++plane) {<br>
-                       if (scanline[offset] & bit)<br>
-                               pixel |= (1 << plane);<br>
-<br>
-                       scanline += scanlinePitch;<br>
-               }<br>
-<br>
-               // then output the pixel according to the requested packing<br>
-               if (!_pixelPacking)<br>
-                       data[x] = pixel;<br>
-               else if (_numRelevantPlanes == 1)<br>
-                       data[x / 8] |= (pixel << (x & 7));<br>
-               else if (_numRelevantPlanes == 2)<br>
-                       data[x / 4] |= (pixel << ((x & 3) << 1));<br>
-               else if (_numRelevantPlanes == 4)<br>
-                       data[x / 2] |= (pixel << ((x & 1) << 2));<br>
-       }<br>
-}<br>
-<br>
-} // End of namespace Graphics<br>
diff --git a/graphics/decoders/iff.h b/graphics/decoders/iff.h<br>
deleted file mode 100644<br>
index eb8e0b9..0000000<br>
--- a/graphics/decoders/iff.h<br>
+++ /dev/null<br>
@@ -1,124 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/**<br>
- * @file<br>
- * Image decoder used in engines:<br>
- *  - gob<br>
- *  - parallaction<br>
- *  - queen<br>
- *  - saga<br>
- */<br>
-<br>
-#ifndef GRAPHICS_DECODERS_IFF_H<br>
-#define GRAPHICS_DECODERS_IFF_H<br>
-<br>
-#include "common/array.h"<br>
-#include "common/endian.h"<br>
-<br>
-#include "graphics/surface.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-struct Surface;<br>
-<br>
-class IFFDecoder : public ImageDecoder {<br>
-public:<br>
-       struct Header {<br>
-               uint16 width, height;<br>
-               uint16 x, y;<br>
-               byte numPlanes;<br>
-               byte masking;<br>
-               byte compression;<br>
-               byte flags;<br>
-               uint16 transparentColor;<br>
-               byte xAspect, yAspect;<br>
-               uint16 pageWidth, pageHeight;<br>
-       };<br>
-<br>
-       struct PaletteRange {<br>
-               int16  timer, step, flags;<br>
-               byte first, last;<br>
-       };<br>
-<br>
-       enum Type {<br>
-               TYPE_UNKNOWN = 0,<br>
-               TYPE_ILBM,<br>
-               TYPE_PBM<br>
-       };<br>
-<br>
-       IFFDecoder();<br>
-       virtual ~IFFDecoder();<br>
-<br>
-       // ImageDecoder API<br>
-       void destroy();<br>
-       bool loadStream(Common::SeekableReadStream &stream);<br>
-       const Header *getHeader() const { return &_header; }<br>
-       const Surface *getSurface() const { return _surface; }<br>
-       const byte *getPalette() const { return _palette; }<br>
-       const Common::Array<PaletteRange> &getPaletteRanges() const { return _paletteRanges; }<br>
-       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
-<br>
-       /**<br>
-       * The number of planes to decode, also determines the pixel packing if _packPixels is true.<br>
-       * 8 == decode all planes, map 1 pixel in 1 byte. (default, no packing even if _packPixels is true)<br>
-       *<br>
-       * NOTE: this property must be reset manually, and is not reset by a call to destroy().<br>
-       */<br>
-       void setNumRelevantPlanes(const uint8 numRelevantPlanes) { _numRelevantPlanes = numRelevantPlanes; }<br>
-<br>
-       /**<br>
-       * Enables pixel packing, the amount of packing is determined by _numRelevantPlanes<br>
-       * 1 == decode first plane, pack 8 pixels in 1 byte. This makes _surface->w 1/8th of _header.width<br>
-       * 2 == decode first 2 planes, pack 4 pixels in 1 byte. This makes _surface->w 1/4th of _header.width<br>
-       * 4 == decode first 4 planes, pack 2 pixels in 1 byte. This makes _surface->w half of _header.width<br>
-       * Packed bitmaps won't have a proper surface format since there is no way to tell it to use 1, 2 or 4 bits per pixel<br>
-       *<br>
-       * NOTE: this property must be reset manually, and is not reset by a call to destroy().<br>
-       */<br>
-       void setPixelPacking(const bool pixelPacking) { _pixelPacking = pixelPacking; }<br>
-private:<br>
-<br>
-       Header _header;<br>
-       Surface *_surface;<br>
-       byte *_palette;<br>
-       Common::Array<PaletteRange> _paletteRanges;<br>
-       Type _type;<br>
-       uint16 _paletteColorCount;<br>
-       uint8 _numRelevantPlanes;<br>
-       bool _pixelPacking;<br>
-<br>
-       void loadHeader(Common::SeekableReadStream &stream);<br>
-       void loadPalette(Common::SeekableReadStream &stream, const uint32 size);<br>
-       void loadPaletteRange(Common::SeekableReadStream &stream, const uint32 size);<br>
-       void loadBitmap(Common::SeekableReadStream &stream);<br>
-       void packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch);<br>
-};<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif // GRAPHICS_DECODERS_IFF_H<br>
diff --git a/graphics/decoders/image_decoder.h b/graphics/decoders/image_decoder.h<br>
deleted file mode 100644<br>
index cad3a1d..0000000<br>
--- a/graphics/decoders/image_decoder.h<br>
+++ /dev/null<br>
@@ -1,105 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#ifndef GRAPHICS_DECODERS_IMAGEDECODER_H<br>
-#define GRAPHICS_DECODERS_IMAGEDECODER_H<br>
-<br>
-#include "common/scummsys.h"<br>
-#include "common/str.h"<br>
-<br>
-namespace Common{<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-struct PixelFormat;<br>
-struct Surface;<br>
-<br>
-/**<br>
- * A representation of an image decoder that maintains ownership of the surface<br>
- * and palette it decodes to.<br>
- */<br>
-class ImageDecoder {<br>
-public:<br>
-       virtual ~ImageDecoder() {}<br>
-<br>
-       /**<br>
-        * Load an image from the specified stream<br>
-        *<br>
-        * loadStream() should implicitly call destroy() to free the memory<br>
-        * of the last loadStream() call.<br>
-        *<br>
-        * @param stream the input stream<br>
-        * @return whether loading the file succeeded<br>
-        * @see getSurface<br>
-        * @see getPalette<br>
-        */<br>
-       virtual bool loadStream(Common::SeekableReadStream &stream) = 0;<br>
-<br>
-       /**<br>
-        * Destroy this decoder's surface and palette<br>
-        *<br>
-        * This should be called by a loadStream() implementation as well<br>
-        * as the destructor.<br>
-        */<br>
-       virtual void destroy() = 0;<br>
-<br>
-       /**<br>
-        * Get the decoded surface<br>
-        *<br>
-        * This surface is owned by this ImageDecoder and will remain valid<br>
-        * until destroy() or loadStream() is called, or until this ImageDecoder's<br>
-        * destructor is called.<br>
-        *<br>
-        * @return the decoded surface, or 0 if no surface is present<br>
-        */<br>
-       virtual const Surface *getSurface() const = 0;<br>
-<br>
-       /**<br>
-        * Get the decoded palette<br>
-        *<br>
-        * This palette is owned by this ImageDecoder and will remain valid<br>
-        * until destroy() or loadStream() is called, or until this ImageDecoder's<br>
-        * destructor is called.<br>
-        *<br>
-        * The palette's format is the same as PaletteManager's palette<br>
-        * (interleaved RGB values).<br>
-        *<br>
-        * @return the decoded palette, or undefined if no palette is present<br>
-        */<br>
-       virtual const byte *getPalette() const { return 0; }<br>
-<br>
-       /**<br>
-        * Query if the decoded image has a palette.<br>
-        */<br>
-       virtual bool hasPalette() const { return getPaletteColorCount() != 0; }<br>
-<br>
-       /** Return the starting index of the palette. */<br>
-       virtual byte getPaletteStartIndex() const { return 0; }<br>
-       /** Return the number of colors in the palette. */<br>
-       virtual uint16 getPaletteColorCount() const { return 0; }<br>
-};<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif<br>
diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp<br>
deleted file mode 100644<br>
index aa62ff9..0000000<br>
--- a/graphics/decoders/jpeg.cpp<br>
+++ /dev/null<br>
@@ -1,266 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-// libjpeg uses forbidden symbols in its header. Thus, we need to allow them<br>
-// here.<br>
-#define FORBIDDEN_SYMBOL_ALLOW_ALL<br>
-<br>
-#include "graphics/pixelformat.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
-<br>
-#include "common/debug.h"<br>
-#include "common/endian.h"<br>
-#include "common/stream.h"<br>
-#include "common/textconsole.h"<br>
-<br>
-#ifdef USE_JPEG<br>
-// The original release of libjpeg v6b did not contain any extern "C" in case<br>
-// its header files are included in a C++ environment. To avoid any linking<br>
-// issues we need to add it on our own.<br>
-extern "C" {<br>
-#include <jpeglib.h><br>
-#include <jerror.h><br>
-}<br>
-#endif<br>
-<br>
-namespace Graphics {<br>
-<br>
-JPEGDecoder::JPEGDecoder() : ImageDecoder(), _surface(), _colorSpace(kColorSpaceRGBA) {<br>
-}<br>
-<br>
-JPEGDecoder::~JPEGDecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-const Surface *JPEGDecoder::getSurface() const {<br>
-       return &_surface;<br>
-}<br>
-<br>
-void JPEGDecoder::destroy() {<br>
-       _surface.free();<br>
-}<br>
-<br>
-#ifdef USE_JPEG<br>
-namespace {<br>
-<br>
-#define JPEG_BUFFER_SIZE 4096<br>
-<br>
-struct StreamSource : public jpeg_source_mgr {<br>
-       Common::SeekableReadStream *stream;<br>
-       bool startOfFile;<br>
-       JOCTET buffer[JPEG_BUFFER_SIZE];<br>
-};<br>
-<br>
-void initSource(j_decompress_ptr cinfo) {<br>
-       StreamSource *source = (StreamSource *)cinfo->src;<br>
-       source->startOfFile = true;<br>
-}<br>
-<br>
-boolean fillInputBuffer(j_decompress_ptr cinfo) {<br>
-       StreamSource *source = (StreamSource *)cinfo->src;<br>
-<br>
-       uint32 bufferSize = source->stream->read((byte *)source->buffer, sizeof(source->buffer));<br>
-       if (bufferSize == 0) {<br>
-               if (source->startOfFile) {<br>
-                       // An empty file is a fatal error<br>
-                       ERREXIT(cinfo, JERR_INPUT_EMPTY);<br>
-               } else {<br>
-                       // Otherwise we insert an EOF marker<br>
-                       WARNMS(cinfo, JWRN_JPEG_EOF);<br>
-                       source->buffer[0] = (JOCTET)0xFF;<br>
-                       source->buffer[1] = (JOCTET)JPEG_EOI;<br>
-                       bufferSize = 2;<br>
-               }<br>
-       }<br>
-<br>
-       source->next_input_byte = source->buffer;<br>
-       source->bytes_in_buffer = bufferSize;<br>
-       source->startOfFile = false;<br>
-<br>
-       return TRUE;<br>
-}<br>
-<br>
-void skipInputData(j_decompress_ptr cinfo, long numBytes) {<br>
-       StreamSource *source = (StreamSource *)cinfo->src;<br>
-<br>
-       if (numBytes > 0) {<br>
-               if (numBytes > (long)source->bytes_in_buffer) {<br>
-                       // In case we need to skip more bytes than there are in the buffer<br>
-                       // we will skip the remaining data and fill the buffer again<br>
-                       numBytes -= (long)source->bytes_in_buffer;<br>
-<br>
-                       // Skip the remaining bytes<br>
-                       source->stream->skip(numBytes);<br>
-<br>
-                       // Fill up the buffer again<br>
-                       (*source->fill_input_buffer)(cinfo);<br>
-               } else {<br>
-                       source->next_input_byte += (size_t)numBytes;<br>
-                       source->bytes_in_buffer -= (size_t)numBytes;<br>
-               }<br>
-<br>
-       }<br>
-}<br>
-<br>
-void termSource(j_decompress_ptr cinfo) {<br>
-}<br>
-<br>
-void jpeg_scummvm_src(j_decompress_ptr cinfo, Common::SeekableReadStream *stream) {<br>
-       StreamSource *source;<br>
-<br>
-       // Initialize the source in case it has not been done yet.<br>
-       if (cinfo->src == NULL) {<br>
-               cinfo->src = (jpeg_source_mgr *)(*cinfo->mem->alloc_small)((j_common_ptr)cinfo, JPOOL_PERMANENT, sizeof(StreamSource));<br>
-       }<br>
-<br>
-       source = (StreamSource *)cinfo->src;<br>
-       source->init_source       = &initSource;<br>
-       source->fill_input_buffer = &fillInputBuffer;<br>
-       source->skip_input_data   = &skipInputData;<br>
-       source->resync_to_restart = &jpeg_resync_to_restart;<br>
-       source->term_source       = &termSource;<br>
-       source->bytes_in_buffer   = 0;<br>
-       source->next_input_byte   = NULL;<br>
-<br>
-       source->stream = stream;<br>
-}<br>
-<br>
-void errorExit(j_common_ptr cinfo) {<br>
-       char buffer[JMSG_LENGTH_MAX];<br>
-       (*cinfo->err->format_message)(cinfo, buffer);<br>
-       // This function is not allowed to return to the caller, thus we simply<br>
-       // error out with our error handling here.<br>
-       error("%s", buffer);<br>
-}<br>
-<br>
-void outputMessage(j_common_ptr cinfo) {<br>
-       char buffer[JMSG_LENGTH_MAX];<br>
-       (*cinfo->err->format_message)(cinfo, buffer);<br>
-       // Is using debug here a good idea? Or do we want to ignore all libjpeg<br>
-       // messages?<br>
-       debug(3, "libjpeg: %s", buffer);<br>
-}<br>
-<br>
-} // End of anonymous namespace<br>
-#endif<br>
-<br>
-bool JPEGDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
-#ifdef USE_JPEG<br>
-       // Reset member variables from previous decodings<br>
-       destroy();<br>
-<br>
-       jpeg_decompress_struct cinfo;<br>
-       jpeg_error_mgr jerr;<br>
-<br>
-       // Initialize error handling callbacks<br>
-       cinfo.err = jpeg_std_error(&jerr);<br>
-       cinfo.err->error_exit = &errorExit;<br>
-       cinfo.err->output_message = &outputMessage;<br>
-<br>
-       // Initialize the decompression structure<br>
-       jpeg_create_decompress(&cinfo);<br>
-<br>
-       // Initialize our buffer handling<br>
-       jpeg_scummvm_src(&cinfo, &stream);<br>
-<br>
-       // Read the file header<br>
-       jpeg_read_header(&cinfo, TRUE);<br>
-<br>
-       // We can request YUV output because Groovie requires it<br>
-       switch (_colorSpace) {<br>
-       case kColorSpaceRGBA:<br>
-               cinfo.out_color_space = JCS_RGB;<br>
-               break;<br>
-<br>
-       case kColorSpaceYUV:<br>
-               cinfo.out_color_space = JCS_YCbCr;<br>
-               break;<br>
-       }<br>
-<br>
-       // Actually start decompressing the image<br>
-       jpeg_start_decompress(&cinfo);<br>
-<br>
-       // Allocate buffers for the output data<br>
-       switch (_colorSpace) {<br>
-       case kColorSpaceRGBA:<br>
-               // We use RGBA8888 in this scenario<br>
-               _surface.create(cinfo.output_width, cinfo.output_height, Graphics::PixelFormat(4, 8, 8, 8, 0, 24, 16, 8, 0));<br>
-               break;<br>
-<br>
-       case kColorSpaceYUV:<br>
-               // We use YUV with 3 bytes per pixel otherwise.<br>
-               // This is pretty ugly since our PixelFormat cannot express YUV...<br>
-               _surface.create(cinfo.output_width, cinfo.output_height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));<br>
-               break;<br>
-       }<br>
-<br>
-       // Allocate buffer for one scanline<br>
-       assert(cinfo.output_components == 3);<br>
-       JDIMENSION pitch = cinfo.output_width * cinfo.output_components;<br>
-       assert(_surface.pitch >= pitch);<br>
-       JSAMPARRAY buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo, JPOOL_IMAGE, pitch, 1);<br>
-<br>
-       // Go through the image data scanline by scanline<br>
-       while (cinfo.output_scanline < cinfo.output_height) {<br>
-               byte *dst = (byte *)_surface.getBasePtr(0, cinfo.output_scanline);<br>
-<br>
-               jpeg_read_scanlines(&cinfo, buffer, 1);<br>
-<br>
-               const byte *src = buffer[0];<br>
-               switch (_colorSpace) {<br>
-               case kColorSpaceRGBA: {<br>
-                       for (int remaining = cinfo.output_width; remaining > 0; --remaining) {<br>
-                               byte r = *src++;<br>
-                               byte g = *src++;<br>
-                               byte b = *src++;<br>
-                               // We need to insert a alpha value of 255 (opaque) here.<br>
-#ifdef SCUMM_BIG_ENDIAN<br>
-                               *dst++ = r;<br>
-                               *dst++ = g;<br>
-                               *dst++ = b;<br>
-                               *dst++ = 0xFF;<br>
-#else<br>
-                               *dst++ = 0xFF;<br>
-                               *dst++ = b;<br>
-                               *dst++ = g;<br>
-                               *dst++ = r;<br>
-#endif<br>
-                       }<br>
-                       } break;<br>
-<br>
-               case kColorSpaceYUV:<br>
-                       memcpy(dst, src, pitch);<br>
-                       break;<br>
-               }<br>
-       }<br>
-<br>
-       // We are done with decompressing, thus free all the data<br>
-       jpeg_finish_decompress(&cinfo);<br>
-       jpeg_destroy_decompress(&cinfo);<br>
-<br>
-       return true;<br>
-#else<br>
-       return false;<br>
-#endif<br>
-}<br>
-<br>
-} // End of Graphics namespace<br>
diff --git a/graphics/decoders/jpeg.h b/graphics/decoders/jpeg.h<br>
deleted file mode 100644<br>
index 8fd03ca..0000000<br>
--- a/graphics/decoders/jpeg.h<br>
+++ /dev/null<br>
@@ -1,95 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/**<br>
- * @file<br>
- * Image decoder used in engines:<br>
- *  - groovie<br>
- *  - mohawk<br>
- *  - wintermute<br>
- */<br>
-<br>
-#ifndef GRAPHICS_JPEG_H<br>
-#define GRAPHICS_JPEG_H<br>
-<br>
-#include "graphics/surface.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-class JPEGDecoder : public ImageDecoder {<br>
-public:<br>
-       JPEGDecoder();<br>
-       ~JPEGDecoder();<br>
-<br>
-       // ImageDecoder API<br>
-       virtual void destroy();<br>
-       virtual bool loadStream(Common::SeekableReadStream &str);<br>
-       virtual const Surface *getSurface() const;<br>
-<br>
-       // Special API for JPEG<br>
-       enum ColorSpace {<br>
-               /**<br>
-                * Output 32bit RGBA data.<br>
-                *<br>
-                * This is the default output.<br>
-                */<br>
-               kColorSpaceRGBA,<br>
-<br>
-               /**<br>
-                * Output (interleaved) YUV data.<br>
-                *<br>
-                * Be aware that some images cannot be output in YUV mode.<br>
-                * These are (non-standard) JPEG images which are in RGB colorspace.<br>
-                *<br>
-                * The resulting Surface will have a PixelFormat with 3 bytes per<br>
-                * pixel and the remaining entries are completely zeroed. This works<br>
-                * around the fact that PixelFormat can only describe RGB formats.<br>
-                *<br>
-                * You should only use this when you are really aware of what you are<br>
-                * doing!<br>
-                */<br>
-               kColorSpaceYUV<br>
-       };<br>
-<br>
-       /**<br>
-        * Request the output color space. This can be used to obtain raw YUV<br>
-        * data from the JPEG file. But this might not work for all files!<br>
-        *<br>
-        * The decoder itself defaults to RGBA.<br>
-        *<br>
-        * @param outSpace The color space to output.<br>
-        */<br>
-       void setOutputColorSpace(ColorSpace outSpace) { _colorSpace = outSpace; }<br>
-<br>
-private:<br>
-       Graphics::Surface _surface;<br>
-       ColorSpace _colorSpace;<br>
-};<br>
-<br>
-} // End of Graphics namespace<br>
-<br>
-#endif // GRAPHICS_JPEG_H<br>
diff --git a/graphics/decoders/pcx.cpp b/graphics/decoders/pcx.cpp<br>
deleted file mode 100644<br>
index bc82275..0000000<br>
--- a/graphics/decoders/pcx.cpp<br>
+++ /dev/null<br>
@@ -1,214 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#include "common/stream.h"<br>
-#include "common/textconsole.h"<br>
-<br>
-#include "graphics/pixelformat.h"<br>
-#include "graphics/surface.h"<br>
-#include "graphics/decoders/pcx.h"<br>
-<br>
-/**<br>
- * Based on the PCX specs:<br>
- * <a href="http://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm" target="_blank">http://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm</a><br>
- * and the PCX decoder of FFmpeg (libavcodec/pcx.c):<br>
- * <a href="http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pcx.c" target="_blank">http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pcx.c</a><br>
- */<br>
-<br>
-namespace Graphics {<br>
-<br>
-PCXDecoder::PCXDecoder() {<br>
-       _surface = 0;<br>
-       _palette = 0;<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-PCXDecoder::~PCXDecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-void PCXDecoder::destroy() {<br>
-       if (_surface) {<br>
-               _surface->free();<br>
-               delete _surface;<br>
-               _surface = 0;<br>
-       }<br>
-<br>
-       delete[] _palette;<br>
-       _palette = 0;<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
-       destroy();<br>
-<br>
-       if (stream.readByte() != 0x0a)  // ZSoft PCX<br>
-               return false;<br>
-<br>
-       byte version = stream.readByte();       // 0 - 5<br>
-       if (version > 5)<br>
-               return false;<br>
-<br>
-       bool compressed = stream.readByte(); // encoding, 1 = run length encoding<br>
-       byte bitsPerPixel = stream.readByte();  // 1, 2, 4 or 8<br>
-<br>
-       // Window<br>
-       uint16 xMin = stream.readUint16LE();<br>
-       uint16 yMin = stream.readUint16LE();<br>
-       uint16 xMax = stream.readUint16LE();<br>
-       uint16 yMax = stream.readUint16LE();<br>
-<br>
-       uint16 width  = xMax - xMin + 1;<br>
-       uint16 height = yMax - yMin + 1;<br>
-<br>
-       if (xMax < xMin || yMax < yMin) {<br>
-               warning("Invalid PCX image dimensions");<br>
-               return false;<br>
-       }<br>
-<br>
-       stream.skip(4); // HDpi, VDpi<br>
-<br>
-       // Read the EGA palette (colormap)<br>
-       _palette = new byte[16 * 3];<br>
-       for (uint16 i = 0; i < 16; i++) {<br>
-               _palette[i * 3 + 0] = stream.readByte();<br>
-               _palette[i * 3 + 1] = stream.readByte();<br>
-               _palette[i * 3 + 2] = stream.readByte();<br>
-       }<br>
-<br>
-       if (stream.readByte() != 0)     // reserved, should be set to 0<br>
-               return false;<br>
-<br>
-       byte nPlanes = stream.readByte();<br>
-       uint16 bytesPerLine = stream.readUint16LE();<br>
-       uint16 bytesPerscanLine = nPlanes * bytesPerLine;<br>
-<br>
-       if (bytesPerscanLine < width * bitsPerPixel * nPlanes / 8) {<br>
-               warning("PCX data is corrupted");<br>
-               return false;<br>
-       }<br>
-<br>
-       stream.skip(60);        // PaletteInfo, HscreenSize, VscreenSize, Filler<br>
-<br>
-       _surface = new Graphics::Surface();<br>
-<br>
-       byte *scanLine = new byte[bytesPerscanLine];<br>
-       byte *dst;<br>
-       int x, y;<br>
-<br>
-       if (nPlanes == 3 && bitsPerPixel == 8) {        // 24bpp<br>
-               Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);<br>
-               _surface->create(width, height, format);<br>
-               dst = (byte *)_surface->getPixels();<br>
-               _paletteColorCount = 0;<br>
-<br>
-               for (y = 0; y < height; y++) {<br>
-                       decodeRLE(stream, scanLine, bytesPerscanLine, compressed);<br>
-<br>
-                       for (x = 0; x < width; x++) {<br>
-                               byte b = scanLine[x];<br>
-                               byte g = scanLine[x +  bytesPerLine];<br>
-                               byte r = scanLine[x + (bytesPerLine << 1)];<br>
-                               uint32 color = format.RGBToColor(r, g, b);<br>
-<br>
-                               *((uint32 *)dst) = color;<br>
-                               dst += format.bytesPerPixel;<br>
-                       }<br>
-               }<br>
-       } else if (nPlanes == 1 && bitsPerPixel == 8) { // 8bpp indexed<br>
-               _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
-               dst = (byte *)_surface->getPixels();<br>
-               _paletteColorCount = 16;<br>
-<br>
-               for (y = 0; y < height; y++, dst += _surface->pitch) {<br>
-                       decodeRLE(stream, scanLine, bytesPerscanLine, compressed);<br>
-                       memcpy(dst, scanLine, width);<br>
-               }<br>
-<br>
-               if (version == 5) {<br>
-                       if (stream.readByte() != 12) {<br>
-                               warning("Expected a palette after the PCX image data");<br>
-                               delete[] scanLine;<br>
-                               return false;<br>
-                       }<br>
-<br>
-                       // Read the VGA palette<br>
-                       delete[] _palette;<br>
-                       _palette = new byte[256 * 3];<br>
-                       for (uint16 i = 0; i < 256; i++) {<br>
-                               _palette[i * 3 + 0] = stream.readByte();<br>
-                               _palette[i * 3 + 1] = stream.readByte();<br>
-                               _palette[i * 3 + 2] = stream.readByte();<br>
-                       }<br>
-<br>
-                       _paletteColorCount = 256;<br>
-               }<br>
-       } else if ((nPlanes == 2 || nPlanes == 3 || nPlanes == 4) && bitsPerPixel == 1) {       // planar, 4, 8 or 16 colors<br>
-               _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
-               dst = (byte *)_surface->getPixels();<br>
-               _paletteColorCount = 16;<br>
-<br>
-               for (y = 0; y < height; y++, dst += _surface->pitch) {<br>
-                       decodeRLE(stream, scanLine, bytesPerscanLine, compressed);<br>
-<br>
-                       for (x = 0; x < width; x++) {<br>
-                               int m = 0x80 >> (x & 7), v = 0;<br>
-                               for (int i = nPlanes - 1; i >= 0; i--) {<br>
-                                       v <<= 1;<br>
-                                       v  += (scanLine[i * bytesPerLine + (x >> 3)] & m) == 0 ? 0 : 1;<br>
-                               }<br>
-                               dst[x] = v;<br>
-                       }<br>
-               }<br>
-       } else {<br>
-               // Known unsupported case: 1 plane and bpp < 8 (1, 2 or 4)<br>
-               warning("Invalid PCX file (%d planes, %d bpp)", nPlanes, bitsPerPixel);<br>
-               delete[] scanLine;<br>
-               return false;<br>
-       }<br>
-<br>
-       delete[] scanLine;<br>
-<br>
-       return true;<br>
-}<br>
-<br>
-void PCXDecoder::decodeRLE(Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerscanLine, bool compressed) {<br>
-       uint32 i = 0;<br>
-       byte run, value;<br>
-<br>
-       if (compressed) {<br>
-               while (i < bytesPerscanLine) {<br>
-                       run = 1;<br>
-                       value = stream.readByte();<br>
-                       if (value >= 0xc0) {<br>
-                               run = value & 0x3f;<br>
-                               value = stream.readByte();<br>
-                       }<br>
-                       while (i < bytesPerscanLine && run--)<br>
-                               dst[i++] = value;<br>
-               }<br>
-       } else {<br>
-               stream.read(dst, bytesPerscanLine);<br>
-       }<br>
-}<br>
-<br>
-} // End of namespace Graphics<br>
diff --git a/graphics/decoders/pcx.h b/graphics/decoders/pcx.h<br>
deleted file mode 100644<br>
index 675ab50..0000000<br>
--- a/graphics/decoders/pcx.h<br>
+++ /dev/null<br>
@@ -1,69 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/**<br>
- * PCX decoder used in engines:<br>
- *  - dreamweb<br>
- *  - hugo<br>
- *  - queen<br>
- *  - tucker<br>
- */<br>
-<br>
-#ifndef GRAPHICS_DECODERS_PCX_H<br>
-#define GRAPHICS_DECODERS_PCX_H<br>
-<br>
-#include "common/scummsys.h"<br>
-#include "common/str.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
-<br>
-namespace Common{<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-struct PixelFormat;<br>
-struct Surface;<br>
-<br>
-class PCXDecoder : public ImageDecoder {<br>
-public:<br>
-       PCXDecoder();<br>
-       virtual ~PCXDecoder();<br>
-<br>
-       // ImageDecoder API<br>
-       void destroy();<br>
-       virtual bool loadStream(Common::SeekableReadStream &stream);<br>
-       virtual const Surface *getSurface() const { return _surface; }<br>
-       const byte *getPalette() const { return _palette; }<br>
-       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
-<br>
-private:<br>
-       void decodeRLE(Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerScanline, bool compressed);<br>
-<br>
-       Surface *_surface;<br>
-       byte *_palette;<br>
-       uint16 _paletteColorCount;<br>
-};<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif<br>
diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp<br>
deleted file mode 100644<br>
index 8849a83..0000000<br>
--- a/graphics/decoders/pict.cpp<br>
+++ /dev/null<br>
@@ -1,580 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#include "common/debug.h"<br>
-#include "common/endian.h"<br>
-#include "common/stream.h"<br>
-#include "common/substream.h"<br>
-#include "common/textconsole.h"<br>
-<br>
-#include "graphics/surface.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
-#include "graphics/decoders/pict.h"<br>
-<br>
-namespace Graphics {<br>
-<br>
-// The PICT code is based off of the QuickDraw specs:<br>
-// <a href="http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-461.html" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-461.html</a><br>


-// <a href="http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-269.html" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-269.html</a><br>


-<br>
-PICTDecoder::PICTDecoder() {<br>
-       _outputSurface = 0;<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-PICTDecoder::~PICTDecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-void PICTDecoder::destroy() {<br>
-       if (_outputSurface) {<br>
-               _outputSurface->free();<br>
-               delete _outputSurface;<br>
-               _outputSurface = 0;<br>
-       }<br>
-<br>
-       _paletteColorCount = 0;<br>
-}<br>
-<br>
-#define OPCODE(a, b, c) _opcodes.push_back(PICTOpcode(a, &PICTDecoder::b, c))<br>
-<br>
-void PICTDecoder::setupOpcodesCommon() {<br>
-       OPCODE(0x0000, o_nop, "NOP");<br>
-       OPCODE(0x0001, o_clip, "Clip");<br>
-       OPCODE(0x0003, o_txFont, "TxFont");<br>
-       OPCODE(0x0004, o_txFace, "TxFace");<br>
-       OPCODE(0x0007, o_pnSize, "PnSize");<br>
-       OPCODE(0x000D, o_txSize, "TxSize");<br>
-       OPCODE(0x0010, o_txRatio, "TxRatio");<br>
-       OPCODE(0x0011, o_versionOp, "VersionOp");<br>
-       OPCODE(0x001E, o_nop, "DefHilite");<br>
-       OPCODE(0x0028, o_longText, "LongText");<br>
-       OPCODE(0x00A1, o_longComment, "LongComment");<br>
-       OPCODE(0x00FF, o_opEndPic, "OpEndPic");<br>
-       OPCODE(0x0C00, o_headerOp, "HeaderOp");<br>
-}<br>
-<br>
-void PICTDecoder::setupOpcodesNormal() {<br>
-       setupOpcodesCommon();<br>
-       OPCODE(0x0098, on_packBitsRect, "PackBitsRect");<br>
-       OPCODE(0x009A, on_directBitsRect, "DirectBitsRect");<br>
-       OPCODE(0x8200, on_compressedQuickTime, "CompressedQuickTime");<br>
-}<br>
-<br>
-void PICTDecoder::setupOpcodesQuickTime() {<br>
-       setupOpcodesCommon();<br>
-       OPCODE(0x0098, oq_packBitsRect, "PackBitsRect");<br>
-       OPCODE(0x009A, oq_directBitsRect, "DirectBitsRect");<br>
-       OPCODE(0x8200, oq_compressedQuickTime, "CompressedQuickTime");<br>
-}<br>
-<br>
-#undef OPCODE<br>
-<br>
-void PICTDecoder::o_nop(Common::SeekableReadStream &) {<br>
-       // Nothing to do<br>
-}<br>
-<br>
-void PICTDecoder::o_clip(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.skip(stream.readUint16BE() - 2);<br>
-}<br>
-<br>
-void PICTDecoder::o_txFont(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readUint16BE();<br>
-}<br>
-<br>
-void PICTDecoder::o_txFace(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readByte();<br>
-}<br>
-<br>
-void PICTDecoder::o_pnSize(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readUint16BE();<br>
-       stream.readUint16BE();<br>
-}<br>
-<br>
-void PICTDecoder::o_txSize(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readUint16BE();<br>
-}<br>
-<br>
-void PICTDecoder::o_txRatio(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readUint16BE();<br>
-       stream.readUint16BE();<br>
-       stream.readUint16BE();<br>
-       stream.readUint16BE();<br>
-}<br>
-<br>
-void PICTDecoder::o_versionOp(Common::SeekableReadStream &stream) {<br>
-       // We only support v2 extended<br>
-       if (stream.readUint16BE() != 0x02FF)<br>
-               error("Unknown PICT version");<br>
-}<br>
-<br>
-void PICTDecoder::o_longText(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readUint16BE();<br>
-       stream.readUint16BE();<br>
-       stream.skip(stream.readByte());<br>
-}<br>
-<br>
-void PICTDecoder::o_longComment(Common::SeekableReadStream &stream) {<br>
-       // Ignore<br>
-       stream.readUint16BE();<br>
-       stream.skip(stream.readUint16BE());<br>
-}<br>
-<br>
-void PICTDecoder::o_opEndPic(Common::SeekableReadStream &stream) {<br>
-       // We've reached the end of the picture<br>
-       _continueParsing = false;<br>
-}<br>
-<br>
-void PICTDecoder::o_headerOp(Common::SeekableReadStream &stream) {<br>
-       // Read the basic header, but we don't really have to do anything with it<br>
-       /* uint16 version = */ stream.readUint16BE();<br>
-       stream.readUint16BE(); // Reserved<br>
-       /* uint32 hRes = */ stream.readUint32BE();<br>
-       /* uint32 vRes = */ stream.readUint32BE();<br>
-       Common::Rect origResRect;<br>
-       origResRect.top = stream.readUint16BE();<br>
-       origResRect.left = stream.readUint16BE();<br>
-       origResRect.bottom = stream.readUint16BE();<br>
-       origResRect.right = stream.readUint16BE();<br>
-       stream.readUint32BE(); // Reserved<br>
-}<br>
-<br>
-void PICTDecoder::on_packBitsRect(Common::SeekableReadStream &stream) {<br>
-       // Unpack data (8bpp or lower)<br>
-       unpackBitsRect(stream, true);<br>
-}<br>
-<br>
-void PICTDecoder::on_directBitsRect(Common::SeekableReadStream &stream) {<br>
-       // Unpack data (16bpp or higher)<br>
-       unpackBitsRect(stream, false);<br>
-}<br>
-<br>
-void PICTDecoder::on_compressedQuickTime(Common::SeekableReadStream &stream) {<br>
-       // OK, here's the fun. We get to completely change how QuickDraw draws<br>
-       // the data in PICT files.<br>
-<br>
-       // Swap out the opcodes to the new ones<br>
-       _opcodes.clear();<br>
-       setupOpcodesQuickTime();<br>
-<br>
-       // We'll decode the first QuickTime data from here, but the QuickTime-specific<br>
-       // opcodes will take over from here on out. Normal opcodes, signing off.<br>
-       decodeCompressedQuickTime(stream);<br>
-}<br>
-<br>
-void PICTDecoder::oq_packBitsRect(Common::SeekableReadStream &stream) {<br>
-       // Skip any data here (8bpp or lower)<br>
-       skipBitsRect(stream, true);<br>
-}<br>
-<br>
-void PICTDecoder::oq_directBitsRect(Common::SeekableReadStream &stream) {<br>
-       // Skip any data here (16bpp or higher)<br>
-       skipBitsRect(stream, false);<br>
-}<br>
-<br>
-void PICTDecoder::oq_compressedQuickTime(Common::SeekableReadStream &stream) {<br>
-       // Just pass the data along<br>
-       decodeCompressedQuickTime(stream);<br>
-}<br>
-<br>
-bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
-       destroy();<br>
-<br>
-       // Initialize opcodes to their normal state<br>
-       _opcodes.clear();<br>
-       setupOpcodesNormal();<br>
-<br>
-       _continueParsing = true;<br>
-       memset(_palette, 0, sizeof(_palette));<br>
-<br>
-       uint16 fileSize = stream.readUint16BE();<br>
-<br>
-       // If we have no file size here, we probably have a PICT from a file<br>
-       // and not a resource. The other two bytes are the fileSize which we<br>
-       // don't actually need (and already read if from a resource).<br>
-       if (!fileSize)<br>
-               stream.seek(512 + 2);<br>
-<br>
-       _imageRect.top = stream.readUint16BE();<br>
-       _imageRect.left = stream.readUint16BE();<br>
-       _imageRect.bottom = stream.readUint16BE();<br>
-       _imageRect.right = stream.readUint16BE();<br>
-       _imageRect.debugPrint(0, "PICT Rect:");<br>
-<br>
-       // NOTE: This is only a subset of the full PICT format.<br>
-       //     - Only V2 (Extended) Images Supported<br>
-       //     - CompressedQuickTime (JPEG) compressed data is supported<br>
-       //     - DirectBitsRect/PackBitsRect compressed data is supported<br>
-       for (uint32 opNum = 0; !stream.eos() && !stream.err() && stream.pos() < stream.size() && _continueParsing; opNum++) {<br>
-               // PICT v2 opcodes are two bytes<br>
-               uint16 opcode = stream.readUint16BE();<br>
-<br>
-               if (opNum == 0 && opcode != 0x0011) {<br>
-                       warning("Cannot find PICT version opcode");<br>
-                       return false;<br>
-               } else if (opNum == 1 && opcode != 0x0C00) {<br>
-                       warning("Cannot find PICT header opcode");<br>
-                       return false;<br>
-               }<br>
-<br>
-               // Since opcodes are word-aligned, we need to mark our starting<br>
-               // position here.<br>
-               uint32 startPos = stream.pos();<br>
-<br>
-               for (uint32 i = 0; i < _opcodes.size(); i++) {<br>
-                       if (_opcodes[i].op == opcode) {<br>
-                               debug(4, "Running PICT opcode %04x '%s'", opcode, _opcodes[i].desc);<br>
-                               (this->*(_opcodes[i].proc))(stream);<br>
-                               break;<br>
-                       } else if (i == _opcodes.size() - 1) {<br>
-                               // Unknown opcode; attempt to continue forward<br>
-                               warning("Unknown PICT opcode %04x", opcode);<br>
-                       }<br>
-               }<br>
-<br>
-               // Align<br>
-               stream.skip((stream.pos() - startPos) & 1);<br>
-       }<br>
-<br>
-       return _outputSurface;<br>
-}<br>
-<br>
-PICTDecoder::PixMap PICTDecoder::readPixMap(Common::SeekableReadStream &stream, bool hasBaseAddr) {<br>
-       PixMap pixMap;<br>
-       pixMap.baseAddr = hasBaseAddr ? stream.readUint32BE() : 0;<br>
-       pixMap.rowBytes = stream.readUint16BE() & 0x3fff;<br>
-       pixMap.bounds.top = stream.readUint16BE();<br>
-       pixMap.bounds.left = stream.readUint16BE();<br>
-       pixMap.bounds.bottom = stream.readUint16BE();<br>
-       pixMap.bounds.right = stream.readUint16BE();<br>
-       pixMap.pmVersion = stream.readUint16BE();<br>
-       pixMap.packType = stream.readUint16BE();<br>
-       pixMap.packSize = stream.readUint32BE();<br>
-       pixMap.hRes = stream.readUint32BE();<br>
-       pixMap.vRes = stream.readUint32BE();<br>
-       pixMap.pixelType = stream.readUint16BE();<br>
-       pixMap.pixelSize = stream.readUint16BE();<br>
-       pixMap.cmpCount = stream.readUint16BE();<br>
-       pixMap.cmpSize = stream.readUint16BE();<br>
-       pixMap.planeBytes = stream.readUint32BE();<br>
-       pixMap.pmTable = stream.readUint32BE();<br>
-       pixMap.pmReserved = stream.readUint32BE();<br>
-       return pixMap;<br>
-}<br>
-<br>
-struct PackBitsRectData {<br>
-       PICTDecoder::PixMap pixMap;<br>
-       Common::Rect srcRect;<br>
-       Common::Rect dstRect;<br>
-       uint16 mode;<br>
-};<br>
-<br>
-void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool withPalette) {<br>
-       PackBitsRectData packBitsData;<br>
-       packBitsData.pixMap = readPixMap(stream, !withPalette);<br>
-<br>
-       // Read in the palette if there is one present<br>
-       if (withPalette) {<br>
-               // See <a href="http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-267.html" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-267.html</a><br>


-               stream.readUint32BE(); // seed<br>
-               stream.readUint16BE(); // flags<br>
-               _paletteColorCount = stream.readUint16BE() + 1;<br>
-<br>
-               for (uint32 i = 0; i < _paletteColorCount; i++) {<br>
-                       stream.readUint16BE();<br>
-                       _palette[i * 3] = stream.readUint16BE() >> 8;<br>
-                       _palette[i * 3 + 1] = stream.readUint16BE() >> 8;<br>
-                       _palette[i * 3 + 2] = stream.readUint16BE() >> 8;<br>
-               }<br>
-       }<br>
-<br>
-       packBitsData.srcRect.top = stream.readUint16BE();<br>
-       packBitsData.srcRect.left = stream.readUint16BE();<br>
-       packBitsData.srcRect.bottom = stream.readUint16BE();<br>
-       packBitsData.srcRect.right = stream.readUint16BE();<br>
-       packBitsData.dstRect.top = stream.readUint16BE();<br>
-       packBitsData.dstRect.left = stream.readUint16BE();<br>
-       packBitsData.dstRect.bottom = stream.readUint16BE();<br>
-       packBitsData.dstRect.right = stream.readUint16BE();<br>
-       packBitsData.mode = stream.readUint16BE();<br>
-<br>
-       uint16 width = packBitsData.srcRect.width();<br>
-       uint16 height = packBitsData.srcRect.height();<br>
-<br>
-       byte bytesPerPixel = 0;<br>
-<br>
-       if (packBitsData.pixMap.pixelSize <= 8)<br>
-               bytesPerPixel = 1;<br>
-       else if (packBitsData.pixMap.pixelSize == 32)<br>
-               bytesPerPixel = packBitsData.pixMap.cmpCount;<br>
-       else<br>
-               bytesPerPixel = packBitsData.pixMap.pixelSize / 8;<br>
-<br>
-       // Ensure we have enough space in the buffer to hold an entire line's worth of pixels<br>
-       uint32 lineSize = MAX<int>(width * bytesPerPixel + (8 * 2 / packBitsData.pixMap.pixelSize), packBitsData.pixMap.rowBytes);<br>
-       byte *buffer = new byte[lineSize * height];<br>
-<br>
-       // Read in amount of data per row<br>
-       for (uint16 i = 0; i < packBitsData.pixMap.bounds.height(); i++) {<br>
-               // NOTE: Compression 0 is "default". The format in SCI games is packed when 0.<br>
-               // In the future, we may need to have something to set the  "default" packing<br>
-               // format, but this is good for now.<br>
-<br>
-               if (packBitsData.pixMap.packType == 1 || packBitsData.pixMap.rowBytes < 8) { // Unpacked, Pad-Byte (on 24-bit)<br>
-                       // TODO: Finish this. Hasn't been needed (yet).<br>
-                       error("Unpacked DirectBitsRect data (padded)");<br>
-               } else if (packBitsData.pixMap.packType == 2) { // Unpacked, No Pad-Byte (on 24-bit)<br>
-                       // TODO: Finish this. Hasn't been needed (yet).<br>
-                       error("Unpacked DirectBitsRect data (not padded)");<br>
-               } else if (packBitsData.pixMap.packType == 0 || packBitsData.pixMap.packType > 2) { // Packed<br>
-                       uint16 byteCount = (packBitsData.pixMap.rowBytes > 250) ? stream.readUint16BE() : stream.readByte();<br>
-                       unpackBitsLine(buffer + i * width * bytesPerPixel, packBitsData.pixMap.rowBytes, stream.readStream(byteCount), packBitsData.pixMap.pixelSize, bytesPerPixel);<br>
-               }<br>
-       }<br>
-<br>
-       _outputSurface = new Graphics::Surface();<br>
-<br>
-       switch (bytesPerPixel) {<br>
-       case 1:<br>
-               // Just copy to the image<br>
-               _outputSurface->create(width, height, PixelFormat::createFormatCLUT8());<br>
-               memcpy(_outputSurface->getPixels(), buffer, _outputSurface->w * _outputSurface->h);<br>
-               break;<br>
-       case 2:<br>
-               // We have a 16-bit surface<br>
-               _outputSurface->create(width, height, PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0));<br>
-               for (uint16 y = 0; y < _outputSurface->h; y++)<br>
-                       for (uint16 x = 0; x < _outputSurface->w; x++)<br>
-                               WRITE_UINT16(_outputSurface->getBasePtr(x, y), READ_UINT16(buffer + (y * _outputSurface->w + x) * 2));<br>
-               break;<br>
-       case 3:<br>
-               // We have a planar 24-bit surface<br>
-               _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));<br>
-               for (uint16 y = 0; y < _outputSurface->h; y++) {<br>
-                       for (uint16 x = 0; x < _outputSurface->w; x++) {<br>
-                               byte r = *(buffer + y * _outputSurface->w * 3 + x);<br>
-                               byte g = *(buffer + y * _outputSurface->w * 3 + _outputSurface->w + x);<br>
-                               byte b = *(buffer + y * _outputSurface->w * 3 + _outputSurface->w * 2 + x);<br>
-                               *((uint32 *)_outputSurface->getBasePtr(x, y)) = _outputSurface->format.RGBToColor(r, g, b);<br>
-                       }<br>
-               }<br>
-               break;<br>
-       case 4:<br>
-               // We have a planar 32-bit surface<br>
-               // Note that we ignore the alpha channel since it seems to not be correct<br>
-               // Mac OS X does not ignore it, but then displays it incorrectly. Photoshop<br>
-               // does ignore it and displays it correctly.<br>
-               _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));<br>
-               for (uint16 y = 0; y < _outputSurface->h; y++) {<br>
-                       for (uint16 x = 0; x < _outputSurface->w; x++) {<br>
-                               byte a = 0xFF;<br>
-                               byte r = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w + x);<br>
-                               byte g = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 2 + x);<br>
-                               byte b = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 3 + x);<br>
-                               *((uint32 *)_outputSurface->getBasePtr(x, y)) = _outputSurface->format.ARGBToColor(a, r, g, b);<br>
-                       }<br>
-               }<br>
-               break;<br>
-       }<br>
-<br>
-       delete[] buffer;<br>
-}<br>
-<br>
-void PICTDecoder::unpackBitsLine(byte *out, uint32 length, Common::SeekableReadStream *data, byte bitsPerPixel, byte bytesPerPixel) {<br>
-       uint32 dataDecoded = 0;<br>
-       byte bytesPerDecode = (bytesPerPixel == 2) ? 2 : 1;<br>
-<br>
-       while (data->pos() < data->size() && dataDecoded < length) {<br>
-               byte op = data->readByte();<br>
-<br>
-               if (op & 0x80) {<br>
-                       uint32 runSize = (op ^ 255) + 2;<br>
-                       uint16 value = (bytesPerDecode == 2) ? data->readUint16BE() : data->readByte();<br>
-<br>
-                       for (uint32 i = 0; i < runSize; i++) {<br>
-                               if (bytesPerDecode == 2) {<br>
-                                       WRITE_UINT16(out, value);<br>
-                                       out += 2;<br>
-                               } else {<br>
-                                       outputPixelBuffer(out, value, bitsPerPixel);<br>
-                               }<br>
-                       }<br>
-                       dataDecoded += runSize * bytesPerDecode;<br>
-               } else {<br>
-                       uint32 runSize = op + 1;<br>
-<br>
-                       if (bytesPerDecode == 1) {<br>
-                               for (uint32 i = 0; i < runSize; i++)<br>
-                                       outputPixelBuffer(out, data->readByte(), bitsPerPixel);<br>
-                       } else {<br>
-                               for (uint32 i = 0; i < runSize; i++) {<br>
-                                       WRITE_UINT16(out, data->readUint16BE());<br>
-                                       out += 2;<br>
-                               }<br>
-                       }<br>
-<br>
-                       dataDecoded += runSize * bytesPerDecode;<br>
-               }<br>
-       }<br>
-<br>
-       // HACK: Even if the data is 24-bit, rowBytes is still 32-bit<br>
-       if (bytesPerPixel == 3)<br>
-               dataDecoded += length / 4;<br>
-<br>
-       if (length != dataDecoded)<br>
-               warning("Mismatched PackBits read (%d/%d)", dataDecoded, length);<br>
-<br>
-       delete data;<br>
-}<br>
-<br>
-void PICTDecoder::outputPixelBuffer(byte *&out, byte value, byte bitsPerPixel) {<br>
-       switch (bitsPerPixel) {<br>
-       case 1:<br>
-               for (int i = 7; i >= 0; i--)<br>
-                       *out++ = (value >> i) & 1;<br>
-               break;<br>
-       case 2:<br>
-               for (int i = 6; i >= 0; i -= 2)<br>
-                       *out++ = (value >> i) & 3;<br>
-               break;<br>
-       case 4:<br>
-               *out++ = (value >> 4) & 0xf;<br>
-               *out++ = value & 0xf;<br>
-               break;<br>
-       default:<br>
-               *out++ = value;<br>
-       }<br>
-}<br>
-<br>
-void PICTDecoder::skipBitsRect(Common::SeekableReadStream &stream, bool withPalette) {<br>
-       // Step through a PackBitsRect/DirectBitsRect function<br>
-<br>
-       if (!withPalette)<br>
-               stream.readUint32BE();<br>
-<br>
-       uint16 rowBytes = stream.readUint16BE();<br>
-       uint16 height = stream.readUint16BE();<br>
-       stream.readUint16BE();<br>
-       height = stream.readUint16BE() - height;<br>
-       stream.readUint16BE();<br>
-<br>
-       uint16 packType;<br>
-<br>
-       // Top two bits signify PixMap vs BitMap<br>
-       if (rowBytes & 0xC000) {<br>
-               // PixMap<br>
-               stream.readUint16BE();<br>
-               packType = stream.readUint16BE();<br>
-               stream.skip(14);<br>
-               stream.readUint16BE(); // pixelSize<br>
-               stream.skip(16);<br>
-<br>
-               if (withPalette) {<br>
-                       stream.readUint32BE();<br>
-                       stream.readUint16BE();<br>
-                       stream.skip((stream.readUint16BE() + 1) * 8);<br>
-               }<br>
-<br>
-               rowBytes &= 0x3FFF;<br>
-       } else {<br>
-               // BitMap<br>
-               packType = 0;<br>
-       }<br>
-<br>
-       stream.skip(18);<br>
-<br>
-       for (uint16 i = 0; i < height; i++) {<br>
-               if (packType == 1 || packType == 2 || rowBytes < 8)<br>
-                       error("Unpacked PackBitsRect data");<br>
-               else if (packType == 0 || packType > 2)<br>
-                       stream.skip((rowBytes > 250) ? stream.readUint16BE() : stream.readByte());<br>
-       }<br>
-}<br>
-<br>
-// Compressed QuickTime details can be found here:<br>
-// <a href="http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/B-Chapter/2TheImageCompression.html" target="_blank">http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/B-Chapter/2TheImageCompression.html</a><br>


-// <a href="http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/F-Chapter/6WorkingwiththeImage.html" target="_blank">http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/F-Chapter/6WorkingwiththeImage.html</a><br>


-void PICTDecoder::decodeCompressedQuickTime(Common::SeekableReadStream &stream) {<br>
-       // First, read all the fields from the opcode<br>
-       uint32 dataSize = stream.readUint32BE();<br>
-       uint32 startPos = stream.pos();<br>
-<br>
-       /* uint16 version = */ stream.readUint16BE();<br>
-<br>
-       // Read in the display matrix<br>
-       uint32 matrix[3][3];<br>
-       for (uint32 i = 0; i < 3; i++)<br>
-               for (uint32 j = 0; j < 3; j++)<br>
-                       matrix[i][j] = stream.readUint32BE();<br>
-<br>
-       // We currently only support offseting images vertically from the matrix<br>
-       uint16 xOffset = 0;<br>
-       uint16 yOffset = matrix[2][1] >> 16;<br>
-<br>
-       uint32 matteSize = stream.readUint32BE();<br>
-       stream.skip(8); // matte rect<br>
-       /* uint16 transferMode = */ stream.readUint16BE();<br>
-       stream.skip(8); // src rect<br>
-       /* uint32 accuracy = */ stream.readUint32BE();<br>
-       uint32 maskSize = stream.readUint32BE();<br>
-<br>
-       // Skip the matte and mask<br>
-       stream.skip(matteSize + maskSize);<br>
-<br>
-       // Now we've reached the image descriptor, so read the relevant data from that<br>
-       uint32 idStart = stream.pos();<br>
-       uint32 idSize = stream.readUint32BE();<br>
-       uint32 codec = stream.readUint32BE();<br>
-       stream.skip(36); // miscellaneous stuff<br>
-       uint32 jpegSize = stream.readUint32BE();<br>
-       stream.skip(idSize - (stream.pos() - idStart)); // more useless stuff<br>
-<br>
-       if (codec != MKTAG('j', 'p', 'e', 'g'))<br>
-               error("Unhandled CompressedQuickTime format '%s'", tag2str(codec));<br>
-<br>
-       Common::SeekableSubReadStream jpegStream(&stream, stream.pos(), stream.pos() + jpegSize);<br>
-<br>
-       JPEGDecoder jpeg;<br>
-       if (!jpeg.loadStream(jpegStream))<br>
-               error("PICTDecoder::decodeCompressedQuickTime(): Could not decode JPEG data");<br>
-<br>
-       const Graphics::Surface *jpegSurface = jpeg.getSurface();<br>
-<br>
-       if (!_outputSurface) {<br>
-               _outputSurface = new Graphics::Surface();<br>
-               _outputSurface->create(_imageRect.width(), _imageRect.height(), jpegSurface->format);<br>
-       }<br>
-<br>
-       for (uint16 y = 0; y < jpegSurface->h; y++)<br>
-               memcpy(_outputSurface->getBasePtr(0 + xOffset, y + yOffset), jpegSurface->getBasePtr(0, y), jpegSurface->w * jpegSurface->format.bytesPerPixel);<br>
-<br>
-       stream.seek(startPos + dataSize);<br>
-}<br>
-<br>
-} // End of namespace Graphics<br>
diff --git a/graphics/decoders/pict.h b/graphics/decoders/pict.h<br>
deleted file mode 100644<br>
index 554b149..0000000<br>
--- a/graphics/decoders/pict.h<br>
+++ /dev/null<br>
@@ -1,140 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/**<br>
- * @file<br>
- * Image decoder used in engines:<br>
- *  - mohawk<br>
- *  - pegasus<br>
- *  - sci<br>
- */<br>
-<br>
-#ifndef GRAPHICS_PICT_H<br>
-#define GRAPHICS_PICT_H<br>
-<br>
-#include "common/array.h"<br>
-#include "common/rect.h"<br>
-#include "common/scummsys.h"<br>
-<br>
-#include "graphics/decoders/image_decoder.h"<br>
-#include "graphics/pixelformat.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-struct Surface;<br>
-<br>
-#define DECLARE_OPCODE(x) void x(Common::SeekableReadStream &stream)<br>
-<br>
-class PICTDecoder : public ImageDecoder {<br>
-public:<br>
-       PICTDecoder();<br>
-       ~PICTDecoder();<br>
-<br>
-       // ImageDecoder API<br>
-       bool loadStream(Common::SeekableReadStream &stream);<br>
-       void destroy();<br>
-       const Surface *getSurface() const { return _outputSurface; }<br>
-       const byte *getPalette() const { return _palette; }<br>
-       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
-<br>
-       struct PixMap {<br>
-               uint32 baseAddr;<br>
-               uint16 rowBytes;<br>
-               Common::Rect bounds;<br>
-               uint16 pmVersion;<br>
-               uint16 packType;<br>
-               uint32 packSize;<br>
-               uint32 hRes;<br>
-               uint32 vRes;<br>
-               uint16 pixelType;<br>
-               uint16 pixelSize;<br>
-               uint16 cmpCount;<br>
-               uint16 cmpSize;<br>
-               uint32 planeBytes;<br>
-               uint32 pmTable;<br>
-               uint32 pmReserved;<br>
-       };<br>
-<br>
-       static PixMap readPixMap(Common::SeekableReadStream &stream, bool hasBaseAddr = true);<br>
-<br>
-private:<br>
-       Common::Rect _imageRect;<br>
-       byte _palette[256 * 3];<br>
-       uint16 _paletteColorCount;<br>
-       Graphics::Surface *_outputSurface;<br>
-       bool _continueParsing;<br>
-<br>
-       // Utility Functions<br>
-       void unpackBitsRect(Common::SeekableReadStream &stream, bool withPalette);<br>
-       void unpackBitsLine(byte *out, uint32 length, Common::SeekableReadStream *stream, byte bitsPerPixel, byte bytesPerPixel);<br>
-       void skipBitsRect(Common::SeekableReadStream &stream, bool withPalette);<br>
-       void decodeCompressedQuickTime(Common::SeekableReadStream &stream);<br>
-       void outputPixelBuffer(byte *&out, byte value, byte bitsPerPixel);<br>
-<br>
-       // Opcodes<br>
-       typedef void (PICTDecoder::*OpcodeProcPICT)(Common::SeekableReadStream &stream);<br>
-       struct PICTOpcode {<br>
-               PICTOpcode() { op = 0; proc = 0; desc = 0; }<br>
-               PICTOpcode(uint16 o, OpcodeProcPICT p, const char *d) { op = o; proc = p; desc = d; }<br>
-               uint16 op;<br>
-               OpcodeProcPICT proc;<br>
-               const char *desc;<br>
-       };<br>
-       Common::Array<PICTOpcode> _opcodes;<br>
-<br>
-       // Common Opcodes<br>
-       void setupOpcodesCommon();<br>
-       DECLARE_OPCODE(o_nop);<br>
-       DECLARE_OPCODE(o_clip);<br>
-       DECLARE_OPCODE(o_txFont);<br>
-       DECLARE_OPCODE(o_txFace);<br>
-       DECLARE_OPCODE(o_pnSize);<br>
-       DECLARE_OPCODE(o_txSize);<br>
-       DECLARE_OPCODE(o_txRatio);<br>
-       DECLARE_OPCODE(o_versionOp);<br>
-       DECLARE_OPCODE(o_longText);<br>
-       DECLARE_OPCODE(o_longComment);<br>
-       DECLARE_OPCODE(o_opEndPic);<br>
-       DECLARE_OPCODE(o_headerOp);<br>
-<br>
-       // Regular-mode Opcodes<br>
-       void setupOpcodesNormal();<br>
-       DECLARE_OPCODE(on_packBitsRect);<br>
-       DECLARE_OPCODE(on_directBitsRect);<br>
-       DECLARE_OPCODE(on_compressedQuickTime);<br>
-<br>
-       // QuickTime-mode Opcodes<br>
-       void setupOpcodesQuickTime();<br>
-       DECLARE_OPCODE(oq_packBitsRect);<br>
-       DECLARE_OPCODE(oq_directBitsRect);<br>
-       DECLARE_OPCODE(oq_compressedQuickTime);<br>
-};<br>
-<br>
-#undef DECLARE_OPCODE<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif<br>
diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp<br>
deleted file mode 100644<br>
index 2282ea2..0000000<br>
--- a/graphics/decoders/png.cpp<br>
+++ /dev/null<br>
@@ -1,245 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-// Since we need to work with libpng here, we need to allow all symbols<br>
-// to avoid compilation issues.<br>
-#define FORBIDDEN_SYMBOL_ALLOW_ALL<br>
-#include "common/scummsys.h"<br>
-<br>
-#ifdef USE_PNG<br>
-#include <png.h><br>
-#endif<br>
-<br>
-#include "graphics/decoders/png.h"<br>
-<br>
-#include "graphics/pixelformat.h"<br>
-#include "graphics/surface.h"<br>
-<br>
-#include "common/stream.h"<br>
-<br>
-namespace Graphics {<br>
-<br>
-PNGDecoder::PNGDecoder() : _outputSurface(0), _palette(0), _paletteColorCount(0), _stream(0) {<br>
-}<br>
-<br>
-PNGDecoder::~PNGDecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-void PNGDecoder::destroy() {<br>
-       if (_outputSurface) {<br>
-               _outputSurface->free();<br>
-               delete _outputSurface;<br>
-               _outputSurface = 0;<br>
-       }<br>
-       delete[] _palette;<br>
-       _palette = NULL;<br>
-}<br>
-<br>
-#ifdef USE_PNG<br>
-// libpng-error-handling:<br>
-void pngError(png_structp pngptr, png_const_charp errorMsg) {<br>
-       error("%s", errorMsg);<br>
-}<br>
-<br>
-void pngWarning(png_structp pngptr, png_const_charp warningMsg) {<br>
-       warning("%s", warningMsg);<br>
-}<br>
-<br>
-// libpng-I/O-helper:<br>
-void pngReadFromStream(png_structp pngPtr, png_bytep data, png_size_t length) {<br>
-       void *readIOptr = png_get_io_ptr(pngPtr);<br>
-       Common::SeekableReadStream *stream = (Common::SeekableReadStream *)readIOptr;<br>
-       stream->read(data, length);<br>
-}<br>
-#endif<br>
-<br>
-/*<br>
- * This code is based on Broken Sword 2.5 engine<br>
- *<br>
- * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer<br>
- *<br>
- * Licensed under GNU GPL v2<br>
- *<br>
- */<br>
-<br>
-bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
-#ifdef USE_PNG<br>
-       destroy();<br>
-<br>
-       _stream = &stream;<br>
-<br>
-       // First, check the PNG signature<br>
-       if (_stream->readUint32BE() != MKTAG(0x89, 'P', 'N', 'G')) {<br>
-               delete _stream;<br>
-               return false;<br>
-       }<br>
-       if (_stream->readUint32BE() != MKTAG(0x0d, 0x0a, 0x1a, 0x0a)) {<br>
-               delete _stream;<br>
-               return false;<br>
-       }<br>
-<br>
-       // The following is based on the guide provided in:<br>
-       //<a href="http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-3" target="_blank">http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-3</a><br>
-       //<a href="http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf" target="_blank">http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf</a><br>
-       // along with the png-loading code used in the sword25-engine.<br>
-       png_structp pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);<br>
-       if (!pngPtr) {<br>
-               delete _stream;<br>
-               return false;<br>
-       }<br>
-       png_infop infoPtr = png_create_info_struct(pngPtr);<br>
-       if (!infoPtr) {<br>
-               png_destroy_read_struct(&pngPtr, NULL, NULL);<br>
-               delete _stream;<br>
-               return false;<br>
-       }<br>
-       png_infop endInfo = png_create_info_struct(pngPtr);<br>
-       if (!endInfo) {<br>
-               png_destroy_read_struct(&pngPtr, &infoPtr, NULL);<br>
-               delete _stream;<br>
-               return false;<br>
-       }<br>
-<br>
-       png_set_error_fn(pngPtr, NULL, pngError, pngWarning);<br>
-       // TODO: The manual says errors should be handled via setjmp<br>
-<br>
-       png_set_read_fn(pngPtr, _stream, pngReadFromStream);<br>
-       png_set_crc_action(pngPtr, PNG_CRC_DEFAULT, PNG_CRC_WARN_USE);<br>
-       // We already verified the PNG-header<br>
-       png_set_sig_bytes(pngPtr, 8);<br>
-<br>
-       // Read PNG header<br>
-       png_read_info(pngPtr, infoPtr);<br>
-<br>
-       // No handling for unknown chunks yet.<br>
-       int bitDepth, colorType, width, height, interlaceType;<br>
-       png_uint_32 w, h;<br>
-       png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, &interlaceType, NULL, NULL);<br>
-       width = w;<br>
-       height = h;<br>
-<br>
-       // Allocate memory for the final image data.<br>
-       // To keep memory framentation low this happens before allocating memory for temporary image data.<br>
-       _outputSurface = new Graphics::Surface();<br>
-<br>
-       // Images of all color formats except PNG_COLOR_TYPE_PALETTE<br>
-       // will be transformed into ARGB images<br>
-       if (colorType == PNG_COLOR_TYPE_PALETTE && !png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS)) {<br>
-               int numPalette = 0;<br>
-               png_colorp palette = NULL;<br>
-               uint32 success = png_get_PLTE(pngPtr, infoPtr, &palette, &numPalette);<br>
-               if (success != PNG_INFO_PLTE) {<br>
-                       png_destroy_read_struct(&pngPtr, &infoPtr, NULL);<br>
-                       return false;<br>
-               }<br>
-               _paletteColorCount = numPalette;<br>
-               _palette = new byte[_paletteColorCount * 3];<br>
-               for (int i = 0; i < _paletteColorCount; i++) {<br>
-                       _palette[(i * 3)] = palette[i].red;<br>
-                       _palette[(i * 3) + 1] = palette[i].green;<br>
-                       _palette[(i * 3) + 2] = palette[i].blue;<br>
-<br>
-               }<br>
-               _outputSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
-               png_set_packing(pngPtr);<br>
-       } else {<br>
-               bool isAlpha = (colorType & PNG_COLOR_MASK_ALPHA);<br>
-               if (png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS)) {<br>
-                       isAlpha = true;<br>
-                       png_set_expand(pngPtr);<br>
-               }<br>
-               _outputSurface->create(width, height, Graphics::PixelFormat(4,<br>
-                                      8, 8, 8, isAlpha ? 8 : 0, 24, 16, 8, 0));<br>
-               if (!_outputSurface->getPixels()) {<br>
-                       error("Could not allocate memory for output image.");<br>
-               }<br>
-               if (bitDepth == 16)<br>
-                       png_set_strip_16(pngPtr);<br>
-               if (bitDepth < 8)<br>
-                       png_set_expand(pngPtr);<br>
-               if (colorType == PNG_COLOR_TYPE_GRAY ||<br>
-                       colorType == PNG_COLOR_TYPE_GRAY_ALPHA)<br>
-                       png_set_gray_to_rgb(pngPtr);<br>
-<br>
-               // PNGs are Big-Endian:<br>
-#ifdef SCUMM_LITTLE_ENDIAN<br>
-               png_set_bgr(pngPtr);<br>
-               png_set_swap_alpha(pngPtr);<br>
-               if (colorType != PNG_COLOR_TYPE_RGB_ALPHA)<br>
-                       png_set_filler(pngPtr, 0xff, PNG_FILLER_BEFORE);<br>
-#else<br>
-               if (colorType != PNG_COLOR_TYPE_RGB_ALPHA)<br>
-                       png_set_filler(pngPtr, 0xff, PNG_FILLER_AFTER);<br>
-#endif<br>
-<br>
-       }<br>
-<br>
-       // After the transformations have been registered, the image data is read again.<br>
-       png_set_interlace_handling(pngPtr);<br>
-       png_read_update_info(pngPtr, infoPtr);<br>
-       png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL);<br>
-       width = w;<br>
-       height = h;<br>
-<br>
-       if (interlaceType == PNG_INTERLACE_NONE) {<br>
-               // PNGs without interlacing can simply be read row by row.<br>
-               for (int i = 0; i < height; i++) {<br>
-                       png_read_row(pngPtr, (png_bytep)_outputSurface->getBasePtr(0, i), NULL);<br>
-               }<br>
-       } else {<br>
-               // PNGs with interlacing require us to allocate an auxillary<br>
-               // buffer with pointers to all row starts.<br>
-<br>
-               // Allocate row pointer buffer<br>
-               png_bytep *rowPtr = new png_bytep[height];<br>
-               if (!rowPtr) {<br>
-                       error("Could not allocate memory for row pointers.");<br>
-               }<br>
-<br>
-               // Initialize row pointers<br>
-               for (int i = 0; i < height; i++)<br>
-                       rowPtr[i] = (png_bytep)_outputSurface->getBasePtr(0, i);<br>
-<br>
-               // Read image data<br>
-               png_read_image(pngPtr, rowPtr);<br>
-<br>
-               // Free row pointer buffer<br>
-               delete[] rowPtr;<br>
-       }<br>
-<br>
-       // Read additional data at the end.<br>
-       png_read_end(pngPtr, NULL);<br>
-<br>
-       // Destroy libpng structures<br>
-       png_destroy_read_struct(&pngPtr, &infoPtr, &endInfo);<br>
-<br>
-       // We no longer need the file stream, thus close it here<br>
-       _stream = 0;<br>
-<br>
-       return true;<br>
-#else<br>
-       return false;<br>
-#endif<br>
-}<br>
-<br>
-} // End of Graphics namespace<br>
diff --git a/graphics/decoders/png.h b/graphics/decoders/png.h<br>
deleted file mode 100644<br>
index d47d362..0000000<br>
--- a/graphics/decoders/png.h<br>
+++ /dev/null<br>
@@ -1,67 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/*<br>
- * PNG decoder used in engines:<br>
- *  - sword25<br>
- *  - wintermute<br>
- * Dependencies:<br>
- *  - libpng<br>
- */<br>
-<br>
-#ifndef GRAPHICS_PNG_H<br>
-#define GRAPHICS_PNG_H<br>
-<br>
-#include "common/scummsys.h"<br>
-#include "common/textconsole.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-struct Surface;<br>
-struct PixelFormat;<br>
-<br>
-class PNGDecoder : public ImageDecoder {<br>
-public:<br>
-       PNGDecoder();<br>
-       ~PNGDecoder();<br>
-<br>
-       bool loadStream(Common::SeekableReadStream &stream);<br>
-       void destroy();<br>
-       const Graphics::Surface *getSurface() const { return _outputSurface; }<br>
-       const byte *getPalette() const { return _palette; }<br>
-       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
-private:<br>
-       Common::SeekableReadStream *_stream;<br>
-       byte *_palette;<br>
-       uint16 _paletteColorCount;<br>
-<br>
-       Graphics::Surface *_outputSurface;<br>
-};<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif // GRAPHICS_PNG_H<br>
diff --git a/graphics/decoders/tga.cpp b/graphics/decoders/tga.cpp<br>
deleted file mode 100644<br>
index a342d0a..0000000<br>
--- a/graphics/decoders/tga.cpp<br>
+++ /dev/null<br>
@@ -1,430 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/* Based on code from xoreos <a href="https://github.com/DrMcCoy/xoreos/" target="_blank">https://github.com/DrMcCoy/xoreos/</a><br>
- * relicensed under GPLv2+ with permission from DrMcCoy and clone2727<br>
- */<br>
-<br>
-#include "common/util.h"<br>
-#include "common/stream.h"<br>
-#include "common/textconsole.h"<br>
-#include "common/error.h"<br>
-<br>
-#include "graphics/decoders/tga.h"<br>
-<br>
-namespace Graphics {<br>
-<br>
-TGADecoder::TGADecoder() {<br>
-       _colorMapSize = 0;<br>
-       _colorMapOrigin = 0;<br>
-       _colorMapLength = 0;<br>
-       _colorMapEntryLength = 0;<br>
-       _colorMap = NULL;<br>
-}<br>
-<br>
-TGADecoder::~TGADecoder() {<br>
-       destroy();<br>
-}<br>
-<br>
-void TGADecoder::destroy() {<br>
-       _surface.free();<br>
-       delete[] _colorMap;<br>
-}<br>
-<br>
-bool TGADecoder::loadStream(Common::SeekableReadStream &tga) {<br>
-       destroy();<br>
-<br>
-       byte imageType, pixelDepth;<br>
-       bool success;<br>
-       success = readHeader(tga, imageType, pixelDepth);<br>
-       if (success) {<br>
-               switch (imageType) {<br>
-               case TYPE_BW:<br>
-               case TYPE_TRUECOLOR:<br>
-                       success = readData(tga, imageType, pixelDepth);<br>
-                       break;<br>
-               case TYPE_RLE_BW:<br>
-               case TYPE_RLE_TRUECOLOR:<br>
-               case TYPE_RLE_CMAP:<br>
-                       success = readDataRLE(tga, imageType, pixelDepth);<br>
-                       break;<br>
-               case TYPE_CMAP:<br>
-                       success = readDataColorMapped(tga, imageType, pixelDepth);<br>
-                       break;<br>
-               default:<br>
-                       success = false;<br>
-                       break;<br>
-               }<br>
-       }<br>
-       if (tga.err() || !success) {<br>
-               warning("Failed reading TGA-file");<br>
-               return false;<br>
-       }<br>
-       return success;<br>
-}<br>
-<br>
-bool TGADecoder::readHeader(Common::SeekableReadStream &tga, byte &imageType, byte &pixelDepth) {<br>
-       if (!tga.seek(0)) {<br>
-               warning("Failed reading TGA-file");<br>
-               return false;<br>
-       }<br>
-<br>
-       // TGAs have an optional "id" string in the header<br>
-       uint32 idLength = tga.readByte();<br>
-<br>
-       // Number of colors in the color map / palette<br>
-       int hasColorMap = tga.readByte();<br>
-<br>
-       // Image type. See header for numeric constants<br>
-       imageType = tga.readByte();<br>
-<br>
-       switch (imageType) {<br>
-       case TYPE_CMAP:<br>
-       case TYPE_TRUECOLOR:<br>
-       case TYPE_BW:<br>
-       case TYPE_RLE_CMAP:<br>
-       case TYPE_RLE_TRUECOLOR:<br>
-       case TYPE_RLE_BW:<br>
-               break;<br>
-       default:<br>
-               warning("Unsupported image type: %d", imageType);<br>
-               return false;<br>
-       }<br>
-<br>
-       // Color map specifications<br>
-       if (hasColorMap == 0) {<br>
-               tga.skip(5);<br>
-       } else {<br>
-               _colorMapOrigin = tga.readUint16LE();<br>
-               _colorMapLength = tga.readUint16LE();<br>
-               _colorMapEntryLength = tga.readByte();<br>
-       }<br>
-       // Origin-defintions<br>
-       tga.skip(2 + 2);<br>
-<br>
-       // Image dimensions<br>
-       _surface.w = tga.readUint16LE();<br>
-       _surface.h = tga.readUint16LE();<br>
-<br>
-       // Bits per pixel<br>
-       pixelDepth = tga.readByte();<br>
-       _surface.format.bytesPerPixel = pixelDepth / 8;<br>
-<br>
-       // Image descriptor<br>
-       byte imgDesc = tga.readByte();<br>
-       int attributeBits = imgDesc & 0x0F;<br>
-       assert((imgDesc & 0x10) == 0);<br>
-       _originTop = (imgDesc & 0x20);<br>
-<br>
-       // Interleaving is not handled at this point<br>
-       //int interleave = (imgDesc & 0xC);<br>
-       if (imageType == TYPE_CMAP || imageType == TYPE_RLE_CMAP) {<br>
-               if (pixelDepth == 8) {<br>
-                       _format = PixelFormat::createFormatCLUT8();<br>
-               } else {<br>
-                       warning("Unsupported index-depth: %d", pixelDepth);<br>
-                       return false;<br>
-               }<br>
-       } else if (imageType == TYPE_TRUECOLOR || imageType == TYPE_RLE_TRUECOLOR) {<br>
-               if (pixelDepth == 24) {<br>
-                       _format = PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0);<br>
-               } else if (pixelDepth == 32) {<br>
-                       // HACK: According to the spec, attributeBits should determine the amount<br>
-                       // of alpha-bits, however, as the game files that use this decoder seems<br>
-                       // to ignore that fact, we force the amount to 8 for 32bpp files for now.<br>
-                       _format = PixelFormat(4, 8, 8, 8, /* attributeBits */ 8, 16, 8, 0, 24);<br>
-               } else if (pixelDepth == 16 && imageType == TYPE_TRUECOLOR) {<br>
-                       // 16bpp TGA is ARGB1555<br>
-                       _format = PixelFormat(2, 5, 5, 5, attributeBits, 10, 5, 0, 15);<br>
-               } else {<br>
-                       warning("Unsupported pixel depth: %d, %d", imageType, pixelDepth);<br>
-                       return false;<br>
-               }<br>
-       } else if (imageType == TYPE_BW || TYPE_RLE_BW) {<br>
-               if (pixelDepth == 8) {<br>
-                       _format = PixelFormat(4, 8, 8, 8, 0, 16, 8, 0, 0);<br>
-               } else {<br>
-                       warning("Unsupported pixel depth: %d, %d", imageType, pixelDepth);<br>
-                       return false;<br>
-               }<br>
-<br>
-       } else {<br>
-               warning("Unsupported image type: %d", imageType);<br>
-               return false;<br>
-       }<br>
-<br>
-       // Skip the id string<br>
-       tga.skip(idLength);<br>
-<br>
-       if (hasColorMap) {<br>
-               return readColorMap(tga, imageType, pixelDepth);<br>
-       }<br>
-       return true;<br>
-}<br>
-<br>
-bool TGADecoder::readColorMap(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth) {<br>
-       _colorMap = new byte[3 * _colorMapLength];<br>
-       for (int i = 0; i < _colorMapLength * 3; i += 3) {<br>
-               byte r, g, b;<br>
-               if (_colorMapEntryLength == 32) {<br>
-                       byte a;<br>
-                       PixelFormat format(4, 8, 8, 8, 0, 16, 8, 0, 24);<br>
-                       uint32 color = tga.readUint32LE();<br>
-                       format.colorToARGB(color, a, r, g, b);<br>
-               } else if (_colorMapEntryLength == 24) {<br>
-                       r = tga.readByte();<br>
-                       g = tga.readByte();<br>
-                       b = tga.readByte();<br>
-               } else if (_colorMapEntryLength == 16) {<br>
-                       byte a;<br>
-                       PixelFormat format(2, 5, 5, 5, 0, 10, 5, 0, 15);<br>
-                       uint16 color = tga.readUint16LE();<br>
-                       format.colorToARGB(color, a, r, g, b);<br>
-               } else {<br>
-                       warning("Unsupported image type: %d", imageType);<br>
-                       r = g = b = 0;<br>
-               }<br>
-#ifdef SCUMM_LITTLE_ENDIAN<br>
-               _colorMap[i] = r;<br>
-               _colorMap[i + 1] = g;<br>
-               _colorMap[i + 2] = b;<br>
-#else<br>
-               _colorMap[i] = b;<br>
-               _colorMap[i + 1] = g;<br>
-               _colorMap[i + 2] = r;<br>
-#endif<br>
-       }<br>
-       return true;<br>
-}<br>
-<br>
-// Additional information found from <a href="http://paulbourke.net/dataformats/tga/" target="_blank">http://paulbourke.net/dataformats/tga/</a><br>
-// With some details from the link referenced in the header.<br>
-bool TGADecoder::readData(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth) {<br>
-       // TrueColor<br>
-       if (imageType == TYPE_TRUECOLOR) {<br>
-               _surface.create(_surface.w, _surface.h, _format);<br>
-<br>
-               if (pixelDepth == 16) {<br>
-                       for (int i = 0; i < _surface.h; i++) {<br>
-                               uint16 *dst;<br>
-                               if (!_originTop) {<br>
-                                       dst = (uint16 *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
-                               } else {<br>
-                                       dst = (uint16 *)_surface.getBasePtr(0, i);<br>
-                               }<br>
-                               for (int j = 0; j < _surface.w; j++) {<br>
-                                       *dst++ = tga.readUint16LE();<br>
-                               }<br>
-                       }<br>
-               } else if (pixelDepth == 32) {<br>
-                       for (int i = 0; i < _surface.h; i++) {<br>
-                               uint32 *dst;<br>
-                               if (!_originTop) {<br>
-                                       dst = (uint32 *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
-                               } else {<br>
-                                       dst = (uint32 *)_surface.getBasePtr(0, i);<br>
-                               }<br>
-                               for (int j = 0; j < _surface.w; j++) {<br>
-                                       *dst++ = tga.readUint32LE();<br>
-                               }<br>
-                       }<br>
-               } else if (pixelDepth == 24) {<br>
-                       for (int i = 0; i < _surface.h; i++) {<br>
-                               byte *dst;<br>
-                               if (!_originTop) {<br>
-                                       dst = (byte *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
-                               } else {<br>
-                                       dst = (byte *)_surface.getBasePtr(0, i);<br>
-                               }<br>
-                               for (int j = 0; j < _surface.w; j++) {<br>
-                                       byte r = tga.readByte();<br>
-                                       byte g = tga.readByte();<br>
-                                       byte b = tga.readByte();<br>
-#ifdef SCUMM_LITTLE_ENDIAN<br>
-                                       *dst++ = r;<br>
-                                       *dst++ = g;<br>
-                                       *dst++ = b;<br>
-#else<br>
-                                       *dst++ = b;<br>
-                                       *dst++ = g;<br>
-                                       *dst++ = r;<br>
-#endif<br>
-                               }<br>
-                       }<br>
-               }<br>
-               // Black/White<br>
-       } else if (imageType == TYPE_BW) {<br>
-               _surface.create(_surface.w, _surface.h, _format);<br>
-<br>
-               byte *data  = (byte *)_surface.getPixels();<br>
-               uint32 count = _surface.w * _surface.h;<br>
-<br>
-               while (count-- > 0) {<br>
-                       byte g = tga.readByte();<br>
-                       *data++ = g;<br>
-                       *data++ = g;<br>
-                       *data++ = g;<br>
-                       *data++ = g;<br>
-               }<br>
-       }<br>
-       return true;<br>
-}<br>
-<br>
-bool TGADecoder::readDataColorMapped(Common::SeekableReadStream &tga, byte imageType, byte indexDepth) {<br>
-       // Color-mapped<br>
-       if (imageType == TYPE_CMAP) {<br>
-               _surface.create(_surface.w, _surface.h, _format);<br>
-               if (indexDepth == 8) {<br>
-                       for (int i = 0; i < _surface.h; i++) {<br>
-                               byte *dst;<br>
-                               if (!_originTop) {<br>
-                                       dst = (byte *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
-                               } else {<br>
-                                       dst = (byte *)_surface.getBasePtr(0, i);<br>
-                               }<br>
-                               for (int j = 0; j < _surface.w; j++) {<br>
-                                       byte index = tga.readByte();<br>
-                                       *dst++ = index;<br>
-                               }<br>
-                       }<br>
-               } else if (indexDepth == 16) {<br>
-                       warning("16 bit indexes not supported");<br>
-                       return false;<br>
-               }<br>
-       } else {<br>
-               return false;<br>
-       }<br>
-       return true;<br>
-}<br>
-<br>
-bool TGADecoder::readDataRLE(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth) {<br>
-       // RLE-TrueColor / RLE-Black/White<br>
-       if (imageType == TYPE_RLE_TRUECOLOR || imageType == TYPE_RLE_BW || imageType == TYPE_RLE_CMAP) {<br>
-               _surface.create(_surface.w, _surface.h, _format);<br>
-               uint32 count = _surface.w * _surface.h;<br>
-               byte *data = (byte *)_surface.getPixels();<br>
-<br>
-               while (count > 0) {<br>
-                       uint32 header = tga.readByte();<br>
-                       byte type = (header & 0x80) >> 7;<br>
-                       uint32 rleCount = (header & 0x7F) + 1;<br>
-<br>
-                       // RLE-packet<br>
-                       if (type == 1) {<br>
-                               if (pixelDepth == 32 && imageType == TYPE_RLE_TRUECOLOR) {<br>
-                                       uint32 color = tga.readUint32LE();<br>
-                                       while (rleCount-- > 0) {<br>
-                                               *((uint32 *)data) = color;<br>
-                                               data += 4;<br>
-                                               count--;<br>
-                                       }<br>
-                               } else if (pixelDepth == 24 && imageType == TYPE_RLE_TRUECOLOR) {<br>
-                                       byte r = tga.readByte();<br>
-                                       byte g = tga.readByte();<br>
-                                       byte b = tga.readByte();<br>
-                                       while (rleCount-- > 0) {<br>
-#ifdef SCUMM_LITTLE_ENDIAN<br>
-                                               *data++ = r;<br>
-                                               *data++ = g;<br>
-                                               *data++ = b;<br>
-#else<br>
-                                               *data++ = b;<br>
-                                               *data++ = g;<br>
-                                               *data++ = r;<br>
-#endif<br>
-                                               count--;<br>
-                                       }<br>
-                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_BW) {<br>
-                                       byte color = tga.readByte();<br>
-                                       while (rleCount-- > 0) {<br>
-                                               *data++ = color;<br>
-                                               *data++ = color;<br>
-                                               *data++ = color;<br>
-                                               *data++ = color;<br>
-                                               count--;<br>
-                                       }<br>
-                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_CMAP) {<br>
-                                       byte index = tga.readByte();<br>
-                                       while (rleCount-- > 0) {<br>
-                                               *data++ = index;<br>
-                                               count--;<br>
-                                       }<br>
-                               } else {<br>
-                                       warning("Unhandled pixel-depth for image-type 10");<br>
-                                       return false;<br>
-                               }<br>
-                               // Raw-packet<br>
-                       } else if (type == 0) {<br>
-                               if (pixelDepth == 32 && imageType == TYPE_RLE_TRUECOLOR) {<br>
-                                       while (rleCount-- > 0) {<br>
-                                               uint32 color = tga.readUint32LE();<br>
-                                               *((uint32 *)data) = color;<br>
-                                               data += 4;<br>
-                                               count--;<br>
-                                       }<br>
-                               } else if (pixelDepth == 24 && imageType == TYPE_RLE_TRUECOLOR) {<br>
-                                       while (rleCount-- > 0) {<br>
-                                               byte r = tga.readByte();<br>
-                                               byte g = tga.readByte();<br>
-                                               byte b = tga.readByte();<br>
-#ifdef SCUMM_LITTLE_ENDIAN<br>
-                                               *data++ = r;<br>
-                                               *data++ = g;<br>
-                                               *data++ = b;<br>
-#else<br>
-                                               *data++ = b;<br>
-                                               *data++ = g;<br>
-                                               *data++ = r;<br>
-#endif<br>
-                                               count--;<br>
-                                       }<br>
-                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_BW) {<br>
-                                       while (rleCount-- > 0) {<br>
-                                               byte color = tga.readByte();<br>
-                                               *data++ = color;<br>
-                                               *data++ = color;<br>
-                                               *data++ = color;<br>
-                                               *data++ = color;<br>
-                                               count--;<br>
-                                       }<br>
-                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_CMAP) {<br>
-                                       while (rleCount-- > 0) {<br>
-                                               byte index = tga.readByte();<br>
-                                               *data++ = index;<br>
-                                               count--;<br>
-                                       }<br>
-                               } else {<br>
-                                       warning("Unhandled pixel-depth for image-type 10");<br>
-                                       return false;<br>
-                               }<br>
-                       } else {<br>
-                               warning("Unknown header for RLE-packet %d", type);<br>
-                               return false;<br>
-                       }<br>
-               }<br>
-       } else {<br>
-               return false;<br>
-       }<br>
-       return true;<br>
-}<br>
-<br>
-} // End of namespace Graphics<br>
diff --git a/graphics/decoders/tga.h b/graphics/decoders/tga.h<br>
deleted file mode 100644<br>
index a2949fb..0000000<br>
--- a/graphics/decoders/tga.h<br>
+++ /dev/null<br>
@@ -1,100 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-/* Based on code from eos <a href="https://github.com/DrMcCoy/xoreos/" target="_blank">https://github.com/DrMcCoy/xoreos/</a><br>
- * relicensed under GPLv2+ with permission from DrMcCoy and clone2727<br>
- */<br>
-<br>
-/*<br>
- * TGA decoder used in engines:<br>
- *  - wintermute<br>
- *  - zvision<br>
- */<br>
-<br>
-#ifndef GRAPHICS_DECODERS_TGA_H<br>
-#define GRAPHICS_DECODERS_TGA_H<br>
-<br>
-#include "graphics/surface.h"<br>
-#include "graphics/decoders/image_decoder.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-<br>
-/** TarGa image-decoder<br>
- * The following variations of TGA are supported:<br>
- * - Type 1 - Color-mapped images in 16/24/32 bpp with 8 bit indexes<br>
- * - Type 2 - 16/24/32 bpp Top AND Bottom origined.<br>
- * - Type 3 - Black/White images, 8bpp.<br>
- * - Type 9 - RLE-encoded color-mapped images. (8 bit indexes only)<br>
- * - Type 10 - RLE-encoded TrueColor, 24/32bpp.<br>
- * - Type 11 - RLE-encoded Black/White, 8bpp.<br>
- *<br>
- * No images are returned with a palette, instead they are converted<br>
- * to 16 bpp for Type 1, or 32 bpp for Black/White-images.<br>
- */<br>
-class TGADecoder : public ImageDecoder {<br>
-public:<br>
-       TGADecoder();<br>
-       virtual ~TGADecoder();<br>
-       virtual void destroy();<br>
-       virtual const Surface *getSurface() const { return &_surface; }<br>
-       virtual const byte *getPalette() const { return _colorMap; }<br>
-       virtual uint16 getPaletteColorCount() const { return _colorMapLength; }<br>
-       virtual bool loadStream(Common::SeekableReadStream &stream);<br>
-private:<br>
-       // Format-spec from:<br>
-       //<a href="http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html" target="_blank">http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html</a><br>
-       enum {<br>
-           TYPE_CMAP = 1,<br>
-           TYPE_TRUECOLOR = 2,<br>
-           TYPE_BW = 3,<br>
-           TYPE_RLE_CMAP = 9,<br>
-           TYPE_RLE_TRUECOLOR = 10,<br>
-           TYPE_RLE_BW = 11<br>
-       };<br>
-<br>
-       // Color-map:<br>
-       bool _colorMapSize;<br>
-       byte *_colorMap;<br>
-       int16 _colorMapOrigin;<br>
-       int16 _colorMapLength;<br>
-       byte _colorMapEntryLength;<br>
-<br>
-       // Origin may be at the top, or bottom<br>
-       bool _originTop;<br>
-<br>
-       PixelFormat _format;<br>
-       Surface _surface;<br>
-       // Loading helpers<br>
-       bool readHeader(Common::SeekableReadStream &tga, byte &imageType, byte &pixelDepth);<br>
-       bool readData(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);<br>
-       bool readDataColorMapped(Common::SeekableReadStream &tga, byte imageType, byte indexDepth);<br>
-       bool readDataRLE(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);<br>
-       bool readColorMap(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);<br>
-};<br>
-<br>
-} // End of namespace Graphics<br>
-<br>
-#endif // GRAPHICS_DECODERS_TGA_H<br>
diff --git a/graphics/<a href="http://module.mk" target="_blank">module.mk</a> b/graphics/<a href="http://module.mk" target="_blank">module.mk</a><br>
index 8b63435..5918775 100644<br>
--- a/graphics/<a href="http://module.mk" target="_blank">module.mk</a><br>
+++ b/graphics/<a href="http://module.mk" target="_blank">module.mk</a><br>
@@ -21,14 +21,7 @@ MODULE_OBJS := \<br>
        VectorRenderer.o \<br>
        VectorRendererSpec.o \<br>
        wincursor.o \<br>
-       yuv_to_rgb.o \<br>
-       decoders/bmp.o \<br>
-       decoders/iff.o \<br>
-       decoders/jpeg.o \<br>
-       decoders/pcx.o \<br>
-       decoders/pict.o \<br>
-       decoders/png.o \<br>
-       decoders/tga.o<br>
+       yuv_to_rgb.o<br>
<br>
 ifdef USE_SCALERS<br>
 MODULE_OBJS += \<br>
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp<br>
index 9fe482d..9e54597 100644<br>
--- a/gui/ThemeEngine.cpp<br>
+++ b/gui/ThemeEngine.cpp<br>
@@ -34,7 +34,8 @@<br>
 #include "graphics/VectorRenderer.h"<br>
 #include "graphics/fonts/bdf.h"<br>
 #include "graphics/fonts/ttf.h"<br>
-#include "graphics/decoders/bmp.h"<br>
+<br>
+#include "image/bmp.h"<br>
<br>
 #include "gui/widget.h"<br>
 #include "gui/ThemeEngine.h"<br>
@@ -638,7 +639,7 @@ bool ThemeEngine::addBitmap(const Common::String &filename) {<br>
                return true;<br>
<br>
        // If not, try to load the bitmap via the BitmapDecoder class.<br>
-       Graphics::BitmapDecoder bitmapDecoder;<br>
+       Image::BitmapDecoder bitmapDecoder;<br>
        const Graphics::Surface *srcSurface = 0;<br>
        Common::ArchiveMemberList members;<br>
        _themeFiles.listMatchingMembers(members, filename);<br>
diff --git a/image/bmp.cpp b/image/bmp.cpp<br>
new file mode 100644<br>
index 0000000..113e268<br>
--- /dev/null<br>
+++ b/image/bmp.cpp<br>
@@ -0,0 +1,183 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/bmp.h"<br>
+<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/pixelformat.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+namespace Image {<br>
+<br>
+BitmapDecoder::BitmapDecoder() {<br>
+       _surface = 0;<br>
+       _palette = 0;<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+BitmapDecoder::~BitmapDecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+void BitmapDecoder::destroy() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface; _surface = 0;<br>
+       }<br>
+<br>
+       delete[] _palette; _palette = 0;<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
+       destroy();<br>
+<br>
+       if (stream.readByte() != 'B')<br>
+               return false;<br>
+<br>
+       if (stream.readByte() != 'M')<br>
+               return false;<br>
+<br>
+       /* uint32 fileSize = */ stream.readUint32LE();<br>
+       /* uint16 res1 = */ stream.readUint16LE();<br>
+       /* uint16 res2 = */ stream.readUint16LE();<br>
+       uint32 imageOffset = stream.readUint32LE();<br>
+<br>
+       uint32 infoSize = stream.readUint32LE();<br>
+       if (infoSize != 40) {<br>
+               warning("Only Windows v3 bitmaps are supported");<br>
+               return false;<br>
+       }<br>
+<br>
+       uint32 width = stream.readUint32LE();<br>
+       int32 height = stream.readSint32LE();<br>
+<br>
+       if (width == 0 || height == 0)<br>
+               return false;<br>
+<br>
+       if (height < 0) {<br>
+               warning("Right-side up bitmaps not supported");<br>
+               return false;<br>
+       }<br>
+<br>
+       /* uint16 planes = */ stream.readUint16LE();<br>
+       uint16 bitsPerPixel = stream.readUint16LE();<br>
+<br>
+       if (bitsPerPixel != 8 && bitsPerPixel != 24 && bitsPerPixel != 32) {<br>
+               warning("%dbpp bitmaps not supported", bitsPerPixel);<br>
+               return false;<br>
+       }<br>
+<br>
+       uint32 compression = stream.readUint32LE();<br>
+<br>
+       if (compression != 0) {<br>
+               warning("Compressed bitmaps not supported");<br>
+               return false;<br>
+       }<br>
+<br>
+       /* uint32 imageSize = */ stream.readUint32LE();<br>
+       /* uint32 pixelsPerMeterX = */ stream.readUint32LE();<br>
+       /* uint32 pixelsPerMeterY = */ stream.readUint32LE();<br>
+       _paletteColorCount = stream.readUint32LE();<br>
+       /* uint32 colorsImportant = */ stream.readUint32LE();<br>
+<br>
+       if (bitsPerPixel == 8) {<br>
+               if (_paletteColorCount == 0)<br>
+                       _paletteColorCount = 256;<br>
+<br>
+               // Read the palette<br>
+               _palette = new byte[_paletteColorCount * 3];<br>
+               for (uint16 i = 0; i < _paletteColorCount; i++) {<br>
+                       _palette[i * 3 + 2] = stream.readByte();<br>
+                       _palette[i * 3 + 1] = stream.readByte();<br>
+                       _palette[i * 3 + 0] = stream.readByte();<br>
+                       stream.readByte();<br>
+               }<br>
+       }<br>
+<br>
+       // Start us at the beginning of the image<br>
+       stream.seek(imageOffset);<br>
+<br>
+       Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();<br>
+<br>
+       // BGRA for 24bpp and 32 bpp<br>
+       if (bitsPerPixel == 24 || bitsPerPixel == 32)<br>
+               format = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);<br>
+<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(width, height, format);<br>
+<br>
+       int srcPitch = width * (bitsPerPixel >> 3);<br>
+       const int extraDataLength = (srcPitch % 4) ? 4 - (srcPitch % 4) : 0;<br>
+<br>
+       if (bitsPerPixel == 8) {<br>
+               byte *dst = (byte *)_surface->getPixels();<br>
+<br>
+               for (int32 i = 0; i < height; i++) {<br>
+                       stream.read(dst + (height - i - 1) * width, width);<br>
+                       stream.skip(extraDataLength);<br>
+               }<br>
+       } else if (bitsPerPixel == 24) {<br>
+               byte *dst = (byte *)_surface->getBasePtr(0, height - 1);<br>
+<br>
+               for (int32 i = 0; i < height; i++) {<br>
+                       for (uint32 j = 0; j < width; j++) {<br>
+                               byte b = stream.readByte();<br>
+                               byte g = stream.readByte();<br>
+                               byte r = stream.readByte();<br>
+                               uint32 color = format.RGBToColor(r, g, b);<br>
+<br>
+                               *((uint32 *)dst) = color;<br>
+                               dst += format.bytesPerPixel;<br>
+                       }<br>
+<br>
+                       stream.skip(extraDataLength);<br>
+                       dst -= _surface->pitch * 2;<br>
+               }<br>
+       } else { // 32 bpp<br>
+               byte *dst = (byte *)_surface->getBasePtr(0, height - 1);<br>
+<br>
+               for (int32 i = 0; i < height; i++) {<br>
+                       for (uint32 j = 0; j < width; j++) {<br>
+                               byte b = stream.readByte();<br>
+                               byte g = stream.readByte();<br>
+                               byte r = stream.readByte();<br>
+                               // Ignore the last byte, as in v3 it is unused<br>
+                               // and should thus NOT be used as alpha.<br>
+                               // ref: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx</a><br>


+                               stream.readByte();<br>
+                               uint32 color = format.RGBToColor(r, g, b);<br>
+<br>
+                               *((uint32 *)dst) = color;<br>
+                               dst += format.bytesPerPixel;<br>
+                       }<br>
+<br>
+                       stream.skip(extraDataLength);<br>
+                       dst -= _surface->pitch * 2;<br>
+               }<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/bmp.h b/image/bmp.h<br>
new file mode 100644<br>
index 0000000..bc4cfc3<br>
--- /dev/null<br>
+++ b/image/bmp.h<br>
@@ -0,0 +1,68 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/**<br>
+ * @file<br>
+ * Image decoder used in engines:<br>
+ *  - hugo<br>
+ *  - mohawk<br>
+ *  - wintermute<br>
+ */<br>
+<br>
+#ifndef IMAGE_BMP_H<br>
+#define IMAGE_BMP_H<br>
+<br>
+#include "common/scummsys.h"<br>
+#include "common/str.h"<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+class BitmapDecoder : public ImageDecoder {<br>
+public:<br>
+       BitmapDecoder();<br>
+       virtual ~BitmapDecoder();<br>
+<br>
+       // ImageDecoder API<br>
+       void destroy();<br>
+       virtual bool loadStream(Common::SeekableReadStream &stream);<br>
+       virtual const Graphics::Surface *getSurface() const { return _surface; }<br>
+       const byte *getPalette() const { return _palette; }<br>
+       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+       byte *_palette;<br>
+       uint16 _paletteColorCount;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/iff.cpp b/image/iff.cpp<br>
new file mode 100644<br>
index 0000000..d93e9ff<br>
--- /dev/null<br>
+++ b/image/iff.cpp<br>
@@ -0,0 +1,244 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/iff.h"<br>
+<br>
+#include "common/iff_container.h"<br>
+#include "common/stream.h"<br>
+#include "common/util.h"<br>
+<br>
+namespace Image {<br>
+<br>
+IFFDecoder::IFFDecoder() {<br>
+       _surface = 0;<br>
+       _palette = 0;<br>
+<br>
+       // these 2 properties are not reset by destroy(), so the default is set here.<br>
+       _numRelevantPlanes = 8;<br>
+       _pixelPacking = false;<br>
+<br>
+       destroy();<br>
+}<br>
+<br>
+IFFDecoder::~IFFDecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+void IFFDecoder::destroy() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+               _surface = 0;<br>
+       }<br>
+<br>
+       if (_palette) {<br>
+               delete[] _palette;<br>
+               _palette = 0;<br>
+       }<br>
+<br>
+       memset(&_header, 0, sizeof(Header));<br>
+       _paletteRanges.clear();<br>
+       _type = TYPE_UNKNOWN;<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+bool IFFDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
+       destroy();<br>
+<br>
+       const uint32 form = stream.readUint32BE();<br>
+<br>
+       if (form != ID_FORM) {<br>
+               warning("Failed reading IFF-file");<br>
+               return false;<br>
+       }<br>
+<br>
+       stream.skip(4);<br>
+<br>
+       const uint32 type = stream.readUint32BE();<br>
+<br>
+       switch (type) {<br>
+               case ID_ILBM:<br>
+                       _type = TYPE_ILBM;<br>
+                       break;<br>
+               case ID_PBM:<br>
+                       _type = TYPE_PBM;<br>
+                       break;<br>
+       }<br>
+<br>
+       if (type == TYPE_UNKNOWN) {<br>
+               warning("Failed reading IFF-file");<br>
+               return false;<br>
+       }<br>
+<br>
+       while (1) {<br>
+               const uint32 chunkType = stream.readUint32BE();<br>
+               const uint32 chunkSize = stream.readUint32BE();<br>
+<br>
+               if (stream.eos())<br>
+                       break;<br>
+<br>
+               switch (chunkType) {<br>
+               case ID_BMHD:<br>
+                       loadHeader(stream);<br>
+                       break;<br>
+               case ID_CMAP:<br>
+                       loadPalette(stream, chunkSize);<br>
+                       break;<br>
+               case ID_CRNG:<br>
+                       loadPaletteRange(stream, chunkSize);<br>
+                       break;<br>
+               case ID_BODY:<br>
+                       loadBitmap(stream);<br>
+                       break;<br>
+               default:<br>
+                       stream.skip(chunkSize);<br>
+               }<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+void IFFDecoder::loadHeader(Common::SeekableReadStream &stream) {<br>
+       _header.width = stream.readUint16BE();<br>
+       _header.height = stream.readUint16BE();<br>
+       _header.x = stream.readUint16BE();<br>
+       _header.y = stream.readUint16BE();<br>
+       _header.numPlanes = stream.readByte();<br>
+       _header.masking = stream.readByte();<br>
+       _header.compression = stream.readByte();<br>
+       _header.flags = stream.readByte();<br>
+       _header.transparentColor = stream.readUint16BE();<br>
+       _header.xAspect = stream.readByte();<br>
+       _header.yAspect = stream.readByte();<br>
+       _header.pageWidth = stream.readUint16BE();<br>
+       _header.pageHeight = stream.readUint16BE();<br>
+<br>
+       assert(_header.width >= 1);<br>
+       assert(_header.height >= 1);<br>
+       assert(_header.numPlanes >= 1 && _header.numPlanes <= 8 && _header.numPlanes != 7);<br>
+}<br>
+<br>
+void IFFDecoder::loadPalette(Common::SeekableReadStream &stream, const uint32 size) {<br>
+       _palette = new byte[size];<br>
+       stream.read(_palette, size);<br>
+       _paletteColorCount = size / 3;<br>
+}<br>
+<br>
+void IFFDecoder::loadPaletteRange(Common::SeekableReadStream &stream, const uint32 size) {<br>
+       PaletteRange range;<br>
+<br>
+       range.timer = stream.readSint16BE();<br>
+       range.step = stream.readSint16BE();<br>
+       range.flags = stream.readSint16BE();<br>
+       range.first = stream.readByte();<br>
+       range.last = stream.readByte();<br>
+<br>
+       _paletteRanges.push_back(range);<br>
+}<br>
+<br>
+void IFFDecoder::loadBitmap(Common::SeekableReadStream &stream) {<br>
+       _numRelevantPlanes = MIN(_numRelevantPlanes, _header.numPlanes);<br>
+<br>
+       if (_numRelevantPlanes != 1 && _numRelevantPlanes != 2 && _numRelevantPlanes != 4)<br>
+               _pixelPacking = false;<br>
+<br>
+       uint16 outPitch = _header.width;<br>
+<br>
+       if (_pixelPacking)<br>
+               outPitch /= (8 / _numRelevantPlanes);<br>
+<br>
+       // FIXME: CLUT8 is not a proper format for packed bitmaps but there is no way to tell it to use 1, 2 or 4 bits per pixel<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(outPitch, _header.height, Graphics::PixelFormat::createFormatCLUT8());<br>
+<br>
+       if (_type == TYPE_ILBM) {<br>
+               uint32 scanlinePitch = ((_header.width + 15) >> 4) << 1;<br>
+               byte *scanlines = new byte[scanlinePitch * _header.numPlanes];<br>
+               byte *data = (byte *)_surface->getPixels();<br>
+<br>
+               for (uint16 i = 0; i < _header.height; ++i) {<br>
+                       byte *scanline = scanlines;<br>
+<br>
+                       for (uint16 j = 0; j < _header.numPlanes; ++j) {<br>
+                               uint16 outSize = scanlinePitch;<br>
+<br>
+                               if (_header.compression) {<br>
+                                       Common::PackBitsReadStream packStream(stream);<br>
+                                       packStream.read(scanline, outSize);<br>
+                               } else {<br>
+                                       stream.read(scanline, outSize);<br>
+                               }<br>
+<br>
+                               scanline += outSize;<br>
+                       }<br>
+<br>
+                       packPixels(scanlines, data, scanlinePitch, outPitch);<br>
+                       data += outPitch;<br>
+               }<br>
+<br>
+               delete[] scanlines;<br>
+       } else if (_type == TYPE_PBM) {<br>
+               byte *data = (byte *)_surface->getPixels();<br>
+               uint32 outSize = _header.width * _header.height;<br>
+<br>
+               if (_header.compression) {<br>
+                       Common::PackBitsReadStream packStream(stream);<br>
+                       packStream.read(data, outSize);<br>
+               } else {<br>
+                       stream.read(data, outSize);<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+void IFFDecoder::packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch) {<br>
+       uint32 numPixels = _header.width;<br>
+<br>
+       if (_pixelPacking)<br>
+               numPixels = outPitch * (8 / _numRelevantPlanes);<br>
+<br>
+       for (uint32 x = 0; x < numPixels; ++x) {<br>
+               byte *scanline = scanlines;<br>
+               byte pixel = 0;<br>
+               byte offset = x >> 3;<br>
+               byte bit = 0x80 >> (x & 7);<br>
+<br>
+               // first build a pixel by scanning all the usable planes in the input<br>
+               for (uint32 plane = 0; plane < _numRelevantPlanes; ++plane) {<br>
+                       if (scanline[offset] & bit)<br>
+                               pixel |= (1 << plane);<br>
+<br>
+                       scanline += scanlinePitch;<br>
+               }<br>
+<br>
+               // then output the pixel according to the requested packing<br>
+               if (!_pixelPacking)<br>
+                       data[x] = pixel;<br>
+               else if (_numRelevantPlanes == 1)<br>
+                       data[x / 8] |= (pixel << (x & 7));<br>
+               else if (_numRelevantPlanes == 2)<br>
+                       data[x / 4] |= (pixel << ((x & 3) << 1));<br>
+               else if (_numRelevantPlanes == 4)<br>
+                       data[x / 2] |= (pixel << ((x & 1) << 2));<br>
+       }<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/iff.h b/image/iff.h<br>
new file mode 100644<br>
index 0000000..3d342b3<br>
--- /dev/null<br>
+++ b/image/iff.h<br>
@@ -0,0 +1,126 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/**<br>
+ * @file<br>
+ * Image decoder used in engines:<br>
+ *  - gob<br>
+ *  - parallaction<br>
+ *  - queen<br>
+ *  - saga<br>
+ */<br>
+<br>
+#ifndef IMAGE_IFF_H<br>
+#define IMAGE_IFF_H<br>
+<br>
+#include "common/array.h"<br>
+#include "common/endian.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+class IFFDecoder : public ImageDecoder {<br>
+public:<br>
+       struct Header {<br>
+               uint16 width, height;<br>
+               uint16 x, y;<br>
+               byte numPlanes;<br>
+               byte masking;<br>
+               byte compression;<br>
+               byte flags;<br>
+               uint16 transparentColor;<br>
+               byte xAspect, yAspect;<br>
+               uint16 pageWidth, pageHeight;<br>
+       };<br>
+<br>
+       struct PaletteRange {<br>
+               int16  timer, step, flags;<br>
+               byte first, last;<br>
+       };<br>
+<br>
+       enum Type {<br>
+               TYPE_UNKNOWN = 0,<br>
+               TYPE_ILBM,<br>
+               TYPE_PBM<br>
+       };<br>
+<br>
+       IFFDecoder();<br>
+       virtual ~IFFDecoder();<br>
+<br>
+       // ImageDecoder API<br>
+       void destroy();<br>
+       bool loadStream(Common::SeekableReadStream &stream);<br>
+       const Header *getHeader() const { return &_header; }<br>
+       const Graphics::Surface *getSurface() const { return _surface; }<br>
+       const byte *getPalette() const { return _palette; }<br>
+       const Common::Array<PaletteRange> &getPaletteRanges() const { return _paletteRanges; }<br>
+       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
+<br>
+       /**<br>
+       * The number of planes to decode, also determines the pixel packing if _packPixels is true.<br>
+       * 8 == decode all planes, map 1 pixel in 1 byte. (default, no packing even if _packPixels is true)<br>
+       *<br>
+       * NOTE: this property must be reset manually, and is not reset by a call to destroy().<br>
+       */<br>
+       void setNumRelevantPlanes(const uint8 numRelevantPlanes) { _numRelevantPlanes = numRelevantPlanes; }<br>
+<br>
+       /**<br>
+       * Enables pixel packing, the amount of packing is determined by _numRelevantPlanes<br>
+       * 1 == decode first plane, pack 8 pixels in 1 byte. This makes _surface->w 1/8th of _header.width<br>
+       * 2 == decode first 2 planes, pack 4 pixels in 1 byte. This makes _surface->w 1/4th of _header.width<br>
+       * 4 == decode first 4 planes, pack 2 pixels in 1 byte. This makes _surface->w half of _header.width<br>
+       * Packed bitmaps won't have a proper surface format since there is no way to tell it to use 1, 2 or 4 bits per pixel<br>
+       *<br>
+       * NOTE: this property must be reset manually, and is not reset by a call to destroy().<br>
+       */<br>
+       void setPixelPacking(const bool pixelPacking) { _pixelPacking = pixelPacking; }<br>
+private:<br>
+<br>
+       Header _header;<br>
+       Graphics::Surface *_surface;<br>
+       byte *_palette;<br>
+       Common::Array<PaletteRange> _paletteRanges;<br>
+       Type _type;<br>
+       uint16 _paletteColorCount;<br>
+       uint8 _numRelevantPlanes;<br>
+       bool _pixelPacking;<br>
+<br>
+       void loadHeader(Common::SeekableReadStream &stream);<br>
+       void loadPalette(Common::SeekableReadStream &stream, const uint32 size);<br>
+       void loadPaletteRange(Common::SeekableReadStream &stream, const uint32 size);<br>
+       void loadBitmap(Common::SeekableReadStream &stream);<br>
+       void packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/image_decoder.h b/image/image_decoder.h<br>
new file mode 100644<br>
index 0000000..08fa4d8<br>
--- /dev/null<br>
+++ b/image/image_decoder.h<br>
@@ -0,0 +1,106 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_IMAGEDECODER_H<br>
+#define IMAGE_IMAGEDECODER_H<br>
+<br>
+#include "common/scummsys.h"<br>
+#include "common/str.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * A representation of an image decoder that maintains ownership of the surface<br>
+ * and palette it decodes to.<br>
+ */<br>
+class ImageDecoder {<br>
+public:<br>
+       virtual ~ImageDecoder() {}<br>
+<br>
+       /**<br>
+        * Load an image from the specified stream<br>
+        *<br>
+        * loadStream() should implicitly call destroy() to free the memory<br>
+        * of the last loadStream() call.<br>
+        *<br>
+        * @param stream the input stream<br>
+        * @return whether loading the file succeeded<br>
+        * @see getSurface<br>
+        * @see getPalette<br>
+        */<br>
+       virtual bool loadStream(Common::SeekableReadStream &stream) = 0;<br>
+<br>
+       /**<br>
+        * Destroy this decoder's surface and palette<br>
+        *<br>
+        * This should be called by a loadStream() implementation as well<br>
+        * as the destructor.<br>
+        */<br>
+       virtual void destroy() = 0;<br>
+<br>
+       /**<br>
+        * Get the decoded surface<br>
+        *<br>
+        * This surface is owned by this ImageDecoder and will remain valid<br>
+        * until destroy() or loadStream() is called, or until this ImageDecoder's<br>
+        * destructor is called.<br>
+        *<br>
+        * @return the decoded surface, or 0 if no surface is present<br>
+        */<br>
+       virtual const Graphics::Surface *getSurface() const = 0;<br>
+<br>
+       /**<br>
+        * Get the decoded palette<br>
+        *<br>
+        * This palette is owned by this ImageDecoder and will remain valid<br>
+        * until destroy() or loadStream() is called, or until this ImageDecoder's<br>
+        * destructor is called.<br>
+        *<br>
+        * The palette's format is the same as PaletteManager's palette<br>
+        * (interleaved RGB values).<br>
+        *<br>
+        * @return the decoded palette, or undefined if no palette is present<br>
+        */<br>
+       virtual const byte *getPalette() const { return 0; }<br>
+<br>
+       /**<br>
+        * Query if the decoded image has a palette.<br>
+        */<br>
+       virtual bool hasPalette() const { return getPaletteColorCount() != 0; }<br>
+<br>
+       /** Return the starting index of the palette. */<br>
+       virtual byte getPaletteStartIndex() const { return 0; }<br>
+       /** Return the number of colors in the palette. */<br>
+       virtual uint16 getPaletteColorCount() const { return 0; }<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/jpeg.cpp b/image/jpeg.cpp<br>
new file mode 100644<br>
index 0000000..9d4b0a7<br>
--- /dev/null<br>
+++ b/image/jpeg.cpp<br>
@@ -0,0 +1,266 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// libjpeg uses forbidden symbols in its header. Thus, we need to allow them<br>
+// here.<br>
+#define FORBIDDEN_SYMBOL_ALLOW_ALL<br>
+<br>
+#include "image/jpeg.h"<br>
+<br>
+#include "common/debug.h"<br>
+#include "common/endian.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/pixelformat.h"<br>
+<br>
+#ifdef USE_JPEG<br>
+// The original release of libjpeg v6b did not contain any extern "C" in case<br>
+// its header files are included in a C++ environment. To avoid any linking<br>
+// issues we need to add it on our own.<br>
+extern "C" {<br>
+#include <jpeglib.h><br>
+#include <jerror.h><br>
+}<br>
+#endif<br>
+<br>
+namespace Image {<br>
+<br>
+JPEGDecoder::JPEGDecoder() : ImageDecoder(), _surface(), _colorSpace(kColorSpaceRGBA) {<br>
+}<br>
+<br>
+JPEGDecoder::~JPEGDecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+const Graphics::Surface *JPEGDecoder::getSurface() const {<br>
+       return &_surface;<br>
+}<br>
+<br>
+void JPEGDecoder::destroy() {<br>
+       _surface.free();<br>
+}<br>
+<br>
+#ifdef USE_JPEG<br>
+namespace {<br>
+<br>
+#define JPEG_BUFFER_SIZE 4096<br>
+<br>
+struct StreamSource : public jpeg_source_mgr {<br>
+       Common::SeekableReadStream *stream;<br>
+       bool startOfFile;<br>
+       JOCTET buffer[JPEG_BUFFER_SIZE];<br>
+};<br>
+<br>
+void initSource(j_decompress_ptr cinfo) {<br>
+       StreamSource *source = (StreamSource *)cinfo->src;<br>
+       source->startOfFile = true;<br>
+}<br>
+<br>
+boolean fillInputBuffer(j_decompress_ptr cinfo) {<br>
+       StreamSource *source = (StreamSource *)cinfo->src;<br>
+<br>
+       uint32 bufferSize = source->stream->read((byte *)source->buffer, sizeof(source->buffer));<br>
+       if (bufferSize == 0) {<br>
+               if (source->startOfFile) {<br>
+                       // An empty file is a fatal error<br>
+                       ERREXIT(cinfo, JERR_INPUT_EMPTY);<br>
+               } else {<br>
+                       // Otherwise we insert an EOF marker<br>
+                       WARNMS(cinfo, JWRN_JPEG_EOF);<br>
+                       source->buffer[0] = (JOCTET)0xFF;<br>
+                       source->buffer[1] = (JOCTET)JPEG_EOI;<br>
+                       bufferSize = 2;<br>
+               }<br>
+       }<br>
+<br>
+       source->next_input_byte = source->buffer;<br>
+       source->bytes_in_buffer = bufferSize;<br>
+       source->startOfFile = false;<br>
+<br>
+       return TRUE;<br>
+}<br>
+<br>
+void skipInputData(j_decompress_ptr cinfo, long numBytes) {<br>
+       StreamSource *source = (StreamSource *)cinfo->src;<br>
+<br>
+       if (numBytes > 0) {<br>
+               if (numBytes > (long)source->bytes_in_buffer) {<br>
+                       // In case we need to skip more bytes than there are in the buffer<br>
+                       // we will skip the remaining data and fill the buffer again<br>
+                       numBytes -= (long)source->bytes_in_buffer;<br>
+<br>
+                       // Skip the remaining bytes<br>
+                       source->stream->skip(numBytes);<br>
+<br>
+                       // Fill up the buffer again<br>
+                       (*source->fill_input_buffer)(cinfo);<br>
+               } else {<br>
+                       source->next_input_byte += (size_t)numBytes;<br>
+                       source->bytes_in_buffer -= (size_t)numBytes;<br>
+               }<br>
+<br>
+       }<br>
+}<br>
+<br>
+void termSource(j_decompress_ptr cinfo) {<br>
+}<br>
+<br>
+void jpeg_scummvm_src(j_decompress_ptr cinfo, Common::SeekableReadStream *stream) {<br>
+       StreamSource *source;<br>
+<br>
+       // Initialize the source in case it has not been done yet.<br>
+       if (cinfo->src == NULL) {<br>
+               cinfo->src = (jpeg_source_mgr *)(*cinfo->mem->alloc_small)((j_common_ptr)cinfo, JPOOL_PERMANENT, sizeof(StreamSource));<br>
+       }<br>
+<br>
+       source = (StreamSource *)cinfo->src;<br>
+       source->init_source       = &initSource;<br>
+       source->fill_input_buffer = &fillInputBuffer;<br>
+       source->skip_input_data   = &skipInputData;<br>
+       source->resync_to_restart = &jpeg_resync_to_restart;<br>
+       source->term_source       = &termSource;<br>
+       source->bytes_in_buffer   = 0;<br>
+       source->next_input_byte   = NULL;<br>
+<br>
+       source->stream = stream;<br>
+}<br>
+<br>
+void errorExit(j_common_ptr cinfo) {<br>
+       char buffer[JMSG_LENGTH_MAX];<br>
+       (*cinfo->err->format_message)(cinfo, buffer);<br>
+       // This function is not allowed to return to the caller, thus we simply<br>
+       // error out with our error handling here.<br>
+       error("%s", buffer);<br>
+}<br>
+<br>
+void outputMessage(j_common_ptr cinfo) {<br>
+       char buffer[JMSG_LENGTH_MAX];<br>
+       (*cinfo->err->format_message)(cinfo, buffer);<br>
+       // Is using debug here a good idea? Or do we want to ignore all libjpeg<br>
+       // messages?<br>
+       debug(3, "libjpeg: %s", buffer);<br>
+}<br>
+<br>
+} // End of anonymous namespace<br>
+#endif<br>
+<br>
+bool JPEGDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
+#ifdef USE_JPEG<br>
+       // Reset member variables from previous decodings<br>
+       destroy();<br>
+<br>
+       jpeg_decompress_struct cinfo;<br>
+       jpeg_error_mgr jerr;<br>
+<br>
+       // Initialize error handling callbacks<br>
+       cinfo.err = jpeg_std_error(&jerr);<br>
+       cinfo.err->error_exit = &errorExit;<br>
+       cinfo.err->output_message = &outputMessage;<br>
+<br>
+       // Initialize the decompression structure<br>
+       jpeg_create_decompress(&cinfo);<br>
+<br>
+       // Initialize our buffer handling<br>
+       jpeg_scummvm_src(&cinfo, &stream);<br>
+<br>
+       // Read the file header<br>
+       jpeg_read_header(&cinfo, TRUE);<br>
+<br>
+       // We can request YUV output because Groovie requires it<br>
+       switch (_colorSpace) {<br>
+       case kColorSpaceRGBA:<br>
+               cinfo.out_color_space = JCS_RGB;<br>
+               break;<br>
+<br>
+       case kColorSpaceYUV:<br>
+               cinfo.out_color_space = JCS_YCbCr;<br>
+               break;<br>
+       }<br>
+<br>
+       // Actually start decompressing the image<br>
+       jpeg_start_decompress(&cinfo);<br>
+<br>
+       // Allocate buffers for the output data<br>
+       switch (_colorSpace) {<br>
+       case kColorSpaceRGBA:<br>
+               // We use RGBA8888 in this scenario<br>
+               _surface.create(cinfo.output_width, cinfo.output_height, Graphics::PixelFormat(4, 8, 8, 8, 0, 24, 16, 8, 0));<br>
+               break;<br>
+<br>
+       case kColorSpaceYUV:<br>
+               // We use YUV with 3 bytes per pixel otherwise.<br>
+               // This is pretty ugly since our PixelFormat cannot express YUV...<br>
+               _surface.create(cinfo.output_width, cinfo.output_height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));<br>
+               break;<br>
+       }<br>
+<br>
+       // Allocate buffer for one scanline<br>
+       assert(cinfo.output_components == 3);<br>
+       JDIMENSION pitch = cinfo.output_width * cinfo.output_components;<br>
+       assert(_surface.pitch >= pitch);<br>
+       JSAMPARRAY buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo, JPOOL_IMAGE, pitch, 1);<br>
+<br>
+       // Go through the image data scanline by scanline<br>
+       while (cinfo.output_scanline < cinfo.output_height) {<br>
+               byte *dst = (byte *)_surface.getBasePtr(0, cinfo.output_scanline);<br>
+<br>
+               jpeg_read_scanlines(&cinfo, buffer, 1);<br>
+<br>
+               const byte *src = buffer[0];<br>
+               switch (_colorSpace) {<br>
+               case kColorSpaceRGBA: {<br>
+                       for (int remaining = cinfo.output_width; remaining > 0; --remaining) {<br>
+                               byte r = *src++;<br>
+                               byte g = *src++;<br>
+                               byte b = *src++;<br>
+                               // We need to insert a alpha value of 255 (opaque) here.<br>
+#ifdef SCUMM_BIG_ENDIAN<br>
+                               *dst++ = r;<br>
+                               *dst++ = g;<br>
+                               *dst++ = b;<br>
+                               *dst++ = 0xFF;<br>
+#else<br>
+                               *dst++ = 0xFF;<br>
+                               *dst++ = b;<br>
+                               *dst++ = g;<br>
+                               *dst++ = r;<br>
+#endif<br>
+                       }<br>
+                       } break;<br>
+<br>
+               case kColorSpaceYUV:<br>
+                       memcpy(dst, src, pitch);<br>
+                       break;<br>
+               }<br>
+       }<br>
+<br>
+       // We are done with decompressing, thus free all the data<br>
+       jpeg_finish_decompress(&cinfo);<br>
+       jpeg_destroy_decompress(&cinfo);<br>
+<br>
+       return true;<br>
+#else<br>
+       return false;<br>
+#endif<br>
+}<br>
+<br>
+} // End of Graphics namespace<br>
diff --git a/image/jpeg.h b/image/jpeg.h<br>
new file mode 100644<br>
index 0000000..f578170<br>
--- /dev/null<br>
+++ b/image/jpeg.h<br>
@@ -0,0 +1,95 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/**<br>
+ * @file<br>
+ * Image decoder used in engines:<br>
+ *  - groovie<br>
+ *  - mohawk<br>
+ *  - wintermute<br>
+ */<br>
+<br>
+#ifndef IMAGE_JPEG_H<br>
+#define IMAGE_JPEG_H<br>
+<br>
+#include "graphics/surface.h"<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+class JPEGDecoder : public ImageDecoder {<br>
+public:<br>
+       JPEGDecoder();<br>
+       ~JPEGDecoder();<br>
+<br>
+       // ImageDecoder API<br>
+       virtual void destroy();<br>
+       virtual bool loadStream(Common::SeekableReadStream &str);<br>
+       virtual const Graphics::Surface *getSurface() const;<br>
+<br>
+       // Special API for JPEG<br>
+       enum ColorSpace {<br>
+               /**<br>
+                * Output 32bit RGBA data.<br>
+                *<br>
+                * This is the default output.<br>
+                */<br>
+               kColorSpaceRGBA,<br>
+<br>
+               /**<br>
+                * Output (interleaved) YUV data.<br>
+                *<br>
+                * Be aware that some images cannot be output in YUV mode.<br>
+                * These are (non-standard) JPEG images which are in RGB colorspace.<br>
+                *<br>
+                * The resulting Surface will have a PixelFormat with 3 bytes per<br>
+                * pixel and the remaining entries are completely zeroed. This works<br>
+                * around the fact that PixelFormat can only describe RGB formats.<br>
+                *<br>
+                * You should only use this when you are really aware of what you are<br>
+                * doing!<br>
+                */<br>
+               kColorSpaceYUV<br>
+       };<br>
+<br>
+       /**<br>
+        * Request the output color space. This can be used to obtain raw YUV<br>
+        * data from the JPEG file. But this might not work for all files!<br>
+        *<br>
+        * The decoder itself defaults to RGBA.<br>
+        *<br>
+        * @param outSpace The color space to output.<br>
+        */<br>
+       void setOutputColorSpace(ColorSpace outSpace) { _colorSpace = outSpace; }<br>
+<br>
+private:<br>
+       Graphics::Surface _surface;<br>
+       ColorSpace _colorSpace;<br>
+};<br>
+<br>
+} // End of Graphics namespace<br>
+<br>
+#endif // GRAPHICS_JPEG_H<br>
diff --git a/image/<a href="http://module.mk" target="_blank">module.mk</a> b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
new file mode 100644<br>
index 0000000..22febe1<br>
--- /dev/null<br>
+++ b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
@@ -0,0 +1,13 @@<br>
+MODULE := image<br>
+<br>
+MODULE_OBJS := \<br>
+       bmp.o \<br>
+       iff.o \<br>
+       jpeg.o \<br>
+       pcx.o \<br>
+       pict.o \<br>
+       png.o \<br>
+       tga.o<br>
+<br>
+# Include common rules<br>
+include $(srcdir)/<a href="http://rules.mk" target="_blank">rules.mk</a><br>
diff --git a/image/pcx.cpp b/image/pcx.cpp<br>
new file mode 100644<br>
index 0000000..282a6c6<br>
--- /dev/null<br>
+++ b/image/pcx.cpp<br>
@@ -0,0 +1,214 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/pcx.h"<br>
+<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/pixelformat.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+/**<br>
+ * Based on the PCX specs:<br>
+ * <a href="http://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm" target="_blank">http://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm</a><br>
+ * and the PCX decoder of FFmpeg (libavcodec/pcx.c):<br>
+ * <a href="http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pcx.c" target="_blank">http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pcx.c</a><br>
+ */<br>
+<br>
+namespace Image {<br>
+<br>
+PCXDecoder::PCXDecoder() {<br>
+       _surface = 0;<br>
+       _palette = 0;<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+PCXDecoder::~PCXDecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+void PCXDecoder::destroy() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+               _surface = 0;<br>
+       }<br>
+<br>
+       delete[] _palette;<br>
+       _palette = 0;<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
+       destroy();<br>
+<br>
+       if (stream.readByte() != 0x0a)  // ZSoft PCX<br>
+               return false;<br>
+<br>
+       byte version = stream.readByte();       // 0 - 5<br>
+       if (version > 5)<br>
+               return false;<br>
+<br>
+       bool compressed = stream.readByte(); // encoding, 1 = run length encoding<br>
+       byte bitsPerPixel = stream.readByte();  // 1, 2, 4 or 8<br>
+<br>
+       // Window<br>
+       uint16 xMin = stream.readUint16LE();<br>
+       uint16 yMin = stream.readUint16LE();<br>
+       uint16 xMax = stream.readUint16LE();<br>
+       uint16 yMax = stream.readUint16LE();<br>
+<br>
+       uint16 width  = xMax - xMin + 1;<br>
+       uint16 height = yMax - yMin + 1;<br>
+<br>
+       if (xMax < xMin || yMax < yMin) {<br>
+               warning("Invalid PCX image dimensions");<br>
+               return false;<br>
+       }<br>
+<br>
+       stream.skip(4); // HDpi, VDpi<br>
+<br>
+       // Read the EGA palette (colormap)<br>
+       _palette = new byte[16 * 3];<br>
+       for (uint16 i = 0; i < 16; i++) {<br>
+               _palette[i * 3 + 0] = stream.readByte();<br>
+               _palette[i * 3 + 1] = stream.readByte();<br>
+               _palette[i * 3 + 2] = stream.readByte();<br>
+       }<br>
+<br>
+       if (stream.readByte() != 0)     // reserved, should be set to 0<br>
+               return false;<br>
+<br>
+       byte nPlanes = stream.readByte();<br>
+       uint16 bytesPerLine = stream.readUint16LE();<br>
+       uint16 bytesPerscanLine = nPlanes * bytesPerLine;<br>
+<br>
+       if (bytesPerscanLine < width * bitsPerPixel * nPlanes / 8) {<br>
+               warning("PCX data is corrupted");<br>
+               return false;<br>
+       }<br>
+<br>
+       stream.skip(60);        // PaletteInfo, HscreenSize, VscreenSize, Filler<br>
+<br>
+       _surface = new Graphics::Surface();<br>
+<br>
+       byte *scanLine = new byte[bytesPerscanLine];<br>
+       byte *dst;<br>
+       int x, y;<br>
+<br>
+       if (nPlanes == 3 && bitsPerPixel == 8) {        // 24bpp<br>
+               Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);<br>
+               _surface->create(width, height, format);<br>
+               dst = (byte *)_surface->getPixels();<br>
+               _paletteColorCount = 0;<br>
+<br>
+               for (y = 0; y < height; y++) {<br>
+                       decodeRLE(stream, scanLine, bytesPerscanLine, compressed);<br>
+<br>
+                       for (x = 0; x < width; x++) {<br>
+                               byte b = scanLine[x];<br>
+                               byte g = scanLine[x +  bytesPerLine];<br>
+                               byte r = scanLine[x + (bytesPerLine << 1)];<br>
+                               uint32 color = format.RGBToColor(r, g, b);<br>
+<br>
+                               *((uint32 *)dst) = color;<br>
+                               dst += format.bytesPerPixel;<br>
+                       }<br>
+               }<br>
+       } else if (nPlanes == 1 && bitsPerPixel == 8) { // 8bpp indexed<br>
+               _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+               dst = (byte *)_surface->getPixels();<br>
+               _paletteColorCount = 16;<br>
+<br>
+               for (y = 0; y < height; y++, dst += _surface->pitch) {<br>
+                       decodeRLE(stream, scanLine, bytesPerscanLine, compressed);<br>
+                       memcpy(dst, scanLine, width);<br>
+               }<br>
+<br>
+               if (version == 5) {<br>
+                       if (stream.readByte() != 12) {<br>
+                               warning("Expected a palette after the PCX image data");<br>
+                               delete[] scanLine;<br>
+                               return false;<br>
+                       }<br>
+<br>
+                       // Read the VGA palette<br>
+                       delete[] _palette;<br>
+                       _palette = new byte[256 * 3];<br>
+                       for (uint16 i = 0; i < 256; i++) {<br>
+                               _palette[i * 3 + 0] = stream.readByte();<br>
+                               _palette[i * 3 + 1] = stream.readByte();<br>
+                               _palette[i * 3 + 2] = stream.readByte();<br>
+                       }<br>
+<br>
+                       _paletteColorCount = 256;<br>
+               }<br>
+       } else if ((nPlanes == 2 || nPlanes == 3 || nPlanes == 4) && bitsPerPixel == 1) {       // planar, 4, 8 or 16 colors<br>
+               _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+               dst = (byte *)_surface->getPixels();<br>
+               _paletteColorCount = 16;<br>
+<br>
+               for (y = 0; y < height; y++, dst += _surface->pitch) {<br>
+                       decodeRLE(stream, scanLine, bytesPerscanLine, compressed);<br>
+<br>
+                       for (x = 0; x < width; x++) {<br>
+                               int m = 0x80 >> (x & 7), v = 0;<br>
+                               for (int i = nPlanes - 1; i >= 0; i--) {<br>
+                                       v <<= 1;<br>
+                                       v  += (scanLine[i * bytesPerLine + (x >> 3)] & m) == 0 ? 0 : 1;<br>
+                               }<br>
+                               dst[x] = v;<br>
+                       }<br>
+               }<br>
+       } else {<br>
+               // Known unsupported case: 1 plane and bpp < 8 (1, 2 or 4)<br>
+               warning("Invalid PCX file (%d planes, %d bpp)", nPlanes, bitsPerPixel);<br>
+               delete[] scanLine;<br>
+               return false;<br>
+       }<br>
+<br>
+       delete[] scanLine;<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+void PCXDecoder::decodeRLE(Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerscanLine, bool compressed) {<br>
+       uint32 i = 0;<br>
+       byte run, value;<br>
+<br>
+       if (compressed) {<br>
+               while (i < bytesPerscanLine) {<br>
+                       run = 1;<br>
+                       value = stream.readByte();<br>
+                       if (value >= 0xc0) {<br>
+                               run = value & 0x3f;<br>
+                               value = stream.readByte();<br>
+                       }<br>
+                       while (i < bytesPerscanLine && run--)<br>
+                               dst[i++] = value;<br>
+               }<br>
+       } else {<br>
+               stream.read(dst, bytesPerscanLine);<br>
+       }<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/pcx.h b/image/pcx.h<br>
new file mode 100644<br>
index 0000000..ce30ab5<br>
--- /dev/null<br>
+++ b/image/pcx.h<br>
@@ -0,0 +1,66 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/**<br>
+ * PCX decoder used in engines:<br>
+ *  - dreamweb<br>
+ *  - hugo<br>
+ *  - queen<br>
+ *  - tucker<br>
+ */<br>
+<br>
+#ifndef IMAGE_PCX_H<br>
+#define IMAGE_PCX_H<br>
+<br>
+#include "common/scummsys.h"<br>
+#include "common/str.h"<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common{<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+class PCXDecoder : public ImageDecoder {<br>
+public:<br>
+       PCXDecoder();<br>
+       virtual ~PCXDecoder();<br>
+<br>
+       // ImageDecoder API<br>
+       void destroy();<br>
+       virtual bool loadStream(Common::SeekableReadStream &stream);<br>
+       virtual const Graphics::Surface *getSurface() const { return _surface; }<br>
+       const byte *getPalette() const { return _palette; }<br>
+       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
+<br>
+private:<br>
+       void decodeRLE(Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerScanline, bool compressed);<br>
+<br>
+       Graphics::Surface *_surface;<br>
+       byte *_palette;<br>
+       uint16 _paletteColorCount;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/pict.cpp b/image/pict.cpp<br>
new file mode 100644<br>
index 0000000..07e657f<br>
--- /dev/null<br>
+++ b/image/pict.cpp<br>
@@ -0,0 +1,580 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/jpeg.h"<br>
+#include "image/pict.h"<br>
+<br>
+#include "common/debug.h"<br>
+#include "common/endian.h"<br>
+#include "common/stream.h"<br>
+#include "common/substream.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+namespace Image {<br>
+<br>
+// The PICT code is based off of the QuickDraw specs:<br>
+// <a href="http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-461.html" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-461.html</a><br>


+// <a href="http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-269.html" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-269.html</a><br>


+<br>
+PICTDecoder::PICTDecoder() {<br>
+       _outputSurface = 0;<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+PICTDecoder::~PICTDecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+void PICTDecoder::destroy() {<br>
+       if (_outputSurface) {<br>
+               _outputSurface->free();<br>
+               delete _outputSurface;<br>
+               _outputSurface = 0;<br>
+       }<br>
+<br>
+       _paletteColorCount = 0;<br>
+}<br>
+<br>
+#define OPCODE(a, b, c) _opcodes.push_back(PICTOpcode(a, &PICTDecoder::b, c))<br>
+<br>
+void PICTDecoder::setupOpcodesCommon() {<br>
+       OPCODE(0x0000, o_nop, "NOP");<br>
+       OPCODE(0x0001, o_clip, "Clip");<br>
+       OPCODE(0x0003, o_txFont, "TxFont");<br>
+       OPCODE(0x0004, o_txFace, "TxFace");<br>
+       OPCODE(0x0007, o_pnSize, "PnSize");<br>
+       OPCODE(0x000D, o_txSize, "TxSize");<br>
+       OPCODE(0x0010, o_txRatio, "TxRatio");<br>
+       OPCODE(0x0011, o_versionOp, "VersionOp");<br>
+       OPCODE(0x001E, o_nop, "DefHilite");<br>
+       OPCODE(0x0028, o_longText, "LongText");<br>
+       OPCODE(0x00A1, o_longComment, "LongComment");<br>
+       OPCODE(0x00FF, o_opEndPic, "OpEndPic");<br>
+       OPCODE(0x0C00, o_headerOp, "HeaderOp");<br>
+}<br>
+<br>
+void PICTDecoder::setupOpcodesNormal() {<br>
+       setupOpcodesCommon();<br>
+       OPCODE(0x0098, on_packBitsRect, "PackBitsRect");<br>
+       OPCODE(0x009A, on_directBitsRect, "DirectBitsRect");<br>
+       OPCODE(0x8200, on_compressedQuickTime, "CompressedQuickTime");<br>
+}<br>
+<br>
+void PICTDecoder::setupOpcodesQuickTime() {<br>
+       setupOpcodesCommon();<br>
+       OPCODE(0x0098, oq_packBitsRect, "PackBitsRect");<br>
+       OPCODE(0x009A, oq_directBitsRect, "DirectBitsRect");<br>
+       OPCODE(0x8200, oq_compressedQuickTime, "CompressedQuickTime");<br>
+}<br>
+<br>
+#undef OPCODE<br>
+<br>
+void PICTDecoder::o_nop(Common::SeekableReadStream &) {<br>
+       // Nothing to do<br>
+}<br>
+<br>
+void PICTDecoder::o_clip(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.skip(stream.readUint16BE() - 2);<br>
+}<br>
+<br>
+void PICTDecoder::o_txFont(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readUint16BE();<br>
+}<br>
+<br>
+void PICTDecoder::o_txFace(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readByte();<br>
+}<br>
+<br>
+void PICTDecoder::o_pnSize(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readUint16BE();<br>
+       stream.readUint16BE();<br>
+}<br>
+<br>
+void PICTDecoder::o_txSize(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readUint16BE();<br>
+}<br>
+<br>
+void PICTDecoder::o_txRatio(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readUint16BE();<br>
+       stream.readUint16BE();<br>
+       stream.readUint16BE();<br>
+       stream.readUint16BE();<br>
+}<br>
+<br>
+void PICTDecoder::o_versionOp(Common::SeekableReadStream &stream) {<br>
+       // We only support v2 extended<br>
+       if (stream.readUint16BE() != 0x02FF)<br>
+               error("Unknown PICT version");<br>
+}<br>
+<br>
+void PICTDecoder::o_longText(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readUint16BE();<br>
+       stream.readUint16BE();<br>
+       stream.skip(stream.readByte());<br>
+}<br>
+<br>
+void PICTDecoder::o_longComment(Common::SeekableReadStream &stream) {<br>
+       // Ignore<br>
+       stream.readUint16BE();<br>
+       stream.skip(stream.readUint16BE());<br>
+}<br>
+<br>
+void PICTDecoder::o_opEndPic(Common::SeekableReadStream &stream) {<br>
+       // We've reached the end of the picture<br>
+       _continueParsing = false;<br>
+}<br>
+<br>
+void PICTDecoder::o_headerOp(Common::SeekableReadStream &stream) {<br>
+       // Read the basic header, but we don't really have to do anything with it<br>
+       /* uint16 version = */ stream.readUint16BE();<br>
+       stream.readUint16BE(); // Reserved<br>
+       /* uint32 hRes = */ stream.readUint32BE();<br>
+       /* uint32 vRes = */ stream.readUint32BE();<br>
+       Common::Rect origResRect;<br>
+       origResRect.top = stream.readUint16BE();<br>
+       origResRect.left = stream.readUint16BE();<br>
+       origResRect.bottom = stream.readUint16BE();<br>
+       origResRect.right = stream.readUint16BE();<br>
+       stream.readUint32BE(); // Reserved<br>
+}<br>
+<br>
+void PICTDecoder::on_packBitsRect(Common::SeekableReadStream &stream) {<br>
+       // Unpack data (8bpp or lower)<br>
+       unpackBitsRect(stream, true);<br>
+}<br>
+<br>
+void PICTDecoder::on_directBitsRect(Common::SeekableReadStream &stream) {<br>
+       // Unpack data (16bpp or higher)<br>
+       unpackBitsRect(stream, false);<br>
+}<br>
+<br>
+void PICTDecoder::on_compressedQuickTime(Common::SeekableReadStream &stream) {<br>
+       // OK, here's the fun. We get to completely change how QuickDraw draws<br>
+       // the data in PICT files.<br>
+<br>
+       // Swap out the opcodes to the new ones<br>
+       _opcodes.clear();<br>
+       setupOpcodesQuickTime();<br>
+<br>
+       // We'll decode the first QuickTime data from here, but the QuickTime-specific<br>
+       // opcodes will take over from here on out. Normal opcodes, signing off.<br>
+       decodeCompressedQuickTime(stream);<br>
+}<br>
+<br>
+void PICTDecoder::oq_packBitsRect(Common::SeekableReadStream &stream) {<br>
+       // Skip any data here (8bpp or lower)<br>
+       skipBitsRect(stream, true);<br>
+}<br>
+<br>
+void PICTDecoder::oq_directBitsRect(Common::SeekableReadStream &stream) {<br>
+       // Skip any data here (16bpp or higher)<br>
+       skipBitsRect(stream, false);<br>
+}<br>
+<br>
+void PICTDecoder::oq_compressedQuickTime(Common::SeekableReadStream &stream) {<br>
+       // Just pass the data along<br>
+       decodeCompressedQuickTime(stream);<br>
+}<br>
+<br>
+bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
+       destroy();<br>
+<br>
+       // Initialize opcodes to their normal state<br>
+       _opcodes.clear();<br>
+       setupOpcodesNormal();<br>
+<br>
+       _continueParsing = true;<br>
+       memset(_palette, 0, sizeof(_palette));<br>
+<br>
+       uint16 fileSize = stream.readUint16BE();<br>
+<br>
+       // If we have no file size here, we probably have a PICT from a file<br>
+       // and not a resource. The other two bytes are the fileSize which we<br>
+       // don't actually need (and already read if from a resource).<br>
+       if (!fileSize)<br>
+               stream.seek(512 + 2);<br>
+<br>
+       _imageRect.top = stream.readUint16BE();<br>
+       _imageRect.left = stream.readUint16BE();<br>
+       _imageRect.bottom = stream.readUint16BE();<br>
+       _imageRect.right = stream.readUint16BE();<br>
+       _imageRect.debugPrint(0, "PICT Rect:");<br>
+<br>
+       // NOTE: This is only a subset of the full PICT format.<br>
+       //     - Only V2 (Extended) Images Supported<br>
+       //     - CompressedQuickTime (JPEG) compressed data is supported<br>
+       //     - DirectBitsRect/PackBitsRect compressed data is supported<br>
+       for (uint32 opNum = 0; !stream.eos() && !stream.err() && stream.pos() < stream.size() && _continueParsing; opNum++) {<br>
+               // PICT v2 opcodes are two bytes<br>
+               uint16 opcode = stream.readUint16BE();<br>
+<br>
+               if (opNum == 0 && opcode != 0x0011) {<br>
+                       warning("Cannot find PICT version opcode");<br>
+                       return false;<br>
+               } else if (opNum == 1 && opcode != 0x0C00) {<br>
+                       warning("Cannot find PICT header opcode");<br>
+                       return false;<br>
+               }<br>
+<br>
+               // Since opcodes are word-aligned, we need to mark our starting<br>
+               // position here.<br>
+               uint32 startPos = stream.pos();<br>
+<br>
+               for (uint32 i = 0; i < _opcodes.size(); i++) {<br>
+                       if (_opcodes[i].op == opcode) {<br>
+                               debug(4, "Running PICT opcode %04x '%s'", opcode, _opcodes[i].desc);<br>
+                               (this->*(_opcodes[i].proc))(stream);<br>
+                               break;<br>
+                       } else if (i == _opcodes.size() - 1) {<br>
+                               // Unknown opcode; attempt to continue forward<br>
+                               warning("Unknown PICT opcode %04x", opcode);<br>
+                       }<br>
+               }<br>
+<br>
+               // Align<br>
+               stream.skip((stream.pos() - startPos) & 1);<br>
+       }<br>
+<br>
+       return _outputSurface;<br>
+}<br>
+<br>
+PICTDecoder::PixMap PICTDecoder::readPixMap(Common::SeekableReadStream &stream, bool hasBaseAddr) {<br>
+       PixMap pixMap;<br>
+       pixMap.baseAddr = hasBaseAddr ? stream.readUint32BE() : 0;<br>
+       pixMap.rowBytes = stream.readUint16BE() & 0x3fff;<br>
+       pixMap.bounds.top = stream.readUint16BE();<br>
+       pixMap.bounds.left = stream.readUint16BE();<br>
+       pixMap.bounds.bottom = stream.readUint16BE();<br>
+       pixMap.bounds.right = stream.readUint16BE();<br>
+       pixMap.pmVersion = stream.readUint16BE();<br>
+       pixMap.packType = stream.readUint16BE();<br>
+       pixMap.packSize = stream.readUint32BE();<br>
+       pixMap.hRes = stream.readUint32BE();<br>
+       pixMap.vRes = stream.readUint32BE();<br>
+       pixMap.pixelType = stream.readUint16BE();<br>
+       pixMap.pixelSize = stream.readUint16BE();<br>
+       pixMap.cmpCount = stream.readUint16BE();<br>
+       pixMap.cmpSize = stream.readUint16BE();<br>
+       pixMap.planeBytes = stream.readUint32BE();<br>
+       pixMap.pmTable = stream.readUint32BE();<br>
+       pixMap.pmReserved = stream.readUint32BE();<br>
+       return pixMap;<br>
+}<br>
+<br>
+struct PackBitsRectData {<br>
+       PICTDecoder::PixMap pixMap;<br>
+       Common::Rect srcRect;<br>
+       Common::Rect dstRect;<br>
+       uint16 mode;<br>
+};<br>
+<br>
+void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool withPalette) {<br>
+       PackBitsRectData packBitsData;<br>
+       packBitsData.pixMap = readPixMap(stream, !withPalette);<br>
+<br>
+       // Read in the palette if there is one present<br>
+       if (withPalette) {<br>
+               // See <a href="http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-267.html" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-267.html</a><br>


+               stream.readUint32BE(); // seed<br>
+               stream.readUint16BE(); // flags<br>
+               _paletteColorCount = stream.readUint16BE() + 1;<br>
+<br>
+               for (uint32 i = 0; i < _paletteColorCount; i++) {<br>
+                       stream.readUint16BE();<br>
+                       _palette[i * 3] = stream.readUint16BE() >> 8;<br>
+                       _palette[i * 3 + 1] = stream.readUint16BE() >> 8;<br>
+                       _palette[i * 3 + 2] = stream.readUint16BE() >> 8;<br>
+               }<br>
+       }<br>
+<br>
+       packBitsData.srcRect.top = stream.readUint16BE();<br>
+       packBitsData.srcRect.left = stream.readUint16BE();<br>
+       packBitsData.srcRect.bottom = stream.readUint16BE();<br>
+       packBitsData.srcRect.right = stream.readUint16BE();<br>
+       packBitsData.dstRect.top = stream.readUint16BE();<br>
+       packBitsData.dstRect.left = stream.readUint16BE();<br>
+       packBitsData.dstRect.bottom = stream.readUint16BE();<br>
+       packBitsData.dstRect.right = stream.readUint16BE();<br>
+       packBitsData.mode = stream.readUint16BE();<br>
+<br>
+       uint16 width = packBitsData.srcRect.width();<br>
+       uint16 height = packBitsData.srcRect.height();<br>
+<br>
+       byte bytesPerPixel = 0;<br>
+<br>
+       if (packBitsData.pixMap.pixelSize <= 8)<br>
+               bytesPerPixel = 1;<br>
+       else if (packBitsData.pixMap.pixelSize == 32)<br>
+               bytesPerPixel = packBitsData.pixMap.cmpCount;<br>
+       else<br>
+               bytesPerPixel = packBitsData.pixMap.pixelSize / 8;<br>
+<br>
+       // Ensure we have enough space in the buffer to hold an entire line's worth of pixels<br>
+       uint32 lineSize = MAX<int>(width * bytesPerPixel + (8 * 2 / packBitsData.pixMap.pixelSize), packBitsData.pixMap.rowBytes);<br>
+       byte *buffer = new byte[lineSize * height];<br>
+<br>
+       // Read in amount of data per row<br>
+       for (uint16 i = 0; i < packBitsData.pixMap.bounds.height(); i++) {<br>
+               // NOTE: Compression 0 is "default". The format in SCI games is packed when 0.<br>
+               // In the future, we may need to have something to set the  "default" packing<br>
+               // format, but this is good for now.<br>
+<br>
+               if (packBitsData.pixMap.packType == 1 || packBitsData.pixMap.rowBytes < 8) { // Unpacked, Pad-Byte (on 24-bit)<br>
+                       // TODO: Finish this. Hasn't been needed (yet).<br>
+                       error("Unpacked DirectBitsRect data (padded)");<br>
+               } else if (packBitsData.pixMap.packType == 2) { // Unpacked, No Pad-Byte (on 24-bit)<br>
+                       // TODO: Finish this. Hasn't been needed (yet).<br>
+                       error("Unpacked DirectBitsRect data (not padded)");<br>
+               } else if (packBitsData.pixMap.packType == 0 || packBitsData.pixMap.packType > 2) { // Packed<br>
+                       uint16 byteCount = (packBitsData.pixMap.rowBytes > 250) ? stream.readUint16BE() : stream.readByte();<br>
+                       unpackBitsLine(buffer + i * width * bytesPerPixel, packBitsData.pixMap.rowBytes, stream.readStream(byteCount), packBitsData.pixMap.pixelSize, bytesPerPixel);<br>
+               }<br>
+       }<br>
+<br>
+       _outputSurface = new Graphics::Surface();<br>
+<br>
+       switch (bytesPerPixel) {<br>
+       case 1:<br>
+               // Just copy to the image<br>
+               _outputSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+               memcpy(_outputSurface->getPixels(), buffer, _outputSurface->w * _outputSurface->h);<br>
+               break;<br>
+       case 2:<br>
+               // We have a 16-bit surface<br>
+               _outputSurface->create(width, height, Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0));<br>
+               for (uint16 y = 0; y < _outputSurface->h; y++)<br>
+                       for (uint16 x = 0; x < _outputSurface->w; x++)<br>
+                               WRITE_UINT16(_outputSurface->getBasePtr(x, y), READ_UINT16(buffer + (y * _outputSurface->w + x) * 2));<br>
+               break;<br>
+       case 3:<br>
+               // We have a planar 24-bit surface<br>
+               _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));<br>
+               for (uint16 y = 0; y < _outputSurface->h; y++) {<br>
+                       for (uint16 x = 0; x < _outputSurface->w; x++) {<br>
+                               byte r = *(buffer + y * _outputSurface->w * 3 + x);<br>
+                               byte g = *(buffer + y * _outputSurface->w * 3 + _outputSurface->w + x);<br>
+                               byte b = *(buffer + y * _outputSurface->w * 3 + _outputSurface->w * 2 + x);<br>
+                               *((uint32 *)_outputSurface->getBasePtr(x, y)) = _outputSurface->format.RGBToColor(r, g, b);<br>
+                       }<br>
+               }<br>
+               break;<br>
+       case 4:<br>
+               // We have a planar 32-bit surface<br>
+               // Note that we ignore the alpha channel since it seems to not be correct<br>
+               // Mac OS X does not ignore it, but then displays it incorrectly. Photoshop<br>
+               // does ignore it and displays it correctly.<br>
+               _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));<br>
+               for (uint16 y = 0; y < _outputSurface->h; y++) {<br>
+                       for (uint16 x = 0; x < _outputSurface->w; x++) {<br>
+                               byte a = 0xFF;<br>
+                               byte r = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w + x);<br>
+                               byte g = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 2 + x);<br>
+                               byte b = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 3 + x);<br>
+                               *((uint32 *)_outputSurface->getBasePtr(x, y)) = _outputSurface->format.ARGBToColor(a, r, g, b);<br>
+                       }<br>
+               }<br>
+               break;<br>
+       }<br>
+<br>
+       delete[] buffer;<br>
+}<br>
+<br>
+void PICTDecoder::unpackBitsLine(byte *out, uint32 length, Common::SeekableReadStream *data, byte bitsPerPixel, byte bytesPerPixel) {<br>
+       uint32 dataDecoded = 0;<br>
+       byte bytesPerDecode = (bytesPerPixel == 2) ? 2 : 1;<br>
+<br>
+       while (data->pos() < data->size() && dataDecoded < length) {<br>
+               byte op = data->readByte();<br>
+<br>
+               if (op & 0x80) {<br>
+                       uint32 runSize = (op ^ 255) + 2;<br>
+                       uint16 value = (bytesPerDecode == 2) ? data->readUint16BE() : data->readByte();<br>
+<br>
+                       for (uint32 i = 0; i < runSize; i++) {<br>
+                               if (bytesPerDecode == 2) {<br>
+                                       WRITE_UINT16(out, value);<br>
+                                       out += 2;<br>
+                               } else {<br>
+                                       outputPixelBuffer(out, value, bitsPerPixel);<br>
+                               }<br>
+                       }<br>
+                       dataDecoded += runSize * bytesPerDecode;<br>
+               } else {<br>
+                       uint32 runSize = op + 1;<br>
+<br>
+                       if (bytesPerDecode == 1) {<br>
+                               for (uint32 i = 0; i < runSize; i++)<br>
+                                       outputPixelBuffer(out, data->readByte(), bitsPerPixel);<br>
+                       } else {<br>
+                               for (uint32 i = 0; i < runSize; i++) {<br>
+                                       WRITE_UINT16(out, data->readUint16BE());<br>
+                                       out += 2;<br>
+                               }<br>
+                       }<br>
+<br>
+                       dataDecoded += runSize * bytesPerDecode;<br>
+               }<br>
+       }<br>
+<br>
+       // HACK: Even if the data is 24-bit, rowBytes is still 32-bit<br>
+       if (bytesPerPixel == 3)<br>
+               dataDecoded += length / 4;<br>
+<br>
+       if (length != dataDecoded)<br>
+               warning("Mismatched PackBits read (%d/%d)", dataDecoded, length);<br>
+<br>
+       delete data;<br>
+}<br>
+<br>
+void PICTDecoder::outputPixelBuffer(byte *&out, byte value, byte bitsPerPixel) {<br>
+       switch (bitsPerPixel) {<br>
+       case 1:<br>
+               for (int i = 7; i >= 0; i--)<br>
+                       *out++ = (value >> i) & 1;<br>
+               break;<br>
+       case 2:<br>
+               for (int i = 6; i >= 0; i -= 2)<br>
+                       *out++ = (value >> i) & 3;<br>
+               break;<br>
+       case 4:<br>
+               *out++ = (value >> 4) & 0xf;<br>
+               *out++ = value & 0xf;<br>
+               break;<br>
+       default:<br>
+               *out++ = value;<br>
+       }<br>
+}<br>
+<br>
+void PICTDecoder::skipBitsRect(Common::SeekableReadStream &stream, bool withPalette) {<br>
+       // Step through a PackBitsRect/DirectBitsRect function<br>
+<br>
+       if (!withPalette)<br>
+               stream.readUint32BE();<br>
+<br>
+       uint16 rowBytes = stream.readUint16BE();<br>
+       uint16 height = stream.readUint16BE();<br>
+       stream.readUint16BE();<br>
+       height = stream.readUint16BE() - height;<br>
+       stream.readUint16BE();<br>
+<br>
+       uint16 packType;<br>
+<br>
+       // Top two bits signify PixMap vs BitMap<br>
+       if (rowBytes & 0xC000) {<br>
+               // PixMap<br>
+               stream.readUint16BE();<br>
+               packType = stream.readUint16BE();<br>
+               stream.skip(14);<br>
+               stream.readUint16BE(); // pixelSize<br>
+               stream.skip(16);<br>
+<br>
+               if (withPalette) {<br>
+                       stream.readUint32BE();<br>
+                       stream.readUint16BE();<br>
+                       stream.skip((stream.readUint16BE() + 1) * 8);<br>
+               }<br>
+<br>
+               rowBytes &= 0x3FFF;<br>
+       } else {<br>
+               // BitMap<br>
+               packType = 0;<br>
+       }<br>
+<br>
+       stream.skip(18);<br>
+<br>
+       for (uint16 i = 0; i < height; i++) {<br>
+               if (packType == 1 || packType == 2 || rowBytes < 8)<br>
+                       error("Unpacked PackBitsRect data");<br>
+               else if (packType == 0 || packType > 2)<br>
+                       stream.skip((rowBytes > 250) ? stream.readUint16BE() : stream.readByte());<br>
+       }<br>
+}<br>
+<br>
+// Compressed QuickTime details can be found here:<br>
+// <a href="http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/B-Chapter/2TheImageCompression.html" target="_blank">http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/B-Chapter/2TheImageCompression.html</a><br>


+// <a href="http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/F-Chapter/6WorkingwiththeImage.html" target="_blank">http://developer.apple.com/legacy/mac/library/#documentation/QuickTime/Rm/CompressDecompress/ImageComprMgr/F-Chapter/6WorkingwiththeImage.html</a><br>


+void PICTDecoder::decodeCompressedQuickTime(Common::SeekableReadStream &stream) {<br>
+       // First, read all the fields from the opcode<br>
+       uint32 dataSize = stream.readUint32BE();<br>
+       uint32 startPos = stream.pos();<br>
+<br>
+       /* uint16 version = */ stream.readUint16BE();<br>
+<br>
+       // Read in the display matrix<br>
+       uint32 matrix[3][3];<br>
+       for (uint32 i = 0; i < 3; i++)<br>
+               for (uint32 j = 0; j < 3; j++)<br>
+                       matrix[i][j] = stream.readUint32BE();<br>
+<br>
+       // We currently only support offseting images vertically from the matrix<br>
+       uint16 xOffset = 0;<br>
+       uint16 yOffset = matrix[2][1] >> 16;<br>
+<br>
+       uint32 matteSize = stream.readUint32BE();<br>
+       stream.skip(8); // matte rect<br>
+       /* uint16 transferMode = */ stream.readUint16BE();<br>
+       stream.skip(8); // src rect<br>
+       /* uint32 accuracy = */ stream.readUint32BE();<br>
+       uint32 maskSize = stream.readUint32BE();<br>
+<br>
+       // Skip the matte and mask<br>
+       stream.skip(matteSize + maskSize);<br>
+<br>
+       // Now we've reached the image descriptor, so read the relevant data from that<br>
+       uint32 idStart = stream.pos();<br>
+       uint32 idSize = stream.readUint32BE();<br>
+       uint32 codec = stream.readUint32BE();<br>
+       stream.skip(36); // miscellaneous stuff<br>
+       uint32 jpegSize = stream.readUint32BE();<br>
+       stream.skip(idSize - (stream.pos() - idStart)); // more useless stuff<br>
+<br>
+       if (codec != MKTAG('j', 'p', 'e', 'g'))<br>
+               error("Unhandled CompressedQuickTime format '%s'", tag2str(codec));<br>
+<br>
+       Common::SeekableSubReadStream jpegStream(&stream, stream.pos(), stream.pos() + jpegSize);<br>
+<br>
+       JPEGDecoder jpeg;<br>
+       if (!jpeg.loadStream(jpegStream))<br>
+               error("PICTDecoder::decodeCompressedQuickTime(): Could not decode JPEG data");<br>
+<br>
+       const Graphics::Surface *jpegSurface = jpeg.getSurface();<br>
+<br>
+       if (!_outputSurface) {<br>
+               _outputSurface = new Graphics::Surface();<br>
+               _outputSurface->create(_imageRect.width(), _imageRect.height(), jpegSurface->format);<br>
+       }<br>
+<br>
+       for (uint16 y = 0; y < jpegSurface->h; y++)<br>
+               memcpy(_outputSurface->getBasePtr(0 + xOffset, y + yOffset), jpegSurface->getBasePtr(0, y), jpegSurface->w * jpegSurface->format.bytesPerPixel);<br>
+<br>
+       stream.seek(startPos + dataSize);<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/pict.h b/image/pict.h<br>
new file mode 100644<br>
index 0000000..77b450f<br>
--- /dev/null<br>
+++ b/image/pict.h<br>
@@ -0,0 +1,141 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/**<br>
+ * @file<br>
+ * Image decoder used in engines:<br>
+ *  - mohawk<br>
+ *  - pegasus<br>
+ *  - sci<br>
+ */<br>
+<br>
+#ifndef IMAGE_PICT_H<br>
+#define IMAGE_PICT_H<br>
+<br>
+#include "common/array.h"<br>
+#include "common/rect.h"<br>
+#include "common/scummsys.h"<br>
+<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+#define DECLARE_OPCODE(x) void x(Common::SeekableReadStream &stream)<br>
+<br>
+class PICTDecoder : public ImageDecoder {<br>
+public:<br>
+       PICTDecoder();<br>
+       ~PICTDecoder();<br>
+<br>
+       // ImageDecoder API<br>
+       bool loadStream(Common::SeekableReadStream &stream);<br>
+       void destroy();<br>
+       const Graphics::Surface *getSurface() const { return _outputSurface; }<br>
+       const byte *getPalette() const { return _palette; }<br>
+       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
+<br>
+       struct PixMap {<br>
+               uint32 baseAddr;<br>
+               uint16 rowBytes;<br>
+               Common::Rect bounds;<br>
+               uint16 pmVersion;<br>
+               uint16 packType;<br>
+               uint32 packSize;<br>
+               uint32 hRes;<br>
+               uint32 vRes;<br>
+               uint16 pixelType;<br>
+               uint16 pixelSize;<br>
+               uint16 cmpCount;<br>
+               uint16 cmpSize;<br>
+               uint32 planeBytes;<br>
+               uint32 pmTable;<br>
+               uint32 pmReserved;<br>
+       };<br>
+<br>
+       static PixMap readPixMap(Common::SeekableReadStream &stream, bool hasBaseAddr = true);<br>
+<br>
+private:<br>
+       Common::Rect _imageRect;<br>
+       byte _palette[256 * 3];<br>
+       uint16 _paletteColorCount;<br>
+       Graphics::Surface *_outputSurface;<br>
+       bool _continueParsing;<br>
+<br>
+       // Utility Functions<br>
+       void unpackBitsRect(Common::SeekableReadStream &stream, bool withPalette);<br>
+       void unpackBitsLine(byte *out, uint32 length, Common::SeekableReadStream *stream, byte bitsPerPixel, byte bytesPerPixel);<br>
+       void skipBitsRect(Common::SeekableReadStream &stream, bool withPalette);<br>
+       void decodeCompressedQuickTime(Common::SeekableReadStream &stream);<br>
+       void outputPixelBuffer(byte *&out, byte value, byte bitsPerPixel);<br>
+<br>
+       // Opcodes<br>
+       typedef void (PICTDecoder::*OpcodeProcPICT)(Common::SeekableReadStream &stream);<br>
+       struct PICTOpcode {<br>
+               PICTOpcode() { op = 0; proc = 0; desc = 0; }<br>
+               PICTOpcode(uint16 o, OpcodeProcPICT p, const char *d) { op = o; proc = p; desc = d; }<br>
+               uint16 op;<br>
+               OpcodeProcPICT proc;<br>
+               const char *desc;<br>
+       };<br>
+       Common::Array<PICTOpcode> _opcodes;<br>
+<br>
+       // Common Opcodes<br>
+       void setupOpcodesCommon();<br>
+       DECLARE_OPCODE(o_nop);<br>
+       DECLARE_OPCODE(o_clip);<br>
+       DECLARE_OPCODE(o_txFont);<br>
+       DECLARE_OPCODE(o_txFace);<br>
+       DECLARE_OPCODE(o_pnSize);<br>
+       DECLARE_OPCODE(o_txSize);<br>
+       DECLARE_OPCODE(o_txRatio);<br>
+       DECLARE_OPCODE(o_versionOp);<br>
+       DECLARE_OPCODE(o_longText);<br>
+       DECLARE_OPCODE(o_longComment);<br>
+       DECLARE_OPCODE(o_opEndPic);<br>
+       DECLARE_OPCODE(o_headerOp);<br>
+<br>
+       // Regular-mode Opcodes<br>
+       void setupOpcodesNormal();<br>
+       DECLARE_OPCODE(on_packBitsRect);<br>
+       DECLARE_OPCODE(on_directBitsRect);<br>
+       DECLARE_OPCODE(on_compressedQuickTime);<br>
+<br>
+       // QuickTime-mode Opcodes<br>
+       void setupOpcodesQuickTime();<br>
+       DECLARE_OPCODE(oq_packBitsRect);<br>
+       DECLARE_OPCODE(oq_directBitsRect);<br>
+       DECLARE_OPCODE(oq_compressedQuickTime);<br>
+};<br>
+<br>
+#undef DECLARE_OPCODE<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/png.cpp b/image/png.cpp<br>
new file mode 100644<br>
index 0000000..158acfa<br>
--- /dev/null<br>
+++ b/image/png.cpp<br>
@@ -0,0 +1,245 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// Since we need to work with libpng here, we need to allow all symbols<br>
+// to avoid compilation issues.<br>
+#define FORBIDDEN_SYMBOL_ALLOW_ALL<br>
+#include "common/scummsys.h"<br>
+<br>
+#ifdef USE_PNG<br>
+#include <png.h><br>
+#endif<br>
+<br>
+#include "image/png.h"<br>
+<br>
+#include "graphics/pixelformat.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+#include "common/stream.h"<br>
+<br>
+namespace Image {<br>
+<br>
+PNGDecoder::PNGDecoder() : _outputSurface(0), _palette(0), _paletteColorCount(0), _stream(0) {<br>
+}<br>
+<br>
+PNGDecoder::~PNGDecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+void PNGDecoder::destroy() {<br>
+       if (_outputSurface) {<br>
+               _outputSurface->free();<br>
+               delete _outputSurface;<br>
+               _outputSurface = 0;<br>
+       }<br>
+       delete[] _palette;<br>
+       _palette = NULL;<br>
+}<br>
+<br>
+#ifdef USE_PNG<br>
+// libpng-error-handling:<br>
+void pngError(png_structp pngptr, png_const_charp errorMsg) {<br>
+       error("%s", errorMsg);<br>
+}<br>
+<br>
+void pngWarning(png_structp pngptr, png_const_charp warningMsg) {<br>
+       warning("%s", warningMsg);<br>
+}<br>
+<br>
+// libpng-I/O-helper:<br>
+void pngReadFromStream(png_structp pngPtr, png_bytep data, png_size_t length) {<br>
+       void *readIOptr = png_get_io_ptr(pngPtr);<br>
+       Common::SeekableReadStream *stream = (Common::SeekableReadStream *)readIOptr;<br>
+       stream->read(data, length);<br>
+}<br>
+#endif<br>
+<br>
+/*<br>
+ * This code is based on Broken Sword 2.5 engine<br>
+ *<br>
+ * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer<br>
+ *<br>
+ * Licensed under GNU GPL v2<br>
+ *<br>
+ */<br>
+<br>
+bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
+#ifdef USE_PNG<br>
+       destroy();<br>
+<br>
+       _stream = &stream;<br>
+<br>
+       // First, check the PNG signature<br>
+       if (_stream->readUint32BE() != MKTAG(0x89, 'P', 'N', 'G')) {<br>
+               delete _stream;<br>
+               return false;<br>
+       }<br>
+       if (_stream->readUint32BE() != MKTAG(0x0d, 0x0a, 0x1a, 0x0a)) {<br>
+               delete _stream;<br>
+               return false;<br>
+       }<br>
+<br>
+       // The following is based on the guide provided in:<br>
+       //<a href="http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-3" target="_blank">http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-3</a><br>
+       //<a href="http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf" target="_blank">http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf</a><br>
+       // along with the png-loading code used in the sword25-engine.<br>
+       png_structp pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);<br>
+       if (!pngPtr) {<br>
+               delete _stream;<br>
+               return false;<br>
+       }<br>
+       png_infop infoPtr = png_create_info_struct(pngPtr);<br>
+       if (!infoPtr) {<br>
+               png_destroy_read_struct(&pngPtr, NULL, NULL);<br>
+               delete _stream;<br>
+               return false;<br>
+       }<br>
+       png_infop endInfo = png_create_info_struct(pngPtr);<br>
+       if (!endInfo) {<br>
+               png_destroy_read_struct(&pngPtr, &infoPtr, NULL);<br>
+               delete _stream;<br>
+               return false;<br>
+       }<br>
+<br>
+       png_set_error_fn(pngPtr, NULL, pngError, pngWarning);<br>
+       // TODO: The manual says errors should be handled via setjmp<br>
+<br>
+       png_set_read_fn(pngPtr, _stream, pngReadFromStream);<br>
+       png_set_crc_action(pngPtr, PNG_CRC_DEFAULT, PNG_CRC_WARN_USE);<br>
+       // We already verified the PNG-header<br>
+       png_set_sig_bytes(pngPtr, 8);<br>
+<br>
+       // Read PNG header<br>
+       png_read_info(pngPtr, infoPtr);<br>
+<br>
+       // No handling for unknown chunks yet.<br>
+       int bitDepth, colorType, width, height, interlaceType;<br>
+       png_uint_32 w, h;<br>
+       png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, &interlaceType, NULL, NULL);<br>
+       width = w;<br>
+       height = h;<br>
+<br>
+       // Allocate memory for the final image data.<br>
+       // To keep memory framentation low this happens before allocating memory for temporary image data.<br>
+       _outputSurface = new Graphics::Surface();<br>
+<br>
+       // Images of all color formats except PNG_COLOR_TYPE_PALETTE<br>
+       // will be transformed into ARGB images<br>
+       if (colorType == PNG_COLOR_TYPE_PALETTE && !png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS)) {<br>
+               int numPalette = 0;<br>
+               png_colorp palette = NULL;<br>
+               uint32 success = png_get_PLTE(pngPtr, infoPtr, &palette, &numPalette);<br>
+               if (success != PNG_INFO_PLTE) {<br>
+                       png_destroy_read_struct(&pngPtr, &infoPtr, NULL);<br>
+                       return false;<br>
+               }<br>
+               _paletteColorCount = numPalette;<br>
+               _palette = new byte[_paletteColorCount * 3];<br>
+               for (int i = 0; i < _paletteColorCount; i++) {<br>
+                       _palette[(i * 3)] = palette[i].red;<br>
+                       _palette[(i * 3) + 1] = palette[i].green;<br>
+                       _palette[(i * 3) + 2] = palette[i].blue;<br>
+<br>
+               }<br>
+               _outputSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+               png_set_packing(pngPtr);<br>
+       } else {<br>
+               bool isAlpha = (colorType & PNG_COLOR_MASK_ALPHA);<br>
+               if (png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS)) {<br>
+                       isAlpha = true;<br>
+                       png_set_expand(pngPtr);<br>
+               }<br>
+               _outputSurface->create(width, height, Graphics::PixelFormat(4,<br>
+                                      8, 8, 8, isAlpha ? 8 : 0, 24, 16, 8, 0));<br>
+               if (!_outputSurface->getPixels()) {<br>
+                       error("Could not allocate memory for output image.");<br>
+               }<br>
+               if (bitDepth == 16)<br>
+                       png_set_strip_16(pngPtr);<br>
+               if (bitDepth < 8)<br>
+                       png_set_expand(pngPtr);<br>
+               if (colorType == PNG_COLOR_TYPE_GRAY ||<br>
+                       colorType == PNG_COLOR_TYPE_GRAY_ALPHA)<br>
+                       png_set_gray_to_rgb(pngPtr);<br>
+<br>
+               // PNGs are Big-Endian:<br>
+#ifdef SCUMM_LITTLE_ENDIAN<br>
+               png_set_bgr(pngPtr);<br>
+               png_set_swap_alpha(pngPtr);<br>
+               if (colorType != PNG_COLOR_TYPE_RGB_ALPHA)<br>
+                       png_set_filler(pngPtr, 0xff, PNG_FILLER_BEFORE);<br>
+#else<br>
+               if (colorType != PNG_COLOR_TYPE_RGB_ALPHA)<br>
+                       png_set_filler(pngPtr, 0xff, PNG_FILLER_AFTER);<br>
+#endif<br>
+<br>
+       }<br>
+<br>
+       // After the transformations have been registered, the image data is read again.<br>
+       png_set_interlace_handling(pngPtr);<br>
+       png_read_update_info(pngPtr, infoPtr);<br>
+       png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL);<br>
+       width = w;<br>
+       height = h;<br>
+<br>
+       if (interlaceType == PNG_INTERLACE_NONE) {<br>
+               // PNGs without interlacing can simply be read row by row.<br>
+               for (int i = 0; i < height; i++) {<br>
+                       png_read_row(pngPtr, (png_bytep)_outputSurface->getBasePtr(0, i), NULL);<br>
+               }<br>
+       } else {<br>
+               // PNGs with interlacing require us to allocate an auxillary<br>
+               // buffer with pointers to all row starts.<br>
+<br>
+               // Allocate row pointer buffer<br>
+               png_bytep *rowPtr = new png_bytep[height];<br>
+               if (!rowPtr) {<br>
+                       error("Could not allocate memory for row pointers.");<br>
+               }<br>
+<br>
+               // Initialize row pointers<br>
+               for (int i = 0; i < height; i++)<br>
+                       rowPtr[i] = (png_bytep)_outputSurface->getBasePtr(0, i);<br>
+<br>
+               // Read image data<br>
+               png_read_image(pngPtr, rowPtr);<br>
+<br>
+               // Free row pointer buffer<br>
+               delete[] rowPtr;<br>
+       }<br>
+<br>
+       // Read additional data at the end.<br>
+       png_read_end(pngPtr, NULL);<br>
+<br>
+       // Destroy libpng structures<br>
+       png_destroy_read_struct(&pngPtr, &infoPtr, &endInfo);<br>
+<br>
+       // We no longer need the file stream, thus close it here<br>
+       _stream = 0;<br>
+<br>
+       return true;<br>
+#else<br>
+       return false;<br>
+#endif<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/png.h b/image/png.h<br>
new file mode 100644<br>
index 0000000..c4532fd<br>
--- /dev/null<br>
+++ b/image/png.h<br>
@@ -0,0 +1,68 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/*<br>
+ * PNG decoder used in engines:<br>
+ *  - sword25<br>
+ *  - wintermute<br>
+ * Dependencies:<br>
+ *  - libpng<br>
+ */<br>
+<br>
+#ifndef IMAGE_PNG_H<br>
+#define IMAGE_PNG_H<br>
+<br>
+#include "common/scummsys.h"<br>
+#include "common/textconsole.h"<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+class PNGDecoder : public ImageDecoder {<br>
+public:<br>
+       PNGDecoder();<br>
+       ~PNGDecoder();<br>
+<br>
+       bool loadStream(Common::SeekableReadStream &stream);<br>
+       void destroy();<br>
+       const Graphics::Surface *getSurface() const { return _outputSurface; }<br>
+       const byte *getPalette() const { return _palette; }<br>
+       uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
+private:<br>
+       Common::SeekableReadStream *_stream;<br>
+       byte *_palette;<br>
+       uint16 _paletteColorCount;<br>
+<br>
+       Graphics::Surface *_outputSurface;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/tga.cpp b/image/tga.cpp<br>
new file mode 100644<br>
index 0000000..e251f64<br>
--- /dev/null<br>
+++ b/image/tga.cpp<br>
@@ -0,0 +1,430 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/* Based on code from xoreos <a href="https://github.com/DrMcCoy/xoreos/" target="_blank">https://github.com/DrMcCoy/xoreos/</a><br>
+ * relicensed under GPLv2+ with permission from DrMcCoy and clone2727<br>
+ */<br>
+<br>
+#include "image/tga.h"<br>
+<br>
+#include "common/util.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "common/error.h"<br>
+<br>
+namespace Image {<br>
+<br>
+TGADecoder::TGADecoder() {<br>
+       _colorMapSize = 0;<br>
+       _colorMapOrigin = 0;<br>
+       _colorMapLength = 0;<br>
+       _colorMapEntryLength = 0;<br>
+       _colorMap = NULL;<br>
+}<br>
+<br>
+TGADecoder::~TGADecoder() {<br>
+       destroy();<br>
+}<br>
+<br>
+void TGADecoder::destroy() {<br>
+       _surface.free();<br>
+       delete[] _colorMap;<br>
+}<br>
+<br>
+bool TGADecoder::loadStream(Common::SeekableReadStream &tga) {<br>
+       destroy();<br>
+<br>
+       byte imageType, pixelDepth;<br>
+       bool success;<br>
+       success = readHeader(tga, imageType, pixelDepth);<br>
+       if (success) {<br>
+               switch (imageType) {<br>
+               case TYPE_BW:<br>
+               case TYPE_TRUECOLOR:<br>
+                       success = readData(tga, imageType, pixelDepth);<br>
+                       break;<br>
+               case TYPE_RLE_BW:<br>
+               case TYPE_RLE_TRUECOLOR:<br>
+               case TYPE_RLE_CMAP:<br>
+                       success = readDataRLE(tga, imageType, pixelDepth);<br>
+                       break;<br>
+               case TYPE_CMAP:<br>
+                       success = readDataColorMapped(tga, imageType, pixelDepth);<br>
+                       break;<br>
+               default:<br>
+                       success = false;<br>
+                       break;<br>
+               }<br>
+       }<br>
+       if (tga.err() || !success) {<br>
+               warning("Failed reading TGA-file");<br>
+               return false;<br>
+       }<br>
+       return success;<br>
+}<br>
+<br>
+bool TGADecoder::readHeader(Common::SeekableReadStream &tga, byte &imageType, byte &pixelDepth) {<br>
+       if (!tga.seek(0)) {<br>
+               warning("Failed reading TGA-file");<br>
+               return false;<br>
+       }<br>
+<br>
+       // TGAs have an optional "id" string in the header<br>
+       uint32 idLength = tga.readByte();<br>
+<br>
+       // Number of colors in the color map / palette<br>
+       int hasColorMap = tga.readByte();<br>
+<br>
+       // Image type. See header for numeric constants<br>
+       imageType = tga.readByte();<br>
+<br>
+       switch (imageType) {<br>
+       case TYPE_CMAP:<br>
+       case TYPE_TRUECOLOR:<br>
+       case TYPE_BW:<br>
+       case TYPE_RLE_CMAP:<br>
+       case TYPE_RLE_TRUECOLOR:<br>
+       case TYPE_RLE_BW:<br>
+               break;<br>
+       default:<br>
+               warning("Unsupported image type: %d", imageType);<br>
+               return false;<br>
+       }<br>
+<br>
+       // Color map specifications<br>
+       if (hasColorMap == 0) {<br>
+               tga.skip(5);<br>
+       } else {<br>
+               _colorMapOrigin = tga.readUint16LE();<br>
+               _colorMapLength = tga.readUint16LE();<br>
+               _colorMapEntryLength = tga.readByte();<br>
+       }<br>
+       // Origin-defintions<br>
+       tga.skip(2 + 2);<br>
+<br>
+       // Image dimensions<br>
+       _surface.w = tga.readUint16LE();<br>
+       _surface.h = tga.readUint16LE();<br>
+<br>
+       // Bits per pixel<br>
+       pixelDepth = tga.readByte();<br>
+       _surface.format.bytesPerPixel = pixelDepth / 8;<br>
+<br>
+       // Image descriptor<br>
+       byte imgDesc = tga.readByte();<br>
+       int attributeBits = imgDesc & 0x0F;<br>
+       assert((imgDesc & 0x10) == 0);<br>
+       _originTop = (imgDesc & 0x20);<br>
+<br>
+       // Interleaving is not handled at this point<br>
+       //int interleave = (imgDesc & 0xC);<br>
+       if (imageType == TYPE_CMAP || imageType == TYPE_RLE_CMAP) {<br>
+               if (pixelDepth == 8) {<br>
+                       _format = Graphics::PixelFormat::createFormatCLUT8();<br>
+               } else {<br>
+                       warning("Unsupported index-depth: %d", pixelDepth);<br>
+                       return false;<br>
+               }<br>
+       } else if (imageType == TYPE_TRUECOLOR || imageType == TYPE_RLE_TRUECOLOR) {<br>
+               if (pixelDepth == 24) {<br>
+                       _format = Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0);<br>
+               } else if (pixelDepth == 32) {<br>
+                       // HACK: According to the spec, attributeBits should determine the amount<br>
+                       // of alpha-bits, however, as the game files that use this decoder seems<br>
+                       // to ignore that fact, we force the amount to 8 for 32bpp files for now.<br>
+                       _format = Graphics::PixelFormat(4, 8, 8, 8, /* attributeBits */ 8, 16, 8, 0, 24);<br>
+               } else if (pixelDepth == 16 && imageType == TYPE_TRUECOLOR) {<br>
+                       // 16bpp TGA is ARGB1555<br>
+                       _format = Graphics::PixelFormat(2, 5, 5, 5, attributeBits, 10, 5, 0, 15);<br>
+               } else {<br>
+                       warning("Unsupported pixel depth: %d, %d", imageType, pixelDepth);<br>
+                       return false;<br>
+               }<br>
+       } else if (imageType == TYPE_BW || TYPE_RLE_BW) {<br>
+               if (pixelDepth == 8) {<br>
+                       _format = Graphics::PixelFormat(4, 8, 8, 8, 0, 16, 8, 0, 0);<br>
+               } else {<br>
+                       warning("Unsupported pixel depth: %d, %d", imageType, pixelDepth);<br>
+                       return false;<br>
+               }<br>
+<br>
+       } else {<br>
+               warning("Unsupported image type: %d", imageType);<br>
+               return false;<br>
+       }<br>
+<br>
+       // Skip the id string<br>
+       tga.skip(idLength);<br>
+<br>
+       if (hasColorMap) {<br>
+               return readColorMap(tga, imageType, pixelDepth);<br>
+       }<br>
+       return true;<br>
+}<br>
+<br>
+bool TGADecoder::readColorMap(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth) {<br>
+       _colorMap = new byte[3 * _colorMapLength];<br>
+       for (int i = 0; i < _colorMapLength * 3; i += 3) {<br>
+               byte r, g, b;<br>
+               if (_colorMapEntryLength == 32) {<br>
+                       byte a;<br>
+                       Graphics::PixelFormat format(4, 8, 8, 8, 0, 16, 8, 0, 24);<br>
+                       uint32 color = tga.readUint32LE();<br>
+                       format.colorToARGB(color, a, r, g, b);<br>
+               } else if (_colorMapEntryLength == 24) {<br>
+                       r = tga.readByte();<br>
+                       g = tga.readByte();<br>
+                       b = tga.readByte();<br>
+               } else if (_colorMapEntryLength == 16) {<br>
+                       byte a;<br>
+                       Graphics::PixelFormat format(2, 5, 5, 5, 0, 10, 5, 0, 15);<br>
+                       uint16 color = tga.readUint16LE();<br>
+                       format.colorToARGB(color, a, r, g, b);<br>
+               } else {<br>
+                       warning("Unsupported image type: %d", imageType);<br>
+                       r = g = b = 0;<br>
+               }<br>
+#ifdef SCUMM_LITTLE_ENDIAN<br>
+               _colorMap[i] = r;<br>
+               _colorMap[i + 1] = g;<br>
+               _colorMap[i + 2] = b;<br>
+#else<br>
+               _colorMap[i] = b;<br>
+               _colorMap[i + 1] = g;<br>
+               _colorMap[i + 2] = r;<br>
+#endif<br>
+       }<br>
+       return true;<br>
+}<br>
+<br>
+// Additional information found from <a href="http://paulbourke.net/dataformats/tga/" target="_blank">http://paulbourke.net/dataformats/tga/</a><br>
+// With some details from the link referenced in the header.<br>
+bool TGADecoder::readData(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth) {<br>
+       // TrueColor<br>
+       if (imageType == TYPE_TRUECOLOR) {<br>
+               _surface.create(_surface.w, _surface.h, _format);<br>
+<br>
+               if (pixelDepth == 16) {<br>
+                       for (int i = 0; i < _surface.h; i++) {<br>
+                               uint16 *dst;<br>
+                               if (!_originTop) {<br>
+                                       dst = (uint16 *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
+                               } else {<br>
+                                       dst = (uint16 *)_surface.getBasePtr(0, i);<br>
+                               }<br>
+                               for (int j = 0; j < _surface.w; j++) {<br>
+                                       *dst++ = tga.readUint16LE();<br>
+                               }<br>
+                       }<br>
+               } else if (pixelDepth == 32) {<br>
+                       for (int i = 0; i < _surface.h; i++) {<br>
+                               uint32 *dst;<br>
+                               if (!_originTop) {<br>
+                                       dst = (uint32 *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
+                               } else {<br>
+                                       dst = (uint32 *)_surface.getBasePtr(0, i);<br>
+                               }<br>
+                               for (int j = 0; j < _surface.w; j++) {<br>
+                                       *dst++ = tga.readUint32LE();<br>
+                               }<br>
+                       }<br>
+               } else if (pixelDepth == 24) {<br>
+                       for (int i = 0; i < _surface.h; i++) {<br>
+                               byte *dst;<br>
+                               if (!_originTop) {<br>
+                                       dst = (byte *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
+                               } else {<br>
+                                       dst = (byte *)_surface.getBasePtr(0, i);<br>
+                               }<br>
+                               for (int j = 0; j < _surface.w; j++) {<br>
+                                       byte r = tga.readByte();<br>
+                                       byte g = tga.readByte();<br>
+                                       byte b = tga.readByte();<br>
+#ifdef SCUMM_LITTLE_ENDIAN<br>
+                                       *dst++ = r;<br>
+                                       *dst++ = g;<br>
+                                       *dst++ = b;<br>
+#else<br>
+                                       *dst++ = b;<br>
+                                       *dst++ = g;<br>
+                                       *dst++ = r;<br>
+#endif<br>
+                               }<br>
+                       }<br>
+               }<br>
+               // Black/White<br>
+       } else if (imageType == TYPE_BW) {<br>
+               _surface.create(_surface.w, _surface.h, _format);<br>
+<br>
+               byte *data  = (byte *)_surface.getPixels();<br>
+               uint32 count = _surface.w * _surface.h;<br>
+<br>
+               while (count-- > 0) {<br>
+                       byte g = tga.readByte();<br>
+                       *data++ = g;<br>
+                       *data++ = g;<br>
+                       *data++ = g;<br>
+                       *data++ = g;<br>
+               }<br>
+       }<br>
+       return true;<br>
+}<br>
+<br>
+bool TGADecoder::readDataColorMapped(Common::SeekableReadStream &tga, byte imageType, byte indexDepth) {<br>
+       // Color-mapped<br>
+       if (imageType == TYPE_CMAP) {<br>
+               _surface.create(_surface.w, _surface.h, _format);<br>
+               if (indexDepth == 8) {<br>
+                       for (int i = 0; i < _surface.h; i++) {<br>
+                               byte *dst;<br>
+                               if (!_originTop) {<br>
+                                       dst = (byte *)_surface.getBasePtr(0, _surface.h - i - 1);<br>
+                               } else {<br>
+                                       dst = (byte *)_surface.getBasePtr(0, i);<br>
+                               }<br>
+                               for (int j = 0; j < _surface.w; j++) {<br>
+                                       byte index = tga.readByte();<br>
+                                       *dst++ = index;<br>
+                               }<br>
+                       }<br>
+               } else if (indexDepth == 16) {<br>
+                       warning("16 bit indexes not supported");<br>
+                       return false;<br>
+               }<br>
+       } else {<br>
+               return false;<br>
+       }<br>
+       return true;<br>
+}<br>
+<br>
+bool TGADecoder::readDataRLE(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth) {<br>
+       // RLE-TrueColor / RLE-Black/White<br>
+       if (imageType == TYPE_RLE_TRUECOLOR || imageType == TYPE_RLE_BW || imageType == TYPE_RLE_CMAP) {<br>
+               _surface.create(_surface.w, _surface.h, _format);<br>
+               uint32 count = _surface.w * _surface.h;<br>
+               byte *data = (byte *)_surface.getPixels();<br>
+<br>
+               while (count > 0) {<br>
+                       uint32 header = tga.readByte();<br>
+                       byte type = (header & 0x80) >> 7;<br>
+                       uint32 rleCount = (header & 0x7F) + 1;<br>
+<br>
+                       // RLE-packet<br>
+                       if (type == 1) {<br>
+                               if (pixelDepth == 32 && imageType == TYPE_RLE_TRUECOLOR) {<br>
+                                       uint32 color = tga.readUint32LE();<br>
+                                       while (rleCount-- > 0) {<br>
+                                               *((uint32 *)data) = color;<br>
+                                               data += 4;<br>
+                                               count--;<br>
+                                       }<br>
+                               } else if (pixelDepth == 24 && imageType == TYPE_RLE_TRUECOLOR) {<br>
+                                       byte r = tga.readByte();<br>
+                                       byte g = tga.readByte();<br>
+                                       byte b = tga.readByte();<br>
+                                       while (rleCount-- > 0) {<br>
+#ifdef SCUMM_LITTLE_ENDIAN<br>
+                                               *data++ = r;<br>
+                                               *data++ = g;<br>
+                                               *data++ = b;<br>
+#else<br>
+                                               *data++ = b;<br>
+                                               *data++ = g;<br>
+                                               *data++ = r;<br>
+#endif<br>
+                                               count--;<br>
+                                       }<br>
+                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_BW) {<br>
+                                       byte color = tga.readByte();<br>
+                                       while (rleCount-- > 0) {<br>
+                                               *data++ = color;<br>
+                                               *data++ = color;<br>
+                                               *data++ = color;<br>
+                                               *data++ = color;<br>
+                                               count--;<br>
+                                       }<br>
+                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_CMAP) {<br>
+                                       byte index = tga.readByte();<br>
+                                       while (rleCount-- > 0) {<br>
+                                               *data++ = index;<br>
+                                               count--;<br>
+                                       }<br>
+                               } else {<br>
+                                       warning("Unhandled pixel-depth for image-type 10");<br>
+                                       return false;<br>
+                               }<br>
+                               // Raw-packet<br>
+                       } else if (type == 0) {<br>
+                               if (pixelDepth == 32 && imageType == TYPE_RLE_TRUECOLOR) {<br>
+                                       while (rleCount-- > 0) {<br>
+                                               uint32 color = tga.readUint32LE();<br>
+                                               *((uint32 *)data) = color;<br>
+                                               data += 4;<br>
+                                               count--;<br>
+                                       }<br>
+                               } else if (pixelDepth == 24 && imageType == TYPE_RLE_TRUECOLOR) {<br>
+                                       while (rleCount-- > 0) {<br>
+                                               byte r = tga.readByte();<br>
+                                               byte g = tga.readByte();<br>
+                                               byte b = tga.readByte();<br>
+#ifdef SCUMM_LITTLE_ENDIAN<br>
+                                               *data++ = r;<br>
+                                               *data++ = g;<br>
+                                               *data++ = b;<br>
+#else<br>
+                                               *data++ = b;<br>
+                                               *data++ = g;<br>
+                                               *data++ = r;<br>
+#endif<br>
+                                               count--;<br>
+                                       }<br>
+                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_BW) {<br>
+                                       while (rleCount-- > 0) {<br>
+                                               byte color = tga.readByte();<br>
+                                               *data++ = color;<br>
+                                               *data++ = color;<br>
+                                               *data++ = color;<br>
+                                               *data++ = color;<br>
+                                               count--;<br>
+                                       }<br>
+                               } else if (pixelDepth == 8 && imageType == TYPE_RLE_CMAP) {<br>
+                                       while (rleCount-- > 0) {<br>
+                                               byte index = tga.readByte();<br>
+                                               *data++ = index;<br>
+                                               count--;<br>
+                                       }<br>
+                               } else {<br>
+                                       warning("Unhandled pixel-depth for image-type 10");<br>
+                                       return false;<br>
+                               }<br>
+                       } else {<br>
+                               warning("Unknown header for RLE-packet %d", type);<br>
+                               return false;<br>
+                       }<br>
+               }<br>
+       } else {<br>
+               return false;<br>
+       }<br>
+       return true;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/tga.h b/image/tga.h<br>
new file mode 100644<br>
index 0000000..677c178<br>
--- /dev/null<br>
+++ b/image/tga.h<br>
@@ -0,0 +1,100 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+/* Based on code from eos <a href="https://github.com/DrMcCoy/xoreos/" target="_blank">https://github.com/DrMcCoy/xoreos/</a><br>
+ * relicensed under GPLv2+ with permission from DrMcCoy and clone2727<br>
+ */<br>
+<br>
+/*<br>
+ * TGA decoder used in engines:<br>
+ *  - wintermute<br>
+ *  - zvision<br>
+ */<br>
+<br>
+#ifndef IMAGE_TGA_H<br>
+#define IMAGE_TGA_H<br>
+<br>
+#include "graphics/surface.h"<br>
+#include "image/image_decoder.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+/** TarGa image-decoder<br>
+ * The following variations of TGA are supported:<br>
+ * - Type 1 - Color-mapped images in 16/24/32 bpp with 8 bit indexes<br>
+ * - Type 2 - 16/24/32 bpp Top AND Bottom origined.<br>
+ * - Type 3 - Black/White images, 8bpp.<br>
+ * - Type 9 - RLE-encoded color-mapped images. (8 bit indexes only)<br>
+ * - Type 10 - RLE-encoded TrueColor, 24/32bpp.<br>
+ * - Type 11 - RLE-encoded Black/White, 8bpp.<br>
+ *<br>
+ * No images are returned with a palette, instead they are converted<br>
+ * to 16 bpp for Type 1, or 32 bpp for Black/White-images.<br>
+ */<br>
+class TGADecoder : public ImageDecoder {<br>
+public:<br>
+       TGADecoder();<br>
+       virtual ~TGADecoder();<br>
+       virtual void destroy();<br>
+       virtual const Graphics::Surface *getSurface() const { return &_surface; }<br>
+       virtual const byte *getPalette() const { return _colorMap; }<br>
+       virtual uint16 getPaletteColorCount() const { return _colorMapLength; }<br>
+       virtual bool loadStream(Common::SeekableReadStream &stream);<br>
+private:<br>
+       // Format-spec from:<br>
+       //<a href="http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html" target="_blank">http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html</a><br>
+       enum {<br>
+           TYPE_CMAP = 1,<br>
+           TYPE_TRUECOLOR = 2,<br>
+           TYPE_BW = 3,<br>
+           TYPE_RLE_CMAP = 9,<br>
+           TYPE_RLE_TRUECOLOR = 10,<br>
+           TYPE_RLE_BW = 11<br>
+       };<br>
+<br>
+       // Color-map:<br>
+       bool _colorMapSize;<br>
+       byte *_colorMap;<br>
+       int16 _colorMapOrigin;<br>
+       int16 _colorMapLength;<br>
+       byte _colorMapEntryLength;<br>
+<br>
+       // Origin may be at the top, or bottom<br>
+       bool _originTop;<br>
+<br>
+       Graphics::PixelFormat _format;<br>
+       Graphics::Surface _surface;<br>
+       // Loading helpers<br>
+       bool readHeader(Common::SeekableReadStream &tga, byte &imageType, byte &pixelDepth);<br>
+       bool readData(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);<br>
+       bool readDataColorMapped(Common::SeekableReadStream &tga, byte imageType, byte indexDepth);<br>
+       bool readDataRLE(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);<br>
+       bool readColorMap(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/video/codecs/jpeg.cpp b/video/codecs/jpeg.cpp<br>
index a5d29ce..77917f3 100644<br>
--- a/video/codecs/jpeg.cpp<br>
+++ b/video/codecs/jpeg.cpp<br>
@@ -23,7 +23,7 @@<br>
 #include "common/system.h"<br>
 #include "common/textconsole.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
+#include "image/jpeg.h"<br>
<br>
 #include "video/codecs/jpeg.h"<br>
<br>
@@ -46,7 +46,7 @@ JPEGDecoder::~JPEGDecoder() {<br>
 }<br>
<br>
 const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
-       Graphics::JPEGDecoder jpeg;<br>
+       Image::JPEGDecoder jpeg;<br>
<br>
        if (!jpeg.loadStream(*stream)) {<br>
                warning("Failed to decode JPEG frame");<br>
diff --git a/video/codecs/mjpeg.cpp b/video/codecs/mjpeg.cpp<br>
index 443a06e..16fb4f3 100644<br>
--- a/video/codecs/mjpeg.cpp<br>
+++ b/video/codecs/mjpeg.cpp<br>
@@ -29,7 +29,7 @@<br>
 #include "common/system.h"<br>
 #include "common/textconsole.h"<br>
 #include "graphics/surface.h"<br>
-#include "graphics/decoders/jpeg.h"<br>
+#include "image/jpeg.h"<br>
<br>
 #include "video/codecs/mjpeg.h"<br>
<br>
@@ -197,7 +197,7 @@ const Graphics::Surface *MJPEGDecoder::decodeImage(Common::SeekableReadStream *s<br>
        stream->read(data + dataOffset, stream->size() - inputSkip);<br>
<br>
        Common::MemoryReadStream convertedStream(data, outputSize, DisposeAfterUse::YES);<br>
-       Graphics::JPEGDecoder jpeg;<br>
+       Image::JPEGDecoder jpeg;<br>
<br>
        if (!jpeg.loadStream(convertedStream)) {<br>
                warning("Failed to decode MJPEG frame");<br>
<br>
<br>
Commit: b568ac73b9d2e063eb04693e4610a9932035b696<br>
    <a href="https://github.com/scummvm/scummvm/commit/b568ac73b9d2e063eb04693e4610a9932035b696" target="_blank">https://github.com/scummvm/scummvm/commit/b568ac73b9d2e063eb04693e4610a9932035b696</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:27:36-08:00<br>
<br>
Commit Message:<br>
IMAGE: Move video codecs to image/<br>
<br>
Changed paths:<br>
  A image/codecs/cdtoons.cpp<br>
  A image/codecs/cdtoons.h<br>
  A image/codecs/cinepak.cpp<br>
  A image/codecs/cinepak.h<br>
  A image/codecs/codec.h<br>
  A image/codecs/indeo3.cpp<br>
  A image/codecs/indeo3.h<br>
  A image/codecs/jpeg.cpp<br>
  A image/codecs/jpeg.h<br>
  A image/codecs/mjpeg.cpp<br>
  A image/codecs/mjpeg.h<br>
  A image/codecs/mpeg.cpp<br>
  A image/codecs/mpeg.h<br>
  A image/codecs/msrle.cpp<br>
  A image/codecs/msrle.h<br>
  A image/codecs/msvideo1.cpp<br>
  A image/codecs/msvideo1.h<br>
  A image/codecs/qtrle.cpp<br>
  A image/codecs/qtrle.h<br>
  A image/codecs/rpza.cpp<br>
  A image/codecs/rpza.h<br>
  A image/codecs/smc.cpp<br>
  A image/codecs/smc.h<br>
  A image/codecs/svq1.cpp<br>
  A image/codecs/svq1.h<br>
  A image/codecs/svq1_cb.h<br>
  A image/codecs/svq1_vlc.h<br>
  A image/codecs/truemotion1.cpp<br>
  A image/codecs/truemotion1.h<br>
  A image/codecs/truemotion1data.h<br>
  R video/codecs/cdtoons.cpp<br>
  R video/codecs/cdtoons.h<br>
  R video/codecs/cinepak.cpp<br>
  R video/codecs/cinepak.h<br>
  R video/codecs/codec.h<br>
  R video/codecs/indeo3.cpp<br>
  R video/codecs/indeo3.h<br>
  R video/codecs/jpeg.cpp<br>
  R video/codecs/jpeg.h<br>
  R video/codecs/mjpeg.cpp<br>
  R video/codecs/mjpeg.h<br>
  R video/codecs/mpeg.cpp<br>
  R video/codecs/mpeg.h<br>
  R video/codecs/msrle.cpp<br>
  R video/codecs/msrle.h<br>
  R video/codecs/msvideo1.cpp<br>
  R video/codecs/msvideo1.h<br>
  R video/codecs/qtrle.cpp<br>
  R video/codecs/qtrle.h<br>
  R video/codecs/rpza.cpp<br>
  R video/codecs/rpza.h<br>
  R video/codecs/smc.cpp<br>
  R video/codecs/smc.h<br>
  R video/codecs/svq1.cpp<br>
  R video/codecs/svq1.h<br>
  R video/codecs/svq1_cb.h<br>
  R video/codecs/svq1_vlc.h<br>
  R video/codecs/truemotion1.cpp<br>
  R video/codecs/truemotion1.h<br>
  R video/codecs/truemotion1data.h<br>
    image/<a href="http://module.mk" target="_blank">module.mk</a><br>
    video/avi_decoder.cpp<br>
    video/avi_decoder.h<br>
    video/coktel_decoder.cpp<br>
    video/coktel_decoder.h<br>
    video/<a href="http://module.mk" target="_blank">module.mk</a><br>
    video/qt_decoder.cpp<br>
    video/qt_decoder.h<br>
<br>
<br>
<br>
diff --git a/image/codecs/cdtoons.cpp b/image/codecs/cdtoons.cpp<br>
new file mode 100644<br>
index 0000000..e1246a0<br>
--- /dev/null<br>
+++ b/image/codecs/cdtoons.cpp<br>
@@ -0,0 +1,448 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/codecs/cdtoons.h"<br>
+#include "common/rect.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "common/array.h"<br>
+<br>
+namespace Image {<br>
+<br>
+struct CDToonsAction {<br>
+       uint16 blockId;<br>
+       Common::Rect rect;<br>
+};<br>
+<br>
+struct CDToonsDiff {<br>
+       byte *data;<br>
+       uint32 size;<br>
+       Common::Rect rect;<br>
+};<br>
+<br>
+static Common::Rect readRect(Common::SeekableReadStream *stream) {<br>
+       Common::Rect rect;<br>
+       rect.top = stream->readUint16BE();<br>
+       rect.left = stream->readUint16BE();<br>
+       rect.bottom = stream->readUint16BE();<br>
+       rect.right = stream->readUint16BE();<br>
+       return rect;<br>
+}<br>
+<br>
+CDToonsDecoder::CDToonsDecoder(uint16 width, uint16 height) {<br>
+       debugN(5, "CDToons: width %d, height %d\n", width, height);<br>
+<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+<br>
+       _currentPaletteId = 0;<br>
+       memset(_palette, 0, 256 * 3);<br>
+       _dirtyPalette = false;<br>
+}<br>
+<br>
+CDToonsDecoder::~CDToonsDecoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+<br>
+       for (Common::HashMap<uint16, CDToonsBlock>::iterator i = _blocks.begin(); i != _blocks.end(); i++)<br>
+               delete[] i->_value.data;<br>
+}<br>
+<br>
+Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       uint16 u0 = stream->readUint16BE(); // always 9?<br>
+       uint16 frameId = stream->readUint16BE();<br>
+       uint16 blocksValidUntil = stream->readUint16BE();<br>
+       byte u6 = stream->readByte();<br>
+       byte backgroundColor = stream->readByte();<br>
+       debugN(5, "CDToons frame %d, size %d, unknown %04x (at 0), blocks valid until %d, unknown 6 is %02x, bkg color is %02x\n",<br>
+               frameId, stream->size(), u0, blocksValidUntil, u6, backgroundColor);<br>
+<br>
+       Common::Rect clipRect = readRect(stream);<br>
+       debugN(9, "CDToons clipRect: (%d, %d) to (%d, %d)\n",<br>
+               clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);<br>
+<br>
+       Common::Rect dirtyRect = readRect(stream);<br>
+       debugN(9, "CDToons dirtyRect: (%d, %d) to (%d, %d)\n",<br>
+               dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);<br>
+<br>
+       uint32 flags = stream->readUint32BE();<br>
+       if (flags & 0x80)<br>
+               error("CDToons: frame already processed?");<br>
+       debugN(5, "CDToons flags: %08x\n", flags);<br>
+<br>
+       uint16 blockCount = stream->readUint16BE();<br>
+       uint16 blockOffset = stream->readUint16BE();<br>
+       debugN(9, "CDToons: %d blocks at 0x%04x\n",<br>
+               blockCount, blockOffset);<br>
+<br>
+       // max block id?<br>
+       uint16 u32 = stream->readUint16BE();<br>
+       debugN(5, "CDToons unknown at 32: %04x\n", u32);<br>
+<br>
+       byte actionCount = stream->readByte();<br>
+       byte u35 = stream->readByte();<br>
+<br>
+       uint16 paletteId = stream->readUint16BE();<br>
+       byte paletteSet = stream->readByte();<br>
+       debugN(9, "CDToons palette id %04x, palette byte %02x\n",<br>
+               paletteId, paletteSet);<br>
+<br>
+       byte u39 = stream->readByte();<br>
+       uint16 u40 = stream->readUint16BE();<br>
+       uint16 u42 = stream->readUint16BE();<br>
+       debugN(5, "CDToons: unknown at 35 is %02x, unknowns at 39: %02x, %04x, %04x\n",<br>
+               u35, u39, u40, u42);<br>
+<br>
+       Common::Array<CDToonsAction> actions;<br>
+<br>
+       for (uint i = 0; i < actionCount; i++) {<br>
+               CDToonsAction action;<br>
+               action.blockId = stream->readUint16BE();<br>
+               action.rect = readRect(stream);<br>
+               debugN(9, "CDToons action: render block %d at (%d, %d) to (%d, %d)\n",<br>
+                       action.blockId, action.rect.left, action.rect.top, action.rect.right, action.rect.bottom);<br>
+               actions.push_back(action);<br>
+       }<br>
+<br>
+       if (stream->pos() > blockOffset)<br>
+               error("CDToons header ended at 0x%08x, but blocks should have started at 0x%08x",<br>
+                       stream->pos(), blockOffset);<br>
+<br>
+       if (stream->pos() != blockOffset)<br>
+               error("CDToons had %d unknown bytes after header", blockOffset - stream->pos());<br>
+<br>
+       for (uint i = 0; i < blockCount; i++) {<br>
+               uint16 blockId = stream->readUint16BE();<br>
+               if (blockId >= 1200)<br>
+                       error("CDToons: block id %d was too high", blockId);<br>
+               if (_blocks.contains(blockId))<br>
+                       error("CDToons: new block %d was already seen", blockId);<br>
+<br>
+               CDToonsBlock block;<br>
+               block.flags = stream->readUint16BE();<br>
+               // flag 1 = palette, flag 2 = data?<br>
+               if (block.flags & 0x8000)<br>
+                       error("CDToons: block already processed?");<br>
+               block.size = stream->readUint32BE();<br>
+               if (block.size < 14)<br>
+                       error("CDToons: block size was %d, too small", block.size);<br>
+               block.size -= 14;<br>
+               block.startFrame = stream->readUint16BE();<br>
+               block.endFrame = stream->readUint16BE();<br>
+               block.unknown12 = stream->readUint16BE();<br>
+               block.data = new byte[block.size];<br>
+               stream->read(block.data, block.size);<br>
+<br>
+               debugN(9, "CDToons block id 0x%04x of size 0x%08x, flags %04x, from frame %d to %d, unknown at 12 is %04x\n",<br>
+                       blockId, block.size, block.flags, block.startFrame, block.endFrame, block.unknown12);<br>
+<br>
+               _blocks[blockId] = block;<br>
+       }<br>
+<br>
+       byte xFrmBegin = 0, xFrmCount;<br>
+       Common::Array<CDToonsDiff> diffs;<br>
+<br>
+       while (true) {<br>
+               int32 nextPos = stream->pos();<br>
+               uint32 tag = stream->readUint32BE();<br>
+               uint32 size = stream->readUint32BE();<br>
+               nextPos += size;<br>
+<br>
+               switch (tag) {<br>
+               case MKTAG('D','i','f','f'):<br>
+                       {<br>
+                       debugN(5, "CDToons: Diff\n");<br>
+                       uint16 count = stream->readUint16BE();<br>
+<br>
+                       Common::Rect diffClipRect = readRect(stream);<br>
+                       debugN(9, "CDToons diffClipRect: (%d, %d) to (%d, %d)\n",<br>
+                               diffClipRect.left, diffClipRect.top, diffClipRect.right, diffClipRect.bottom);<br>
+<br>
+                       debugN(5, "CDToons Diff: %d subentries\n", count);<br>
+                       for (uint i = 0; i < count; i++) {<br>
+                               CDToonsDiff diff;<br>
+<br>
+                               diff.rect = readRect(stream);<br>
+                               diff.size = stream->readUint32BE();<br>
+                               if (diff.size < 20)<br>
+                                       error("CDToons: Diff block size was %d, too small", diff.size);<br>
+<br>
+                               uint16 diffWidth = stream->readUint16BE();<br>
+                               uint16 diffHeight = stream->readUint16BE();<br>
+                               uint16 unknown16 = stream->readUint16BE();<br>
+                               uint16 unknown18 = stream->readUint16BE();<br>
+                               diff.size -= 8;<br>
+<br>
+                               if (diffWidth != diff.rect.width() || diffHeight != diff.rect.height())<br>
+                                       error("CDToons: Diff sizes didn't match");<br>
+                               debugN(5, "CDToons Diff: size %d, frame from (%d, %d) to (%d, %d), unknowns %04x, %04x\n",<br>
+                                       diff.size, diff.rect.left, diff.rect.top, diff.rect.right, diff.rect.bottom,<br>
+                                       unknown16, unknown18);<br>
+<br>
+                               diff.data = new byte[diff.size];<br>
+                               stream->read(diff.data, diff.size);<br>
+                               diffs.push_back(diff);<br>
+                       }<br>
+                       }<br>
+                       break;<br>
+               case MKTAG('X','F','r','m'):<br>
+                       {<br>
+                       debugN(5, "CDToons: XFrm\n");<br>
+                       if (!(flags & 0x10))<br>
+                               error("CDToons: useless XFrm?");<br>
+<br>
+                       if (xFrmBegin)<br>
+                               error("CDToons: duplicate XFrm");<br>
+                       xFrmBegin = stream->readByte();<br>
+                       xFrmCount = stream->readByte();<br>
+                       debugN(9, "CDToons XFrm: run %d actions from %d\n", xFrmCount, xFrmBegin - 1);<br>
+<br>
+                       // TODO: don't ignore (if xFrmCount is non-zero)<br>
+                       Common::Rect dirtyRectXFrm = readRect(stream);<br>
+                       debugN(9, "CDToons XFrm dirtyRect: (%d, %d) to (%d, %d)\n",<br>
+                               dirtyRectXFrm.left, dirtyRectXFrm.top, dirtyRectXFrm.right, dirtyRectXFrm.bottom);<br>
+<br>
+                       // always zero?<br>
+                       Common::Rect dirtyRect2XFrm = readRect(stream);<br>
+                       debugN(9, "CDToons XFrm dirtyRect2: (%d, %d) to (%d, %d)\n",<br>
+                               dirtyRect2XFrm.left, dirtyRect2XFrm.top, dirtyRect2XFrm.right, dirtyRect2XFrm.bottom);<br>
+                       }<br>
+                       break;<br>
+               case MKTAG('M','r','k','s'):<br>
+                       debugN(5, "CDToons: Mrks\n");<br>
+                       if (!(flags & 0x2))<br>
+                               error("CDToons: useless Mrks?");<br>
+<br>
+                       // TODO<br>
+                       warning("CDToons: encountered Mrks, not implemented yet");<br>
+                       break;<br>
+               case MKTAG('S','c','a','l'):<br>
+                       // TODO<br>
+                       warning("CDToons: encountered Scal, not implemented yet");<br>
+                       break;<br>
+               case MKTAG('W','r','M','p'):<br>
+                       warning("CDToons: encountered WrMp, ignoring");<br>
+                       break;<br>
+               case MKTAG('F','r','t','R'):<br>
+                       {<br>
+                       debugN(5, "CDToons: FrtR\n");<br>
+                       if (!(flags & 0x40))<br>
+                               error("CDToons: useless FrtR?");<br>
+<br>
+                       uint16 count = stream->readUint16BE();<br>
+                       debugN(9, "CDToons FrtR: %d dirty rectangles\n", count);<br>
+                       for (uint i = 0; i < count; i++) {<br>
+                               Common::Rect dirtyRectFrtR = readRect(stream);<br>
+                               debugN(9, "CDToons FrtR dirtyRect: (%d, %d) to (%d, %d)\n",<br>
+                                       dirtyRectFrtR.left, dirtyRectFrtR.top, dirtyRectFrtR.right, dirtyRectFrtR.bottom);<br>
+                       }<br>
+                       }<br>
+                       break;<br>
+               case MKTAG('B','c','k','R'):<br>
+                       {<br>
+                       debugN(5, "CDToons: BckR\n");<br>
+                       if (!(flags & 0x20))<br>
+                               error("CDToons: useless BckR?");<br>
+<br>
+                       uint16 count = stream->readUint16BE();<br>
+                       debugN(9, "CDToons BckR: %d subentries\n", count);<br>
+                       for (uint i = 0; i < count; i++) {<br>
+                               Common::Rect dirtyRectBckR = readRect(stream);<br>
+                               debugN(9, "CDToons BckR dirtyRect: (%d, %d) to (%d, %d)\n",<br>
+                                       dirtyRectBckR.left, dirtyRectBckR.top, dirtyRectBckR.right, dirtyRectBckR.bottom);<br>
+                       }<br>
+                       }<br>
+                       break;<br>
+               default:<br>
+                       warning("Unknown CDToons tag '%s'", tag2str(tag));<br>
+               }<br>
+<br>
+               if (stream->pos() > nextPos)<br>
+                       error("CDToons ran off the end of a block while reading it (at %d, next block at %d)",<br>
+                               stream->pos(), nextPos);<br>
+               if (stream->pos() != nextPos) {<br>
+                       warning("CDToons had %d unknown bytes after block", nextPos - stream->pos());<br>
+                       stream->seek(nextPos);<br>
+               }<br>
+<br>
+               if (stream->pos() == stream->size())<br>
+                       break;<br>
+       }<br>
+<br>
+       for (uint i = 0; i < diffs.size(); i++) {<br>
+               renderBlock(diffs[i].data, diffs[i].size, diffs[i].rect.left, diffs[i].rect.top, diffs[i].rect.width(), diffs[i].rect.height());<br>
+               delete[] diffs[i].data;<br>
+       }<br>
+       if (!diffs.empty())<br>
+               return _surface;<br>
+<br>
+       for (uint i = 0; i < actions.size(); i++) {<br>
+               CDToonsAction &action = actions[i];<br>
+               if (i == 0 && action.blockId == 0)<br>
+                       memset(_surface->getPixels(), backgroundColor, _surface->w * _surface->h);<br>
+               if (!_blocks.contains(action.blockId))<br>
+                       continue;<br>
+               if (!action.rect.right)<br>
+                       continue;<br>
+               if (i == 0 && !diffs.empty())<br>
+                       continue;<br>
+<br>
+               CDToonsBlock &block = _blocks[action.blockId];<br>
+               uint16 width = READ_BE_UINT16(block.data + 2);<br>
+               uint16 height = READ_BE_UINT16(block.data);<br>
+<br>
+               renderBlock(block.data + 14, block.size - 14, action.rect.left, action.rect.top, width, height);<br>
+       }<br>
+<br>
+       if (paletteId && _currentPaletteId != paletteId) {<br>
+               if (!_blocks.contains(paletteId))<br>
+                       error("CDToons: no block for palette %04x", paletteId);<br>
+               if (_blocks[paletteId].size != 2 * 3 * 256)<br>
+                       error("CDToons: palette %04x is wrong size (%d)", paletteId, _blocks[paletteId].size);<br>
+<br>
+               _currentPaletteId = paletteId;<br>
+               if (!paletteSet)<br>
+                       setPalette(_blocks[paletteId].data);<br>
+       }<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+void CDToonsDecoder::renderBlock(byte *data, uint dataSize, int destX, int destY, uint width, uint height) {<br>
+       byte *currData = data;<br>
+       byte *dataEnd = data + dataSize;<br>
+<br>
+       debugN(9, "CDToons renderBlock at (%d, %d), width %d, height %d\n",<br>
+               destX, destY, width, height);<br>
+<br>
+       if (destX + width > _surface->w)<br>
+               width = _surface->w - destX;<br>
+       if (destY + height > _surface->h)<br>
+               height = _surface->h - destY;<br>
+<br>
+       uint skip = 0;<br>
+       if (destX < 0) {<br>
+               skip = -destX;<br>
+               if (width <= skip)<br>
+                       return;<br>
+               width -= skip;<br>
+               destX = 0;<br>
+       }<br>
+<br>
+       for (uint y = 0; y < height; y++) {<br>
+               if (destY + (int)y >= _surface->h)<br>
+                       break;<br>
+<br>
+               if (currData + 2 > dataEnd)<br>
+                       error("CDToons renderBlock overran whole data by %d bytes", (uint32)(currData - dataEnd));<br>
+<br>
+               uint16 lineSize = READ_BE_UINT16(currData);<br>
+               currData += 2;<br>
+               byte *nextLine = currData + lineSize;<br>
+<br>
+               if (nextLine > dataEnd)<br>
+                       error("CDToons renderBlock was going to overrun data by %d bytes (line size %d)",<br>
+                               (uint32)(nextLine - dataEnd), (uint32)(nextLine - currData));<br>
+<br>
+               if (destY + (int)y < 0) {<br>
+                       currData = nextLine;<br>
+                       continue;<br>
+               }<br>
+<br>
+               byte *pixels = (byte *)_surface->getBasePtr(destX, destY + y);<br>
+<br>
+               int leftToSkip = skip;<br>
+               uint x = 0;<br>
+               bool done = false;<br>
+               while (x < width && !done) {<br>
+                       int size = (uint)*currData;<br>
+                       currData++;<br>
+                       bool raw = !(size & 0x80);<br>
+                       size = (size & 0x7f) + 1;<br>
+<br>
+                       if (leftToSkip) {<br>
+                               if (leftToSkip >= size) {<br>
+                                       leftToSkip -= size;<br>
+                                       if (raw)<br>
+                                               currData += size;<br>
+                                       else<br>
+                                               currData++;<br>
+                                       continue;<br>
+                               } else {<br>
+                                       size -= leftToSkip;<br>
+                                       if (raw)<br>
+                                               currData += leftToSkip;<br>
+                                       leftToSkip = 0;<br>
+                               }<br>
+                       }<br>
+<br>
+                       if (x + size >= width) {<br>
+                               size = width - x;<br>
+                               done = true;<br>
+                       }<br>
+                       if (destX + (int)x + size >= (int)_surface->w) {<br>
+                               size = MIN<int>((int)_surface->w - destX - (int)x, width - x);<br>
+                               done = true;<br>
+                       }<br>
+                       if (size <= 0) {<br>
+                               size = 0;<br>
+                               done = true;<br>
+                       }<br>
+<br>
+                       if (raw) {<br>
+                               memcpy(pixels + x, currData, size);<br>
+                               currData += size;<br>
+                               x += size;<br>
+                       } else {<br>
+                               byte color = *currData;<br>
+                               currData++;<br>
+                               if (color) {<br>
+                                       memset(pixels + x, color, size);<br>
+                               }<br>
+                               x += size;<br>
+                       }<br>
+<br>
+                       if (currData > nextLine) {<br>
+                               warning("CDToons renderBlock overran line by %d bytes", (uint32)(currData - nextLine));<br>
+                               return;<br>
+                       }<br>
+               }<br>
+<br>
+               currData = nextLine;<br>
+       }<br>
+}<br>
+<br>
+void CDToonsDecoder::setPalette(byte *data) {<br>
+       _dirtyPalette = true;<br>
+<br>
+       // A lovely QuickTime palette<br>
+       for (uint i = 0; i < 256; i++) {<br>
+               _palette[i * 3]     = *data;<br>
+               _palette[i * 3 + 1] = *(data + 2);<br>
+               _palette[i * 3 + 2] = *(data + 4);<br>
+               data += 6;<br>
+       }<br>
+<br>
+       _palette[0] = _palette[1] = _palette[2] = 0;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/cdtoons.h b/image/codecs/cdtoons.h<br>
new file mode 100644<br>
index 0000000..ac569b5<br>
--- /dev/null<br>
+++ b/image/codecs/cdtoons.h<br>
@@ -0,0 +1,72 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_CDTOONS_H<br>
+#define IMAGE_CODECS_CDTOONS_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+#include "common/hashmap.h"<br>
+<br>
+namespace Image {<br>
+<br>
+struct CDToonsBlock {<br>
+       uint16 flags;<br>
+       uint32 size;<br>
+       uint16 startFrame;<br>
+       uint16 endFrame;<br>
+       uint16 unknown12;<br>
+       byte *data;<br>
+};<br>
+<br>
+/**<br>
+ * Broderbund CDToons decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class CDToonsDecoder : public Codec {<br>
+public:<br>
+       CDToonsDecoder(uint16 width, uint16 height);<br>
+       ~CDToonsDecoder();<br>
+<br>
+       Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
+       bool containsPalette() const { return true; }<br>
+       const byte *getPalette() { _dirtyPalette = false; return _palette; }<br>
+       bool hasDirtyPalette() const { return _dirtyPalette; }<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+       byte _palette[256 * 3];<br>
+       bool _dirtyPalette;<br>
+       uint16 _currentPaletteId;<br>
+<br>
+       Common::HashMap<uint16, CDToonsBlock> _blocks;<br>
+<br>
+       void renderBlock(byte *data, uint size, int x, int y, uint width, uint height);<br>
+       void setPalette(byte *data);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp<br>
new file mode 100644<br>
index 0000000..6af7ab0<br>
--- /dev/null<br>
+++ b/image/codecs/cinepak.cpp<br>
@@ -0,0 +1,309 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/codecs/cinepak.h"<br>
+<br>
+#include "common/debug.h"<br>
+#include "common/stream.h"<br>
+#include "common/system.h"<br>
+#include "common/textconsole.h"<br>
+#include "common/util.h"<br>
+<br>
+#include "graphics/surface.h"<br>
+<br>
+// Code here partially based off of ffmpeg ;)<br>
+<br>
+namespace Image {<br>
+<br>
+#define PUT_PIXEL(offset, lum, u, v) \<br>
+       if (_pixelFormat.bytesPerPixel != 1) { \<br>
+               byte r = _clipTable[lum + (v << 1)]; \<br>
+               byte g = _clipTable[lum - (u >> 1) - v]; \<br>
+               byte b = _clipTable[lum + (u << 1)]; \<br>
+               \<br>
+               if (_pixelFormat.bytesPerPixel == 2) \<br>
+                       *((uint16 *)_curFrame.surface->getPixels() + offset) = _pixelFormat.RGBToColor(r, g, b); \<br>
+               else \<br>
+                       *((uint32 *)_curFrame.surface->getPixels() + offset) = _pixelFormat.RGBToColor(r, g, b); \<br>
+       } else \<br>
+               *((byte *)_curFrame.surface->getPixels() + offset) = lum<br>
+<br>
+CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() {<br>
+       _curFrame.surface = NULL;<br>
+       _curFrame.strips = NULL;<br>
+       _y = 0;<br>
+<br>
+       if (bitsPerPixel == 8)<br>
+               _pixelFormat = Graphics::PixelFormat::createFormatCLUT8();<br>
+       else<br>
+               _pixelFormat = g_system->getScreenFormat();<br>
+<br>
+       // Create a lookup for the clip function<br>
+       // This dramatically improves the performance of the color conversion<br>
+       _clipTableBuf = new byte[1024];<br>
+<br>
+       for (uint i = 0; i < 1024; i++) {<br>
+               if (i <= 512)<br>
+                       _clipTableBuf[i] = 0;<br>
+               else if (i >= 768)<br>
+                       _clipTableBuf[i] = 255;<br>
+               else<br>
+                       _clipTableBuf[i] = i - 512;<br>
+       }<br>
+<br>
+       _clipTable = _clipTableBuf + 512;<br>
+}<br>
+<br>
+CinepakDecoder::~CinepakDecoder() {<br>
+       if (_curFrame.surface) {<br>
+               _curFrame.surface->free();<br>
+               delete _curFrame.surface;<br>
+       }<br>
+<br>
+       delete[] _curFrame.strips;<br>
+       delete[] _clipTableBuf;<br>
+}<br>
+<br>
+const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       _curFrame.flags = stream->readByte();<br>
+       _curFrame.length = (stream->readByte() << 16);<br>
+       _curFrame.length |= stream->readUint16BE();<br>
+       _curFrame.width = stream->readUint16BE();<br>
+       _curFrame.height = stream->readUint16BE();<br>
+       _curFrame.stripCount = stream->readUint16BE();<br>
+<br>
+       if (_curFrame.strips == NULL)<br>
+               _curFrame.strips = new CinepakStrip[_curFrame.stripCount];<br>
+<br>
+       debug(4, "Cinepak Frame: Width = %d, Height = %d, Strip Count = %d", _curFrame.width, _curFrame.height, _curFrame.stripCount);<br>
+<br>
+       // Borrowed from FFMPEG. This should cut out the extra data Cinepak for Sega has (which is useless).<br>
+       // The theory behind this is that this is here to confuse standard Cinepak decoders. But, we won't let that happen! ;)<br>
+       if (_curFrame.length != (uint32)stream->size()) {<br>
+               if (stream->readUint16BE() == 0xFE00)<br>
+                       stream->readUint32BE();<br>
+               else if ((stream->size() % _curFrame.length) == 0)<br>
+                       stream->seek(-2, SEEK_CUR);<br>
+       }<br>
+<br>
+       if (!_curFrame.surface) {<br>
+               _curFrame.surface = new Graphics::Surface();<br>
+               _curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat);<br>
+       }<br>
+<br>
+       // Reset the y variable.<br>
+       _y = 0;<br>
+<br>
+       for (uint16 i = 0; i < _curFrame.stripCount; i++) {<br>
+               if (i > 0 && !(_curFrame.flags & 1)) { // Use codebooks from last strip<br>
+                       for (uint16 j = 0; j < 256; j++) {<br>
+                               _curFrame.strips[i].v1_codebook[j] = _curFrame.strips[i - 1].v1_codebook[j];<br>
+                               _curFrame.strips[i].v4_codebook[j] = _curFrame.strips[i - 1].v4_codebook[j];<br>
+                       }<br>
+               }<br>
+<br>
+               _curFrame.strips[i].id = stream->readUint16BE();<br>
+               _curFrame.strips[i].length = stream->readUint16BE() - 12; // Subtract the 12 byte header<br>
+               _curFrame.strips[i].rect.top = _y; stream->readUint16BE(); // Ignore, substitute with our own.<br>
+               _curFrame.strips[i].rect.left = 0; stream->readUint16BE(); // Ignore, substitute with our own<br>
+               _curFrame.strips[i].rect.bottom = _y + stream->readUint16BE();<br>
+               _curFrame.strips[i].rect.right = _curFrame.width; stream->readUint16BE(); // Ignore, substitute with our own<br>
+<br>
+               // Sanity check. Because Cinepak is based on 4x4 blocks, the width and height of each strip needs to be divisible by 4.<br>
+               assert(!(_curFrame.strips[i].rect.width() % 4) && !(_curFrame.strips[i].rect.height() % 4));<br>
+<br>
+               uint32 pos = stream->pos();<br>
+<br>
+               while ((uint32)stream->pos() < (pos + _curFrame.strips[i].length) && !stream->eos()) {<br>
+                       byte chunkID = stream->readByte();<br>
+<br>
+                       if (stream->eos())<br>
+                               break;<br>
+<br>
+                       // Chunk Size is 24-bit, ignore the first 4 bytes<br>
+                       uint32 chunkSize = stream->readByte() << 16;<br>
+                       chunkSize += stream->readUint16BE() - 4;<br>
+<br>
+                       int32 startPos = stream->pos();<br>
+<br>
+                       switch (chunkID) {<br>
+                       case 0x20:<br>
+                       case 0x21:<br>
+                       case 0x24:<br>
+                       case 0x25:<br>
+                               loadCodebook(stream, i, 4, chunkID, chunkSize);<br>
+                               break;<br>
+                       case 0x22:<br>
+                       case 0x23:<br>
+                       case 0x26:<br>
+                       case 0x27:<br>
+                               loadCodebook(stream, i, 1, chunkID, chunkSize);<br>
+                               break;<br>
+                       case 0x30:<br>
+                       case 0x31:<br>
+                       case 0x32:<br>
+                               decodeVectors(stream, i, chunkID, chunkSize);<br>
+                               break;<br>
+                       default:<br>
+                               warning("Unknown Cinepak chunk ID %02x", chunkID);<br>
+                               return _curFrame.surface;<br>
+                       }<br>
+<br>
+                       if (stream->pos() != startPos + (int32)chunkSize)<br>
+                               stream->seek(startPos + chunkSize);<br>
+               }<br>
+<br>
+               _y = _curFrame.strips[i].rect.bottom;<br>
+       }<br>
+<br>
+       return _curFrame.surface;<br>
+}<br>
+<br>
+void CinepakDecoder::loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize) {<br>
+       CinepakCodebook *codebook = (codebookType == 1) ? _curFrame.strips[strip].v1_codebook : _curFrame.strips[strip].v4_codebook;<br>
+<br>
+       int32 startPos = stream->pos();<br>
+       uint32 flag = 0, mask = 0;<br>
+<br>
+       for (uint16 i = 0; i < 256; i++) {<br>
+               if ((chunkID & 0x01) && !(mask >>= 1)) {<br>
+                       if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                               break;<br>
+<br>
+                       flag  = stream->readUint32BE();<br>
+                       mask  = 0x80000000;<br>
+               }<br>
+<br>
+               if (!(chunkID & 0x01) || (flag & mask)) {<br>
+                       byte n = (chunkID & 0x04) ? 4 : 6;<br>
+                       if ((stream->pos() - startPos + n) > (int32)chunkSize)<br>
+                               break;<br>
+<br>
+                       for (byte j = 0; j < 4; j++)<br>
+                               codebook[i].y[j] = stream->readByte();<br>
+<br>
+                       if (n == 6) {<br>
+                               codebook[i].u = stream->readSByte();<br>
+                               codebook[i].v = stream->readSByte();<br>
+                       } else {<br>
+                               // This codebook type indicates either greyscale or<br>
+                               // palettized video. For greyscale, default us to<br>
+                               // 0 for both u and v.<br>
+                               codebook[i].u = 0;<br>
+                               codebook[i].v = 0;<br>
+                       }<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize) {<br>
+       uint32 flag = 0, mask = 0;<br>
+       uint32 iy[4];<br>
+       int32 startPos = stream->pos();<br>
+<br>
+       for (uint16 y = _curFrame.strips[strip].rect.top; y < _curFrame.strips[strip].rect.bottom; y += 4) {<br>
+               iy[0] = _curFrame.strips[strip].rect.left + y * _curFrame.width;<br>
+               iy[1] = iy[0] + _curFrame.width;<br>
+               iy[2] = iy[1] + _curFrame.width;<br>
+               iy[3] = iy[2] + _curFrame.width;<br>
+<br>
+               for (uint16 x = _curFrame.strips[strip].rect.left; x < _curFrame.strips[strip].rect.right; x += 4) {<br>
+                       if ((chunkID & 0x01) && !(mask >>= 1)) {<br>
+                               if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                                       return;<br>
+<br>
+                               flag  = stream->readUint32BE();<br>
+                               mask  = 0x80000000;<br>
+                       }<br>
+<br>
+                       if (!(chunkID & 0x01) || (flag & mask)) {<br>
+                               if (!(chunkID & 0x02) && !(mask >>= 1)) {<br>
+                                       if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                                               return;<br>
+<br>
+                                       flag  = stream->readUint32BE();<br>
+                                       mask  = 0x80000000;<br>
+                               }<br>
+<br>
+                               if ((chunkID & 0x02) || (~flag & mask)) {<br>
+                                       if ((stream->pos() - startPos + 1) > (int32)chunkSize)<br>
+                                               return;<br>
+<br>
+                                       // Get the codebook<br>
+                                       CinepakCodebook codebook = _curFrame.strips[strip].v1_codebook[stream->readByte()];<br>
+<br>
+                                       PUT_PIXEL(iy[0] + 0, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[0] + 1, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 0, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 1, codebook.y[0], codebook.u, codebook.v);<br>
+<br>
+                                       PUT_PIXEL(iy[0] + 2, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[0] + 3, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 2, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 3, codebook.y[1], codebook.u, codebook.v);<br>
+<br>
+                                       PUT_PIXEL(iy[2] + 0, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[2] + 1, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 0, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 1, codebook.y[2], codebook.u, codebook.v);<br>
+<br>
+                                       PUT_PIXEL(iy[2] + 2, codebook.y[3], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[2] + 3, codebook.y[3], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 2, codebook.y[3], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 3, codebook.y[3], codebook.u, codebook.v);<br>
+                               } else if (flag & mask) {<br>
+                                       if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                                               return;<br>
+<br>
+                                       CinepakCodebook codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       PUT_PIXEL(iy[0] + 0, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[0] + 1, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 0, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 1, codebook.y[3], codebook.u, codebook.v);<br>
+<br>
+                                       codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       PUT_PIXEL(iy[0] + 2, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[0] + 3, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 2, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[1] + 3, codebook.y[3], codebook.u, codebook.v);<br>
+<br>
+                                       codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       PUT_PIXEL(iy[2] + 0, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[2] + 1, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 0, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 1, codebook.y[3], codebook.u, codebook.v);<br>
+<br>
+                                       codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       PUT_PIXEL(iy[2] + 2, codebook.y[0], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[2] + 3, codebook.y[1], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 2, codebook.y[2], codebook.u, codebook.v);<br>
+                                       PUT_PIXEL(iy[3] + 3, codebook.y[3], codebook.u, codebook.v);<br>
+                               }<br>
+                       }<br>
+<br>
+                       for (byte i = 0; i < 4; i++)<br>
+                               iy[i] += 4;<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/cinepak.h b/image/codecs/cinepak.h<br>
new file mode 100644<br>
index 0000000..99a316e<br>
--- /dev/null<br>
+++ b/image/codecs/cinepak.h<br>
@@ -0,0 +1,89 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_CINEPAK_H<br>
+#define IMAGE_CODECS_CINEPAK_H<br>
+<br>
+#include "common/scummsys.h"<br>
+#include "common/rect.h"<br>
+#include "graphics/pixelformat.h"<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+struct CinepakCodebook {<br>
+       // These are not in the normal YUV colorspace, but in the Cinepak YUV colorspace instead.<br>
+       byte y[4]; // [0, 255]<br>
+       int8 u, v; // [-128, 127]<br>
+};<br>
+<br>
+struct CinepakStrip {<br>
+       uint16 id;<br>
+       uint16 length;<br>
+       Common::Rect rect;<br>
+       CinepakCodebook v1_codebook[256], v4_codebook[256];<br>
+};<br>
+<br>
+struct CinepakFrame {<br>
+       byte flags;<br>
+       uint32 length;<br>
+       uint16 width;<br>
+       uint16 height;<br>
+       uint16 stripCount;<br>
+       CinepakStrip *strips;<br>
+<br>
+       Graphics::Surface *surface;<br>
+};<br>
+<br>
+/**<br>
+ * Cinepak decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - AVIDecoder<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class CinepakDecoder : public Codec {<br>
+public:<br>
+       CinepakDecoder(int bitsPerPixel = 24);<br>
+       ~CinepakDecoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
+<br>
+private:<br>
+       CinepakFrame _curFrame;<br>
+       int32 _y;<br>
+       Graphics::PixelFormat _pixelFormat;<br>
+       byte *_clipTable, *_clipTableBuf;<br>
+<br>
+       void loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);<br>
+       void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/codec.h b/image/codecs/codec.h<br>
new file mode 100644<br>
index 0000000..c84f3e3<br>
--- /dev/null<br>
+++ b/image/codecs/codec.h<br>
@@ -0,0 +1,82 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_CODEC_H<br>
+#define IMAGE_CODECS_CODEC_H<br>
+<br>
+#include "graphics/surface.h"<br>
+#include "graphics/pixelformat.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * An abstract representation of a video codec used for decoding<br>
+ * video frames.<br>
+ *<br>
+ * Used in video:<br>
+ *  - AVIDecoder<br>
+ *  - QuickTimeDecoder<br>
+ *  - VMDDecoder<br>
+ */<br>
+class Codec {<br>
+public:<br>
+       Codec() {}<br>
+       virtual ~Codec() {}<br>
+<br>
+       /**<br>
+        * Decode the frame for the given data and return a pointer to a surface<br>
+        * containing the decoded frame.<br>
+        *<br>
+        * @return a pointer to the decoded frame<br>
+        * @note stream is not deleted<br>
+        */<br>
+       virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;<br>
+<br>
+       /**<br>
+        * Get the format that the surface returned from decodeImage() will<br>
+        * be in.<br>
+        */<br>
+       virtual Graphics::PixelFormat getPixelFormat() const = 0;<br>
+<br>
+       /**<br>
+        * Can this codec's frames contain a palette?<br>
+        */<br>
+       virtual bool containsPalette() const { return false; }<br>
+<br>
+       /**<br>
+        * Get the palette last decoded from decodeImage<br>
+        */<br>
+       virtual const byte *getPalette() { return 0; }<br>
+<br>
+       /**<br>
+        * Does the codec have a dirty palette?<br>
+        */<br>
+       virtual bool hasDirtyPalette() const { return false; }<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/indeo3.cpp b/image/codecs/indeo3.cpp<br>
new file mode 100644<br>
index 0000000..77bcec0<br>
--- /dev/null<br>
+++ b/image/codecs/indeo3.cpp<br>
@@ -0,0 +1,3487 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "common/scummsys.h"<br>
+<br>
+/* Intel Indeo 3 decompressor, derived from ffmpeg.<br>
+ *<br>
+ * Original copyright note: * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg<br>
+ * written, produced, and directed by Alan Smithee<br>
+ */<br>
+<br>
+#include "common/system.h"<br>
+#include "common/endian.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "common/util.h"<br>
+<br>
+#include "graphics/yuv_to_rgb.h"<br>
+<br>
+#include "image/codecs/indeo3.h"<br>
+<br>
+namespace Image {<br>
+<br>
+Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _corrector_type(0) {<br>
+       _iv_frame[0].the_buf = 0;<br>
+       _iv_frame[1].the_buf = 0;<br>
+<br>
+       _pixelFormat = g_system->getScreenFormat();<br>
+<br>
+       _surface = new Graphics::Surface;<br>
+       _surface->create(width, height, _pixelFormat);<br>
+<br>
+       buildModPred();<br>
+       allocFrames();<br>
+}<br>
+<br>
+Indeo3Decoder::~Indeo3Decoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+<br>
+       delete[] _iv_frame[0].the_buf;<br>
+       delete[] _ModPred;<br>
+       delete[] _corrector_type;<br>
+}<br>
+<br>
+Graphics::PixelFormat Indeo3Decoder::getPixelFormat() const {<br>
+       return _pixelFormat;<br>
+}<br>
+<br>
+bool Indeo3Decoder::isIndeo3(Common::SeekableReadStream &stream) {<br>
+       // Less than 16 bytes? This can't be right<br>
+       if (stream.size() < 16)<br>
+               return false;<br>
+<br>
+       uint32 id0 = stream.readUint32LE();<br>
+       uint32 id1 = stream.readUint32LE();<br>
+       uint32 id2 = stream.readUint32LE();<br>
+       uint32 id3 = stream.readUint32LE();<br>
+<br>
+       // Unknown, but according to the docs, always 0<br>
+       if (id1 != 0)<br>
+               return false;<br>
+<br>
+       // These 4 uint32s XOR'd need to spell "FRMH"<br>
+       if ((id0 ^ id1 ^ id2 ^ id3) != MKTAG('F','R','M','H'))<br>
+               return false;<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+void Indeo3Decoder::buildModPred() {<br>
+       _ModPred = new byte[8 * 128];<br>
+<br>
+       for (int i = 0; i < 128; i++) {<br>
+               _ModPred[i+0*128] = (i > 126) ? 254 : 2*((i + 1) - ((i + 1) % 2));<br>
+               _ModPred[i+1*128] = (i == 7)  ?  20 : ((i == 119 || i == 120)<br>
+                                             ? 236 : 2*((i + 2) - ((i + 1) % 3)));<br>
+               _ModPred[i+2*128] = (i > 125) ? 248 : 2*((i + 2) - ((i + 2) % 4));<br>
+               _ModPred[i+3*128] =                   2*((i + 1) - ((i - 3) % 5));<br>
+               _ModPred[i+4*128] = (i == 8)  ?  20 : 2*((i + 1) - ((i - 3) % 6));<br>
+               _ModPred[i+5*128] =                   2*((i + 4) - ((i + 3) % 7));<br>
+               _ModPred[i+6*128] = (i > 123) ? 240 : 2*((i + 4) - ((i + 4) % 8));<br>
+               _ModPred[i+7*128] =                   2*((i + 5) - ((i + 4) % 9));<br>
+       }<br>
+<br>
+       _corrector_type = new uint16[24 * 256];<br>
+<br>
+       for (int i = 0; i < 24; i++) {<br>
+               for (int j = 0; j < 256; j++) {<br>
+                       _corrector_type[i*256+j] =<br>
+                                (j < _corrector_type_0[i])         ? 1 :<br>
+                         ((j < 248 || (i == 16 && j == 248)) ? 0 :<br>
+                         _corrector_type_2[j - 248]);<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+void Indeo3Decoder::allocFrames() {<br>
+       int32 luma_width   = (_surface->w + 3) & (~3);<br>
+       int32 luma_height  = (_surface->h + 3) & (~3);<br>
+<br>
+       int32 chroma_width  = ((luma_width  >> 2) + 3) & (~3);<br>
+       int32 chroma_height = ((luma_height >> 2) + 3) & (~3);<br>
+<br>
+       int32 luma_pixels = luma_width * luma_height;<br>
+       int32 chroma_pixels = chroma_width * chroma_height;<br>
+<br>
+       uint32 bufsize = luma_pixels * 2 + luma_width * 3 +<br>
+               (chroma_pixels + chroma_width) * 4;<br>
+<br>
+       _iv_frame[0].y_w  = _iv_frame[1].y_w  = luma_width;<br>
+       _iv_frame[0].y_h  = _iv_frame[1].y_h  = luma_height;<br>
+       _iv_frame[0].uv_w = _iv_frame[1].uv_w = chroma_width;<br>
+       _iv_frame[0].uv_h = _iv_frame[1].uv_h = chroma_height;<br>
+<br>
+       _iv_frame[0].the_buf_size = bufsize;<br>
+       _iv_frame[1].the_buf_size = 0;<br>
+<br>
+       _iv_frame[0].the_buf = new byte[bufsize];<br>
+       memset(_iv_frame[0].the_buf, 0, bufsize);<br>
+       _iv_frame[1].the_buf = 0;<br>
+<br>
+       uint32 offs = 0;<br>
+<br>
+       _iv_frame[0].Ybuf = _iv_frame[0].the_buf + luma_width;<br>
+       offs += luma_pixels + luma_width * 2;<br>
+       _iv_frame[1].Ybuf = _iv_frame[0].the_buf + offs;<br>
+       offs += (luma_pixels + luma_width);<br>
+       _iv_frame[0].Ubuf = _iv_frame[0].the_buf + offs;<br>
+       offs += (chroma_pixels + chroma_width);<br>
+       _iv_frame[1].Ubuf = _iv_frame[0].the_buf + offs;<br>
+       offs += (chroma_pixels + chroma_width);<br>
+       _iv_frame[0].Vbuf = _iv_frame[0].the_buf + offs;<br>
+       offs += (chroma_pixels + chroma_width);<br>
+       _iv_frame[1].Vbuf = _iv_frame[0].the_buf + offs;<br>
+<br>
+       for (int i = 1; i <= luma_width; i++)<br>
+               _iv_frame[0].Ybuf[-i] = _iv_frame[1].Ybuf[-i] =<br>
+                       _iv_frame[0].Ubuf[-i] = 0x80;<br>
+<br>
+       for (int i = 1; i <= chroma_width; i++) {<br>
+               _iv_frame[1].Ubuf[-i] = 0x80;<br>
+               _iv_frame[0].Vbuf[-i] = 0x80;<br>
+               _iv_frame[1].Vbuf[-i] = 0x80;<br>
+               _iv_frame[1].Vbuf[chroma_pixels+i-1] = 0x80;<br>
+       }<br>
+}<br>
+<br>
+const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       // Not Indeo 3? Fail<br>
+       if (!isIndeo3(*stream))<br>
+               return 0;<br>
+<br>
+       stream->seek(12);<br>
+       uint32 frameDataLen = stream->readUint32LE();<br>
+<br>
+       // Less data than the frame should have? Fail<br>
+       if (stream->size() < (int)(frameDataLen - 16))<br>
+               return 0;<br>
+<br>
+       stream->seek(16); // Behind header<br>
+       stream->skip(2);  // Unknown<br>
+<br>
+       uint16 flags1 = stream->readUint16LE();<br>
+       uint32 flags3 = stream->readUint32LE();<br>
+       uint8  flags2 = stream->readByte();<br>
+<br>
+       // Finding the reference frame<br>
+       if (flags1 & 0x200) {<br>
+               _cur_frame = _iv_frame + 1;<br>
+               _ref_frame = _iv_frame;<br>
+       } else {<br>
+               _cur_frame = _iv_frame;<br>
+               _ref_frame = _iv_frame + 1;<br>
+       }<br>
+<br>
+       if (flags3 == 0x80)<br>
+               return _surface;<br>
+<br>
+       stream->skip(3);<br>
+<br>
+       uint16 fHeight = stream->readUint16LE();<br>
+       uint16 fWidth  = stream->readUint16LE();<br>
+<br>
+       uint32 chromaHeight = ((fHeight >> 2) + 3) & 0x7FFC;<br>
+       uint32 chromaWidth  = ((fWidth  >> 2) + 3) & 0x7FFC;<br>
+<br>
+       uint32 offs;<br>
+       uint32 offsY = stream->readUint32LE() + 16;<br>
+       uint32 offsU = stream->readUint32LE() + 16;<br>
+       uint32 offsV = stream->readUint32LE() + 16;<br>
+<br>
+       stream->skip(4);<br>
+<br>
+       uint32 hPos = stream->pos();<br>
+<br>
+       if (offsY < hPos) {<br>
+               warning("Indeo3Decoder::decodeImage: offsY < hPos");<br>
+               return 0;<br>
+       }<br>
+       if (offsU < hPos) {<br>
+               warning("Indeo3Decoder::decodeImage: offsY < hPos");<br>
+               return 0;<br>
+       }<br>
+       if (offsV < hPos) {<br>
+               warning("Indeo3Decoder::decodeImage: offsY < hPos");<br>
+               return 0;<br>
+       }<br>
+<br>
+       uint32 dataSize = stream->size() - hPos;<br>
+<br>
+       byte *inData = new byte[dataSize];<br>
+<br>
+       if (stream->read(inData, dataSize) != dataSize) {<br>
+               delete[] inData;<br>
+               return 0;<br>
+       }<br>
+<br>
+       byte *hdr_pos = inData;<br>
+       byte *buf_pos;<br>
+<br>
+       // Luminance Y<br>
+       stream->seek(offsY);<br>
+       buf_pos = inData + offsY + 4 - hPos;<br>
+       offs = stream->readUint32LE();<br>
+       decodeChunk(_cur_frame->Ybuf, _ref_frame->Ybuf, fWidth, fHeight,<br>
+                       buf_pos + offs * 2, flags2, hdr_pos, buf_pos, MIN<int>(fWidth, 160));<br>
+<br>
+       // Chrominance U<br>
+       stream->seek(offsU);<br>
+       buf_pos = inData + offsU + 4 - hPos;<br>
+       offs = stream->readUint32LE();<br>
+       decodeChunk(_cur_frame->Vbuf, _ref_frame->Vbuf, chromaWidth, chromaHeight,<br>
+                       buf_pos + offs * 2, flags2, hdr_pos, buf_pos, MIN<int>(chromaWidth, 40));<br>
+<br>
+       // Chrominance V<br>
+       stream->seek(offsV);<br>
+       buf_pos = inData + offsV + 4 - hPos;<br>
+       offs = stream->readUint32LE();<br>
+       decodeChunk(_cur_frame->Ubuf, _ref_frame->Ubuf, chromaWidth, chromaHeight,<br>
+                       buf_pos + offs * 2, flags2, hdr_pos, buf_pos, MIN<int>(chromaWidth, 40));<br>
+<br>
+       delete[] inData;<br>
+<br>
+       const byte *srcY = _cur_frame->Ybuf;<br>
+       const byte *srcU = _cur_frame->Ubuf;<br>
+       const byte *srcV = _cur_frame->Vbuf;<br>
+<br>
+       // Create buffers for U/V with an extra row/column copied from the second-to-last<br>
+       // row/column.<br>
+       byte *tempU = new byte[(chromaWidth + 1) * (chromaHeight + 1)];<br>
+       byte *tempV = new byte[(chromaWidth + 1) * (chromaHeight + 1)];<br>
+<br>
+       for (uint i = 0; i < chromaHeight; i++) {<br>
+               memcpy(tempU + (chromaWidth + 1) * i, srcU + chromaWidth * i, chromaWidth);<br>
+               memcpy(tempV + (chromaWidth + 1) * i, srcV + chromaWidth * i, chromaWidth);<br>
+               tempU[(chromaWidth + 1) * i + chromaWidth] = srcU[chromaWidth * (i + 1) - 1];<br>
+               tempV[(chromaWidth + 1) * i + chromaWidth] = srcV[chromaWidth * (i + 1) - 1];<br>
+       }<br>
+<br>
+       memcpy(tempU + (chromaWidth + 1) * chromaHeight, tempU + (chromaWidth + 1) * (chromaHeight - 1),<br>
+                       chromaWidth + 1);<br>
+       memcpy(tempV + (chromaWidth + 1) * chromaHeight, tempV + (chromaWidth + 1) * (chromaHeight - 1),<br>
+                       chromaWidth + 1);<br>
+<br>
+       // Blit the frame onto the surface<br>
+       uint32 scaleWidth  = _surface->w / fWidth;<br>
+       uint32 scaleHeight = _surface->h / fHeight;<br>
+<br>
+       if (scaleWidth == 1 && scaleHeight == 1) {<br>
+               // Shortcut: Don't need to scale so we can decode straight to the surface<br>
+               YUVToRGBMan.convert410(_surface, Graphics::YUVToRGBManager::kScaleITU, srcY, tempU, tempV,<br>
+                               fWidth, fHeight, fWidth, chromaWidth + 1);<br>
+       } else {<br>
+               // Need to upscale, so decode to a temp surface first<br>
+               Graphics::Surface tempSurface;<br>
+               tempSurface.create(fWidth, fHeight, _surface->format);<br>
+<br>
+               YUVToRGBMan.convert410(&tempSurface, Graphics::YUVToRGBManager::kScaleITU, srcY, tempU, tempV,<br>
+                               fWidth, fHeight, fWidth, chromaWidth + 1);<br>
+<br>
+               // Upscale<br>
+               for (int y = 0; y < _surface->h; y++) {<br>
+                       for (int x = 0; x < _surface->w; x++) {<br>
+                               if (_surface->format.bytesPerPixel == 1)<br>
+                                       *((byte *)_surface->getBasePtr(x, y)) = *((byte *)tempSurface.getBasePtr(x / scaleWidth, y / scaleHeight));<br>
+                               else if (_surface->format.bytesPerPixel == 2)<br>
+                                       *((uint16 *)_surface->getBasePtr(x, y)) = *((uint16 *)tempSurface.getBasePtr(x / scaleWidth, y / scaleHeight));<br>
+                               else if (_surface->format.bytesPerPixel == 4)<br>
+                                       *((uint32 *)_surface->getBasePtr(x, y)) = *((uint32 *)tempSurface.getBasePtr(x / scaleWidth, y / scaleHeight));<br>
+                       }<br>
+               }<br>
+<br>
+               tempSurface.free();<br>
+       }<br>
+<br>
+       delete[] tempU;<br>
+       delete[] tempV;<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+typedef struct {<br>
+       int32 xpos;<br>
+       int32 ypos;<br>
+       int32 width;<br>
+       int32 height;<br>
+       int32 split_flag;<br>
+       int32 split_direction;<br>
+       int32 usl7;<br>
+} ustr_t;<br>
+<br>
+/* ---------------------------------------------------------------------- */<br>
+<br>
+#define LV1_CHECK(buf1,rle_v3,lv1,lp2)  \<br>
+       if ((lv1 & 0x80) != 0) {   \<br>
+               if (rle_v3 != 0)         \<br>
+                       rle_v3 = 0;           \<br>
+               else {                  \<br>
+                       rle_v3 = 1;           \<br>
+                       buf1 -= 2;            \<br>
+               }                       \<br>
+       }                         \<br>
+       lp2 = 4;<br>
+<br>
+<br>
+#define RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)  \<br>
+       if (rle_v3 == 0) {         \<br>
+               rle_v2 = *buf1;         \<br>
+               rle_v1 = 1;             \<br>
+               if (rle_v2 > 32) {       \<br>
+                       rle_v2 -= 32;         \<br>
+                       rle_v1 = 0;           \<br>
+               }                       \<br>
+               rle_v3 = 1;             \<br>
+       }                         \<br>
+       buf1--;<br>
+<br>
+<br>
+#define LP2_CHECK(buf1,rle_v3,lp2)  \<br>
+       if (lp2 == 0 && rle_v3 != 0)     \<br>
+               rle_v3 = 0;           \<br>
+       else {                  \<br>
+               buf1--;               \<br>
+               rle_v3 = 1;           \<br>
+       }<br>
+<br>
+<br>
+#define RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) \<br>
+       rle_v2--;             \<br>
+       if (rle_v2 == 0) {     \<br>
+               rle_v3 = 0;         \<br>
+               buf1 += 2;          \<br>
+       }                     \<br>
+       lp2 = 4;<br>
+<br>
+void Indeo3Decoder::decodeChunk(byte *cur, byte *ref, int width, int height,<br>
+               const byte *buf1, uint32 fflags2, const byte *hdr,<br>
+               const byte *buf2, int min_width_160) {<br>
+<br>
+       byte bit_buf;<br>
+       uint32 bit_pos, lv, lv1, lv2;<br>
+       int32 *width_tbl, width_tbl_arr[10];<br>
+       const int8 *ref_vectors;<br>
+       byte *cur_frm_pos, *ref_frm_pos, *cp, *cp2;<br>
+       uint32 *cur_lp, *ref_lp;<br>
+       const uint32 *correction_lp[2], *correctionloworder_lp[2], *correctionhighorder_lp[2];<br>
+       uint16 *correction_type_sp[2];<br>
+       ustr_t strip_tbl[20], *strip;<br>
+       int i, j, k, lp1, lp2, flag1, cmd;<br>
+       int blks_width, blks_height, region_160_width;<br>
+       int rle_v1, rle_v2, rle_v3;<br>
+       uint16 res;<br>
+<br>
+       bit_buf = 0;<br>
+       ref_vectors = NULL;<br>
+<br>
+       width_tbl = width_tbl_arr + 1;<br>
+       i = (width < 0 ? width + 3 : width)/4;<br>
+       for (j = -1; j < 8; j++)<br>
+               width_tbl[j] = i * j;<br>
+<br>
+       strip = strip_tbl;<br>
+<br>
+       for (region_160_width = 0; region_160_width < (width - min_width_160); region_160_width += min_width_160)<br>
+               ;<br>
+<br>
+       strip->ypos = strip->xpos = 0;<br>
+       for (strip->width = min_width_160; width > strip->width; strip->width *= 2)<br>
+               ;<br>
+       strip->height = height;<br>
+       strip->split_direction = 0;<br>
+       strip->split_flag = 0;<br>
+       strip->usl7 = 0;<br>
+<br>
+       bit_pos = 0;<br>
+<br>
+       rle_v1 = rle_v2 = rle_v3 = 0;<br>
+<br>
+       while (strip >= strip_tbl) {<br>
+               if (bit_pos <= 0) {<br>
+                       bit_pos = 8;<br>
+                       bit_buf = *buf1++;<br>
+               }<br>
+<br>
+               bit_pos -= 2;<br>
+               cmd = (bit_buf >> bit_pos) & 0x03;<br>
+<br>
+               if (cmd == 0) {<br>
+                       strip++;<br>
+                       memcpy(strip, strip-1, sizeof(ustr_t));<br>
+                       strip->split_flag = 1;<br>
+                       strip->split_direction = 0;<br>
+                       strip->height = (strip->height > 8 ? ((strip->height+8)>>4)<<3 : 4);<br>
+                       continue;<br>
+               } else if (cmd == 1) {<br>
+                       strip++;<br>
+                       memcpy(strip, strip-1, sizeof(ustr_t));<br>
+                       strip->split_flag = 1;<br>
+                       strip->split_direction = 1;<br>
+                       strip->width = (strip->width > 8 ? ((strip->width+8)>>4)<<3 : 4);<br>
+                       continue;<br>
+               } else if (cmd == 2) {<br>
+                       if (strip->usl7 == 0) {<br>
+                               strip->usl7 = 1;<br>
+                               ref_vectors = NULL;<br>
+                               continue;<br>
+                       }<br>
+               } else if (cmd == 3) {<br>
+                       if (strip->usl7 == 0) {<br>
+                               strip->usl7 = 1;<br>
+                               ref_vectors = (const signed char*)buf2 + (*buf1 * 2);<br>
+                               buf1++;<br>
+                               continue;<br>
+                       }<br>
+               }<br>
+<br>
+               cur_frm_pos = cur + width * strip->ypos + strip->xpos;<br>
+<br>
+               if ((blks_width = strip->width) < 0)<br>
+                       blks_width += 3;<br>
+               blks_width >>= 2;<br>
+               blks_height = strip->height;<br>
+<br>
+               if (ref_vectors != NULL) {<br>
+                       ref_frm_pos = ref + (ref_vectors[0] + strip->ypos) * width +<br>
+                               ref_vectors[1] + strip->xpos;<br>
+               } else<br>
+                       ref_frm_pos = cur_frm_pos - width_tbl[4];<br>
+<br>
+               if (cmd == 2) {<br>
+                       if (bit_pos <= 0) {<br>
+                               bit_pos = 8;<br>
+                               bit_buf = *buf1++;<br>
+                       }<br>
+<br>
+                       bit_pos -= 2;<br>
+                       cmd = (bit_buf >> bit_pos) & 0x03;<br>
+<br>
+                       if (cmd == 0 || ref_vectors != NULL) {<br>
+                               for (lp1 = 0; lp1 < blks_width; lp1++) {<br>
+                                       for (i = 0, j = 0; i < blks_height; i++, j += width_tbl[1])<br>
+                                               ((uint32 *)cur_frm_pos)[j] = ((uint32 *)ref_frm_pos)[j];<br>
+                                       cur_frm_pos += 4;<br>
+                                       ref_frm_pos += 4;<br>
+                               }<br>
+                       } else if (cmd != 1)<br>
+                               return;<br>
+               } else {<br>
+                       k = *buf1 >> 4;<br>
+                       j = *buf1 & 0x0f;<br>
+                       buf1++;<br>
+                       lv = j + fflags2;<br>
+<br>
+                       if ((lv - 8) <= 7 && (k == 0 || k == 3 || k == 10)) {<br>
+                               cp2 = _ModPred + ((lv - 8) << 7);<br>
+                               cp = ref_frm_pos;<br>
+                               for (i = 0; i < blks_width << 2; i++) {<br>
+                                               int v = *cp >> 1;<br>
+                                               *(cp++) = cp2[v];<br>
+                               }<br>
+                       }<br>
+<br>
+                       if (k == 1 || k == 4) {<br>
+                               lv = (hdr[j] & 0xf) + fflags2;<br>
+                               correction_type_sp[0] = _corrector_type + (lv << 8);<br>
+                               correction_lp[0] = correction + (lv << 8);<br>
+                               lv = (hdr[j] >> 4) + fflags2;<br>
+                               correction_lp[1] = correction + (lv << 8);<br>
+                               correction_type_sp[1] = _corrector_type + (lv << 8);<br>
+                       } else {<br>
+                               correctionloworder_lp[0] = correctionloworder_lp[1] = correctionloworder + (lv << 8);<br>
+                               correctionhighorder_lp[0] = correctionhighorder_lp[1] = correctionhighorder + (lv << 8);<br>
+                               correction_type_sp[0] = correction_type_sp[1] = _corrector_type + (lv << 8);<br>
+                               correction_lp[0] = correction_lp[1] = correction + (lv << 8);<br>
+                       }<br>
+<br>
+                       switch (k) {<br>
+                               case 1:<br>
+                               case 0:                    /********** CASE 0 **********/<br>
+                                       for ( ; blks_height > 0; blks_height -= 4) {<br>
+                                               for (lp1 = 0; lp1 < blks_width; lp1++) {<br>
+                                                       for (lp2 = 0; lp2 < 4; ) {<br>
+                                                               k = *buf1++;<br>
+                                                               cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2];<br>
+                                                               ref_lp = ((uint32 *)ref_frm_pos) + width_tbl[lp2];<br>
+<br>
+                                                               switch (correction_type_sp[0][k]) {<br>
+                                                                       case 0:<br>
+                                                                               *cur_lp = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                               lp2++;<br>
+                                                                               break;<br>
+                                                                       case 1:<br>
+                                                                               if (correction_type_sp[0][*buf1] != 1) {<br>
+                                                                                       // both correction types must be DYAD. If it's not the case<br>
+                                                                                       // we have an incorrect data and we should skip the rest.<br>
+                                                                                       // This occurs in some Urban Runner videos, and produced a glitch.<br>
+                                                                                       // The glitch is not visible anymore if we skip this part of the frame.<br>
+                                                                                       // The old Y values are then used.<br>
+                                                                                       // This is also the behavior of the codec in the original game.<br>
+                                                                                       //warning("Glitch");<br>
+                                                                                       return;<br>
+                                                                               }<br>
+                                                                               res = ((FROM_LE_16(((uint16 *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;<br>
+                                                                               ((uint16 *)cur_lp)[0] = FROM_LE_16(res);<br>
+                                                                               res = ((FROM_LE_16(((uint16 *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;<br>
+                                                                               ((uint16 *)cur_lp)[1] = FROM_LE_16(res);<br>
+                                                                               buf1++;<br>
+                                                                               lp2++;<br>
+                                                                               break;<br>
+                                                                       case 2:<br>
+                                                                               if (lp2 == 0) {<br>
+                                                                                       for (i = 0, j = 0; i < 2; i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+                                                                                       lp2 += 2;<br>
+                                                                               }<br>
+                                                                               break;<br>
+                                                                       case 3:<br>
+                                                                               if (lp2 < 2) {<br>
+                                                                                       for (i = 0, j = 0; i < (3 - lp2); i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+                                                                                       lp2 = 3;<br>
+                                                                               }<br>
+                                                                               break;<br>
+                                                                       case 8:<br>
+                                                                               if (lp2 == 0) {<br>
+                                                                                       RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)<br>
+<br>
+                                                                                       if (rle_v1 == 1 || ref_vectors != NULL) {<br>
+                                                                                               for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                                       cur_lp[j] = ref_lp[j];<br>
+                                                                                       }<br>
+<br>
+                                                                                       RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)<br>
+                                                                                       break;<br>
+                                                                               } else {<br>
+                                                                                       rle_v1 = 1;<br>
+                                                                                       rle_v2 = *buf1 - 1;<br>
+                                                                               }<br>
+                                                                       case 5:<br>
+                                                                                       LP2_CHECK(buf1,rle_v3,lp2)<br>
+                                                                       case 4:<br>
+                                                                               for (i = 0, j = 0; i < (4 - lp2); i++, j += width_tbl[1])<br>
+                                                                                       cur_lp[j] = ref_lp[j];<br>
+                                                                               lp2 = 4;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 7:<br>
+                                                                               if (rle_v3 != 0)<br>
+                                                                                       rle_v3 = 0;<br>
+                                                                               else {<br>
+                                                                                       buf1--;<br>
+                                                                                       rle_v3 = 1;<br>
+                                                                               }<br>
+                                                                       case 6:<br>
+                                                                               if (lp2 > 0) {<br>
+                                                                                       //This case can't happen either.<br>
+                                                                                       //If it occurs, it must happen on the first line.<br>
+                                                                                       //warning("Glitch");<br>
+                                                                                       return;<br>
+                                                                               }<br>
+                                                                               if (ref_vectors != NULL) {<br>
+                                                                                       for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+                                                                               }<br>
+                                                                               lp2 = 4;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 9:<br>
+                                                                               lv1 = *buf1++;<br>
+                                                                               lv = (lv1 & 0x7F) << 1;<br>
+                                                                               lv += (lv << 8);<br>
+                                                                               lv += (lv << 16);<br>
+                                                                               for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                       cur_lp[j] = lv;<br>
+<br>
+                                                                               LV1_CHECK(buf1,rle_v3,lv1,lp2)<br>
+                                                                               break;<br>
+                                                                       default:<br>
+                                                                               return;<br>
+                                                               }<br>
+                                                       }<br>
+<br>
+                                                       cur_frm_pos += 4;<br>
+                                                       ref_frm_pos += 4;<br>
+                                               }<br>
+<br>
+                                               cur_frm_pos += ((width - blks_width) * 4);<br>
+                                               ref_frm_pos += ((width - blks_width) * 4);<br>
+                                       }<br>
+                                       break;<br>
+<br>
+                               case 4:<br>
+                               case 3:                    /********** CASE 3 **********/<br>
+                                       if (ref_vectors != NULL)<br>
+                                               return;<br>
+                                       flag1 = 1;<br>
+<br>
+                                       for ( ; blks_height > 0; blks_height -= 8) {<br>
+                                               for (lp1 = 0; lp1 < blks_width; lp1++) {<br>
+                                                       for (lp2 = 0; lp2 < 4; ) {<br>
+                                                               k = *buf1++;<br>
+<br>
+                                                               cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];<br>
+                                                               ref_lp = ((uint32 *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];<br>
+<br>
+                                                               switch (correction_type_sp[lp2 & 0x01][k]) {<br>
+                                                                       case 0:<br>
+                                                                               cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                               if (lp2 > 0 || flag1 == 0 || strip->ypos != 0)<br>
+                                                                                       cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                               else<br>
+                                                                                       cur_lp[0] = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                               lp2++;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 1:<br>
+                                                                               res = ((FROM_LE_16(((uint16 *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;<br>
+                                                                               ((uint16 *)cur_lp)[width_tbl[2]] = FROM_LE_16(res);<br>
+                                                                               res = ((FROM_LE_16(((uint16 *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;<br>
+                                                                               ((uint16 *)cur_lp)[width_tbl[2]+1] = FROM_LE_16(res);<br>
+<br>
+                                                                               if (lp2 > 0 || flag1 == 0 || strip->ypos != 0)<br>
+                                                                                       cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                               else<br>
+                                                                                       cur_lp[0] = cur_lp[width_tbl[1]];<br>
+                                                                               buf1++;<br>
+                                                                               lp2++;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 2:<br>
+                                                                               if (lp2 == 0) {<br>
+                                                                                       for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = *ref_lp;<br>
+                                                                                       lp2 += 2;<br>
+                                                                               }<br>
+                                                                               break;<br>
+<br>
+                                                                       case 3:<br>
+                                                                               if (lp2 < 2) {<br>
+                                                                                       for (i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = *ref_lp;<br>
+                                                                                       lp2 = 3;<br>
+                                                                               }<br>
+                                                                               break;<br>
+<br>
+                                                                       case 6:<br>
+                                                                               lp2 = 4;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 7:<br>
+                                                                               if (rle_v3 != 0)<br>
+                                                                                       rle_v3 = 0;<br>
+                                                                               else {<br>
+                                                                                       buf1--;<br>
+                                                                                       rle_v3 = 1;<br>
+                                                                               }<br>
+                                                                               lp2 = 4;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 8:<br>
+                                                                               if (lp2 == 0) {<br>
+                                                                                       RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)<br>
+<br>
+                                                                                       if (rle_v1 == 1) {<br>
+                                                                                               for (i = 0, j = 0; i < 8; i++, j += width_tbl[1])<br>
+                                                                                                       cur_lp[j] = ref_lp[j];<br>
+                                                                                       }<br>
+<br>
+                                                                                       RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)<br>
+                                                                                       break;<br>
+                                                                               } else {<br>
+                                                                                       rle_v2 = (*buf1) - 1;<br>
+                                                                                       rle_v1 = 1;<br>
+                                                                               }<br>
+                                                                       case 5:<br>
+                                                                                       LP2_CHECK(buf1,rle_v3,lp2)<br>
+                                                                       case 4:<br>
+                                                                               for (i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1])<br>
+                                                                                       cur_lp[j] = *ref_lp;<br>
+                                                                               lp2 = 4;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 9:<br>
+                                                                               warning("Indeo3Decoder::decodeChunk: Untested (1)");<br>
+                                                                               lv1 = *buf1++;<br>
+                                                                               lv = (lv1 & 0x7F) << 1;<br>
+                                                                               lv += (lv << 8);<br>
+                                                                               lv += (lv << 16);<br>
+<br>
+                                                                               for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                       cur_lp[j] = lv;<br>
+<br>
+                                                                               LV1_CHECK(buf1,rle_v3,lv1,lp2)<br>
+                                                                               break;<br>
+<br>
+                                                                       default:<br>
+                                                                               return;<br>
+                                                               }<br>
+                                                       }<br>
+<br>
+                                                       cur_frm_pos += 4;<br>
+                                               }<br>
+<br>
+                                               cur_frm_pos += (((width * 2) - blks_width) * 4);<br>
+                                               flag1 = 0;<br>
+                                       }<br>
+                                       break;<br>
+<br>
+                               case 10:                    /********** CASE 10 **********/<br>
+                                       if (ref_vectors == NULL) {<br>
+                                               flag1 = 1;<br>
+<br>
+                                               for ( ; blks_height > 0; blks_height -= 8) {<br>
+                                                       for (lp1 = 0; lp1 < blks_width; lp1 += 2) {<br>
+                                                               for (lp2 = 0; lp2 < 4; ) {<br>
+                                                                       k = *buf1++;<br>
+                                                                       cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];<br>
+                                                                       ref_lp = ((uint32 *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];<br>
+                                                                       lv1 = ref_lp[0];<br>
+                                                                       lv2 = ref_lp[1];<br>
+                                                                       if (lp2 == 0 && flag1 != 0) {<br>
+#if defined(SCUMM_BIG_ENDIAN)<br>
+                                                                               lv1 = lv1 & 0xFF00FF00;<br>
+                                                                               lv1 = (lv1 >> 8) | lv1;<br>
+                                                                               lv2 = lv2 & 0xFF00FF00;<br>
+                                                                               lv2 = (lv2 >> 8) | lv2;<br>
+#else<br>
+                                                                               lv1 = lv1 & 0x00FF00FF;<br>
+                                                                               lv1 = (lv1 << 8) | lv1;<br>
+                                                                               lv2 = lv2 & 0x00FF00FF;<br>
+                                                                               lv2 = (lv2 << 8) | lv2;<br>
+#endif<br>
+                                                                       }<br>
+<br>
+                                                                       switch (correction_type_sp[lp2 & 0x01][k]) {<br>
+                                                                               case 0:<br>
+                                                                                       cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                                       cur_lp[width_tbl[1]+1] = FROM_LE_32(((FROM_LE_32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                                       if (lp2 > 0 || strip->ypos != 0 || flag1 == 0) {<br>
+                                                                                               cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                               cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                       } else {<br>
+                                                                                               cur_lp[0] = cur_lp[width_tbl[1]];<br>
+                                                                                               cur_lp[1] = cur_lp[width_tbl[1]+1];<br>
+                                                                                       }<br>
+                                                                                       lp2++;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 1:<br>
+                                                                                       if (correction_type_sp[lp2 & 0x01][*buf1] != 1) {<br>
+                                                                                               //See the mode 0/1<br>
+                                                                                               //warning("Glitch");<br>
+                                                                                               return;<br>
+                                                                                       }<br>
+                                                                                       cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1);<br>
+                                                                                       cur_lp[width_tbl[1]+1] = FROM_LE_32(((FROM_LE_32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                                       if (lp2 > 0 || strip->ypos != 0 || flag1 == 0) {<br>
+                                                                                               cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                               cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                       } else {<br>
+                                                                                               cur_lp[0] = cur_lp[width_tbl[1]];<br>
+                                                                                               cur_lp[1] = cur_lp[width_tbl[1]+1];<br>
+                                                                                       }<br>
+                                                                                       buf1++;<br>
+                                                                                       lp2++;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 2:<br>
+                                                                                       if (lp2 == 0) {<br>
+                                                                                               if (flag1 != 0) {<br>
+                                                                                                       for (i = 0, j = width_tbl[1]; i < 3; i++, j += width_tbl[1]) {<br>
+                                                                                                               cur_lp[j] = lv1;<br>
+                                                                                                               cur_lp[j+1] = lv2;<br>
+                                                                                                       }<br>
+                                                                                                       cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                                       cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                               } else {<br>
+                                                                                                       for (i = 0, j = 0; i < 4; i++, j += width_tbl[1]) {<br>
+                                                                                                               cur_lp[j] = lv1;<br>
+                                                                                                               cur_lp[j+1] = lv2;<br>
+                                                                                                       }<br>
+                                                                                               }<br>
+                                                                                               lp2 += 2;<br>
+                                                                                       }<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 3:<br>
+                                                                                       if (lp2 < 2) {<br>
+                                                                                               if (lp2 == 0 && flag1 != 0) {<br>
+                                                                                                       for (i = 0, j = width_tbl[1]; i < 5; i++, j += width_tbl[1]) {<br>
+                                                                                                               cur_lp[j] = lv1;<br>
+                                                                                                               cur_lp[j+1] = lv2;<br>
+                                                                                                       }<br>
+                                                                                                       cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                                       cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                               } else {<br>
+                                                                                                       for (i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) {<br>
+                                                                                                               cur_lp[j] = lv1;<br>
+                                                                                                               cur_lp[j+1] = lv2;<br>
+                                                                                                       }<br>
+                                                                                               }<br>
+                                                                                               lp2 = 3;<br>
+                                                                                       }<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 8:<br>
+                                                                                       if (lp2 == 0) {<br>
+                                                                                               RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)<br>
+                                                                                               if (rle_v1 == 1) {<br>
+                                                                                                       if (flag1 != 0) {<br>
+                                                                                                               for (i = 0, j = width_tbl[1]; i < 7; i++, j += width_tbl[1]) {<br>
+                                                                                                                       cur_lp[j] = lv1;<br>
+                                                                                                                       cur_lp[j+1] = lv2;<br>
+                                                                                                               }<br>
+                                                                                                               cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                                               cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;<br>


+                                                                                                       } else {<br>
+                                                                                                               for (i = 0, j = 0; i < 8; i++, j += width_tbl[1]) {<br>
+                                                                                                                       cur_lp[j] = lv1;<br>
+                                                                                                                       cur_lp[j+1] = lv2;<br>
+                                                                                                               }<br>
+                                                                                                       }<br>
+                                                                                               }<br>
+                                                                                               RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)<br>
+                                                                                               break;<br>
+                                                                                       } else {<br>
+                                                                                               rle_v1 = 1;<br>
+                                                                                               rle_v2 = (*buf1) - 1;<br>
+                                                                                       }<br>
+                                                                               case 5:<br>
+                                                                                               LP2_CHECK(buf1,rle_v3,lp2)<br>
+                                                                               case 4:<br>
+                                                                                       if (lp2 == 0 && flag1 != 0) {<br>
+                                                                                               for (i = 0, j = width_tbl[1]; i < 7; i++, j += width_tbl[1]) {<br>
+                                                                                                       cur_lp[j] = lv1;<br>
+                                                                                                       cur_lp[j+1] = lv2;<br>
+                                                                                               }<br>
+                                                                                               cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                               cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;<br>
+                                                                                       } else {<br>
+                                                                                               for (i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) {<br>
+                                                                                                       cur_lp[j] = lv1;<br>
+                                                                                                       cur_lp[j+1] = lv2;<br>
+                                                                                               }<br>
+                                                                                       }<br>
+                                                                                       lp2 = 4;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 6:<br>
+                                                                                       lp2 = 4;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 7:<br>
+                                                                                       if (lp2 == 0) {<br>
+                                                                                               if (rle_v3 != 0)<br>
+                                                                                                       rle_v3 = 0;<br>
+                                                                                               else {<br>
+                                                                                                       buf1--;<br>
+                                                                                                       rle_v3 = 1;<br>
+                                                                                               }<br>
+                                                                                               lp2 = 4;<br>
+                                                                                       }<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 9:<br>
+                                                                                       warning("Indeo3Decoder::decodeChunk: Untested (2)");<br>
+                                                                                       lv1 = *buf1;<br>
+                                                                                       lv = (lv1 & 0x7F) << 1;<br>
+                                                                                       lv += (lv << 8);<br>
+                                                                                       lv += (lv << 16);<br>
+                                                                                       for (i = 0, j = 0; i < 8; i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = lv;<br>
+                                                                                       LV1_CHECK(buf1,rle_v3,lv1,lp2)<br>
+                                                                                       break;<br>
+<br>
+                                                                               default:<br>
+                                                                                       return;<br>
+                                                                       }<br>
+                                                               }<br>
+<br>
+                                                               cur_frm_pos += 8;<br>
+                                                       }<br>
+<br>
+                                                       cur_frm_pos += (((width * 2) - blks_width) * 4);<br>
+                                                       flag1 = 0;<br>
+                                               }<br>
+                                       } else {<br>
+                                               for ( ; blks_height > 0; blks_height -= 8) {<br>
+                                                       for (lp1 = 0; lp1 < blks_width; lp1 += 2) {<br>
+                                                               for (lp2 = 0; lp2 < 4; ) {<br>
+                                                                       k = *buf1++;<br>
+                                                                       cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];<br>
+                                                                       ref_lp = ((uint32 *)ref_frm_pos) + width_tbl[lp2 * 2];<br>
+<br>
+                                                                       switch (correction_type_sp[lp2 & 0x01][k]) {<br>
+                                                                               case 0:<br>
+                                                                                       lv1 = correctionloworder_lp[lp2 & 0x01][k];<br>
+                                                                                       lv2 = correctionhighorder_lp[lp2 & 0x01][k];<br>
+                                                                                       cur_lp[0] = FROM_LE_32(((FROM_LE_32(ref_lp[0]) >> 1) + lv1) << 1);<br>
+                                                                                       cur_lp[1] = FROM_LE_32(((FROM_LE_32(ref_lp[1]) >> 1) + lv2) << 1);<br>
+                                                                                       cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);<br>
+                                                                                       cur_lp[width_tbl[1]+1] = FROM_LE_32(((FROM_LE_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);<br>
+                                                                                       lp2++;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 1:<br>
+                                                                                       lv1 = correctionloworder_lp[lp2 & 0x01][*buf1++];<br>
+                                                                                       lv2 = correctionloworder_lp[lp2 & 0x01][k];<br>
+                                                                                       cur_lp[0] = FROM_LE_32(((FROM_LE_32(ref_lp[0]) >> 1) + lv1) << 1);<br>
+                                                                                       cur_lp[1] = FROM_LE_32(((FROM_LE_32(ref_lp[1]) >> 1) + lv2) << 1);<br>
+                                                                                       cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);<br>
+                                                                                       cur_lp[width_tbl[1]+1] = FROM_LE_32(((FROM_LE_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);<br>
+                                                                                       lp2++;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 2:<br>
+                                                                                       if (lp2 == 0) {<br>
+                                                                                               for (i = 0, j = 0; i < 4; i++, j += width_tbl[1]) {<br>
+                                                                                                       cur_lp[j] = ref_lp[j];<br>
+                                                                                                       cur_lp[j+1] = ref_lp[j+1];<br>
+                                                                                               }<br>
+                                                                                               lp2 += 2;<br>
+                                                                                       }<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 3:<br>
+                                                                                       if (lp2 < 2) {<br>
+                                                                                               for (i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) {<br>
+                                                                                                       cur_lp[j] = ref_lp[j];<br>
+                                                                                                       cur_lp[j+1] = ref_lp[j+1];<br>
+                                                                                               }<br>
+                                                                                               lp2 = 3;<br>
+                                                                                       }<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 8:<br>
+                                                                                       if (lp2 == 0) {<br>
+                                                                                               RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)<br>
+                                                                                               for (i = 0, j = 0; i < 8; i++, j += width_tbl[1]) {<br>
+                                                                                                       ((uint32 *)cur_frm_pos)[j] = ((uint32 *)ref_frm_pos)[j];<br>
+                                                                                                       ((uint32 *)cur_frm_pos)[j+1] = ((uint32 *)ref_frm_pos)[j+1];<br>
+                                                                                               }<br>
+                                                                                               RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)<br>
+                                                                                               break;<br>
+                                                                                       } else {<br>
+                                                                                               rle_v1 = 1;<br>
+                                                                                               rle_v2 = (*buf1) - 1;<br>
+                                                                                       }<br>
+                                                                               case 5:<br>
+                                                                               case 7:<br>
+                                                                                               LP2_CHECK(buf1,rle_v3,lp2)<br>
+                                                                               case 6:<br>
+                                                                               case 4:<br>
+                                                                                       for (i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) {<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+                                                                                               cur_lp[j+1] = ref_lp[j+1];<br>
+                                                                                       }<br>
+                                                                                       lp2 = 4;<br>
+                                                                                       break;<br>
+<br>
+                                                                               case 9:<br>
+                                                                                       warning("Indeo3Decoder::decodeChunk: Untested (3)");<br>
+                                                                                       lv1 = *buf1;<br>
+                                                                                       lv = (lv1 & 0x7F) << 1;<br>
+                                                                                       lv += (lv << 8);<br>
+                                                                                       lv += (lv << 16);<br>
+                                                                                       for (i = 0, j = 0; i < 8; i++, j += width_tbl[1])<br>
+                                                                                               ((uint32 *)cur_frm_pos)[j] = ((uint32 *)cur_frm_pos)[j+1] = lv;<br>
+                                                                                       LV1_CHECK(buf1,rle_v3,lv1,lp2)<br>
+                                                                                       break;<br>
+<br>
+                                                                               default:<br>
+                                                                                       return;<br>
+                                                                       }<br>
+                                                               }<br>
+<br>
+                                                               cur_frm_pos += 8;<br>
+                                                               ref_frm_pos += 8;<br>
+                                                       }<br>
+<br>
+                                                       cur_frm_pos += (((width * 2) - blks_width) * 4);<br>
+                                                       ref_frm_pos += (((width * 2) - blks_width) * 4);<br>
+                                               }<br>
+                                       }<br>
+                                       break;<br>
+<br>
+                               case 11:                    /********** CASE 11 **********/<br>
+                                       if (ref_vectors == NULL)<br>
+                                               return;<br>
+<br>
+                                       for ( ; blks_height > 0; blks_height -= 8) {<br>
+                                               for (lp1 = 0; lp1 < blks_width; lp1++) {<br>
+                                                       for (lp2 = 0; lp2 < 4; ) {<br>
+                                                               k = *buf1++;<br>
+                                                               cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];<br>
+                                                               ref_lp = ((uint32 *)ref_frm_pos) + width_tbl[lp2 * 2];<br>
+<br>
+                                                               switch (correction_type_sp[lp2 & 0x01][k]) {<br>
+                                                                       case 0:<br>
+                                                                               cur_lp[0] = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                               cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);<br>
+                                                                               lp2++;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 1:<br>
+                                                                               if (correction_type_sp[lp2 & 0x01][*buf1] != 1) {<br>
+                                                                                       // See mode 0/1<br>
+                                                                                       //warning("Glitch");<br>
+                                                                                       return;<br>
+                                                                               }<br>
+<br>
+                                                                               lv1 = (uint16)(correction_lp[lp2 & 0x01][*buf1++]);<br>
+                                                                               lv2 = (uint16)(correction_lp[lp2 & 0x01][k]);<br>
+                                                                               res = (uint16)(((FROM_LE_16(((uint16 *)ref_lp)[0]) >> 1) + lv1) << 1);<br>
+                                                                               ((uint16 *)cur_lp)[0] = FROM_LE_16(res);<br>
+                                                                               res = (uint16)(((FROM_LE_16(((uint16 *)ref_lp)[1]) >> 1) + lv2) << 1);<br>
+                                                                               ((uint16 *)cur_lp)[1] = FROM_LE_16(res);<br>
+                                                                               res = (uint16)(((FROM_LE_16(((uint16 *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1);<br>
+                                                                               ((uint16 *)cur_lp)[width_tbl[2]] = FROM_LE_16(res);<br>
+                                                                               res = (uint16)(((FROM_LE_16(((uint16 *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1);<br>
+                                                                               ((uint16 *)cur_lp)[width_tbl[2]+1] = FROM_LE_16(res);<br>
+                                                                               lp2++;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 2:<br>
+                                                                               if (lp2 == 0) {<br>
+                                                                                       for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+                                                                                       lp2 += 2;<br>
+                                                                               }<br>
+                                                                               break;<br>
+<br>
+                                                                       case 3:<br>
+                                                                               if (lp2 < 2) {<br>
+                                                                                       for (i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+                                                                                       lp2 = 3;<br>
+                                                                               }<br>
+                                                                               break;<br>
+<br>
+                                                                       case 8:<br>
+                                                                               if (lp2 == 0) {<br>
+                                                                                       RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)<br>
+<br>
+                                                                                       for (i = 0, j = 0; i < 8; i++, j += width_tbl[1])<br>
+                                                                                               cur_lp[j] = ref_lp[j];<br>
+<br>
+                                                                                       RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)<br>
+                                                                                       break;<br>
+                                                                               } else {<br>
+                                                                                       rle_v1 = 1;<br>
+                                                                                       rle_v2 = (*buf1) - 1;<br>
+                                                                               }<br>
+                                                                       case 5:<br>
+                                                                       case 7:<br>
+                                                                                       LP2_CHECK(buf1,rle_v3,lp2)<br>
+                                                                       case 4:<br>
+                                                                       case 6:<br>
+                                                                               for (i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1])<br>
+                                                                                       cur_lp[j] = ref_lp[j];<br>
+                                                                               lp2 = 4;<br>
+                                                                               break;<br>
+<br>
+                                                                       case 9:<br>
+                                                                               warning("Indeo3Decoder::decodeChunk: Untested (4)");<br>
+                                                                               lv1 = *buf1++;<br>
+                                                                               lv = (lv1 & 0x7F) << 1;<br>
+                                                                               lv += (lv << 8);<br>
+                                                                               lv += (lv << 16);<br>
+                                                                               for (i = 0, j = 0; i < 4; i++, j += width_tbl[1])<br>
+                                                                                       cur_lp[j] = lv;<br>
+                                                                               LV1_CHECK(buf1,rle_v3,lv1,lp2)<br>
+                                                                               break;<br>
+<br>
+                                                                       default:<br>
+                                                                               return;<br>
+                                                               }<br>
+                                                       }<br>
+<br>
+                                                       cur_frm_pos += 4;<br>
+                                                       ref_frm_pos += 4;<br>
+                                               }<br>
+<br>
+                                               cur_frm_pos += (((width * 2) - blks_width) * 4);<br>
+                                               ref_frm_pos += (((width * 2) - blks_width) * 4);<br>
+                                       }<br>
+                                       break;<br>
+<br>
+                               default:<br>
+                                       // FIXME: I've seen case 13 happen in Urban<br>
+                                       // Runner. Perhaps it uses a more recent form of<br>
+                                       // Indeo 3? There appears to have been several.<br>
+                                       // -> This should not happen anymore with the other skipping for bad data.<br>
+                                       warning("Indeo3Decoder::decodeChunk: Unknown case %d", k);<br>
+                                       return;<br>
+                       }<br>
+               }<br>
+<br>
+               if (strip < strip_tbl)<br>
+                       return;<br>
+<br>
+               for ( ; strip >= strip_tbl; strip--) {<br>
+                       if (strip->split_flag != 0) {<br>
+                               strip->split_flag = 0;<br>
+                               strip->usl7 = (strip-1)->usl7;<br>
+<br>
+                               if (strip->split_direction) {<br>
+                                       strip->xpos += strip->width;<br>
+                                       strip->width = (strip-1)->width - strip->width;<br>
+                                       if (region_160_width <= strip->xpos && width < strip->width + strip->xpos)<br>
+                                               strip->width = width - strip->xpos;<br>
+                               } else {<br>
+                                       strip->ypos += strip->height;<br>
+                                       strip->height = (strip-1)->height - strip->height;<br>
+                               }<br>
+                               break;<br>
+                       }<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+// static data<br>
+<br>
+const int Indeo3Decoder::_corrector_type_0[24] = {<br>
+       195, 159, 133, 115, 101,  93,  87,  77,<br>
+       195, 159, 133, 115, 101,  93,  87,  77,<br>
+       128,  79,  79,  79,  79,  79,  79,  79<br>
+};<br>
+<br>
+const int Indeo3Decoder::_corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 };<br>
+<br>
+const uint32 Indeo3Decoder::correction[] = {<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x000002ff, 0xfffffd01, 0xffffff03, 0x000000fd, 0x00000404,<br>
+       0xfffffbfc, 0x00000501, 0xfffffaff, 0x00000105, 0xfffffefb, 0x000003fc, 0xfffffc04, 0x000005fe,<br>
+       0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000904, 0xfffff6fc, 0x00000409, 0xfffffbf7, 0x00000909,<br>
+       0xfffff6f7, 0x00000a01, 0xfffff5ff, 0x0000010a, 0xfffffef6, 0x000007fb, 0xfffff805, 0xfffffb08,<br>
+       0x000004f8, 0x00000f09, 0xfffff0f7, 0x0000090f, 0xfffff6f1, 0x00000bfd, 0xfffff403, 0xfffffd0c,<br>
+       0x000002f4, 0x00001004, 0xffffeffc, 0x00000410, 0xfffffbf0, 0x00001010, 0xffffeff0, 0x00001200,<br>
+       0xffffee00, 0x00000012, 0xffffffee, 0x00000bf4, 0xfffff40c, 0x00000ff7, 0xfffff009, 0xfffff710,<br>
+       0x000008f0, 0x00001b0b, 0xffffe4f5, 0x00000b1b, 0xfffff4e5, 0x00001c13, 0xffffe3ed, 0x0000131c,<br>
+       0xffffece4, 0x000015fa, 0xffffea06, 0xfffffa16, 0x000005ea, 0x00001d04, 0xffffe2fc, 0x0000041d,<br>
+       0xfffffbe3, 0x00001e1e, 0xffffe1e2, 0x000020fe, 0xffffdf02, 0xfffffe21, 0x000001df, 0x000016ee,<br>
+       0xffffe912, 0xffffee17, 0x000011e9, 0x00001df1, 0xffffe20f, 0xfffff11e, 0x00000ee2, 0x00002e16,<br>
+       0xffffd1ea, 0x0000162e, 0xffffe9d2, 0x00002f0d, 0xffffd0f3, 0x00000d2f, 0xfffff2d1, 0x00003123,<br>
+       0xffffcedd, 0x00002331, 0xffffdccf, 0x000028f5, 0xffffd70b, 0xfffff529, 0x00000ad7, 0x00003304,<br>
+       0xffffccfc, 0x00000433, 0xfffffbcd, 0x00003636, 0xffffc9ca, 0x000021de, 0xffffde22, 0x000029e3,<br>
+       0xffffd61d, 0xffffe32a, 0x00001cd6, 0x00003bfa, 0xffffc406, 0xfffffa3c, 0x000005c4, 0x00004c1b,<br>
+       0xffffb3e5, 0x00001b4c, 0xffffe4b4, 0x00004d2b, 0xffffb2d5, 0x00002b4d, 0xffffd4b3, 0x000036e8,<br>
+       0xffffc918, 0xffffe837, 0x000017c9, 0x00004f0e, 0xffffb0f2, 0x00000e4f, 0xfffff1b1, 0x0000533f,<br>
+       0xffffacc1, 0x00003f53, 0xffffc0ad, 0x000049ec, 0xffffb614, 0xffffec4a, 0x000013b6, 0x00005802,<br>
+       0xffffa7fe, 0x00000258, 0xfffffda8, 0x00005d5d, 0xffffa2a3, 0x00003ccc, 0xffffc334, 0xffffcc3d,<br>
+       0x000033c3, 0x00007834, 0xffff87cc, 0x00003478, 0xffffcb88, 0x00004ad3, 0xffffb52d, 0xffffd34b,<br>
+       0x00002cb5, 0x00007d4b, 0xffff82b5, 0x00004b7d, 0xffffb483, 0x00007a21, 0xffff85df, 0x0000217a,<br>
+       0xffffde86, 0x000066f3, 0xffff990d, 0xfffff367, 0x00000c99, 0x00005fd8, 0xffffa028, 0xffffd860,<br>
+       0x000027a0, 0x00007ede, 0xffff8122, 0xffffde7f, 0x00002181, 0x000058a7, 0xffffa759, 0x000068b2,<br>
+       0xffff974e, 0xffffb269, 0x00004d97, 0x00000c0c, 0xfffff3f4, 0x00001717, 0xffffe8e9, 0x00002a2a,<br>
+       0xffffd5d6, 0x00004949, 0xffffb6b7, 0x00000000, 0x02020000, 0xfdfe0000, 0x02ff0000, 0xfd010000,<br>
+       0xff030000, 0x00fd0000, 0x00000202, 0x02020202, 0xfdfe0202, 0x02ff0202, 0xfd010202, 0xff030202,<br>
+       0x00fd0202, 0xfffffdfe, 0x0201fdfe, 0xfdfdfdfe, 0x02fefdfe, 0xfd00fdfe, 0xff02fdfe, 0x00fcfdfe,<br>
+       0x000002ff, 0x020202ff, 0xfdfe02ff, 0x02ff02ff, 0xfd0102ff, 0xff0302ff, 0x00fd02ff, 0xfffffd01,<br>
+       0x0201fd01, 0xfdfdfd01, 0x02fefd01, 0xfd00fd01, 0xff02fd01, 0x00fcfd01, 0xffffff03, 0x0201ff03,<br>
+       0xfdfdff03, 0x02feff03, 0xfd00ff03, 0xff02ff03, 0x00fcff03, 0x000000fd, 0x020200fd, 0xfdfe00fd,<br>
+       0x02ff00fd, 0xfd0100fd, 0xff0300fd, 0x00fd00fd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000303, 0xfffffcfd, 0x000003ff, 0xfffffc01, 0xffffff04, 0x000000fc, 0x00000707,<br>
+       0xfffff8f9, 0x00000802, 0xfffff7fe, 0x00000208, 0xfffffdf8, 0x000008fe, 0xfffff702, 0xfffffe09,<br>
+       0x000001f7, 0x000005fa, 0xfffffa06, 0x00000d06, 0xfffff2fa, 0x0000060d, 0xfffff9f3, 0x00000d0d,<br>
+       0xfffff2f3, 0x00000e01, 0xfffff1ff, 0x0000010e, 0xfffffef2, 0x00000bf8, 0xfffff408, 0xfffff80c,<br>
+       0x000007f4, 0x0000170e, 0xffffe8f2, 0x00000e17, 0xfffff1e9, 0x000011fb, 0xffffee05, 0xfffffb12,<br>
+       0x000004ee, 0x00001806, 0xffffe7fa, 0x00000618, 0xfffff9e8, 0x00001818, 0xffffe7e8, 0x00001aff,<br>
+       0xffffe501, 0xffffff1b, 0x000000e5, 0x000010ef, 0xffffef11, 0x000016f3, 0xffffe90d, 0xfffff317,<br>
+       0x00000ce9, 0x00002810, 0xffffd7f0, 0x00001028, 0xffffefd8, 0x0000291c, 0xffffd6e4, 0x00001c29,<br>
+       0xffffe3d7, 0x000020f7, 0xffffdf09, 0xfffff721, 0x000008df, 0x00002b06, 0xffffd4fa, 0x0000062b,<br>
+       0xfffff9d5, 0x00002e2e, 0xffffd1d2, 0x000031fc, 0xffffce04, 0xfffffc32, 0x000003ce, 0x000021e5,<br>
+       0xffffde1b, 0xffffe522, 0x00001ade, 0x00002cea, 0xffffd316, 0xffffea2d, 0x000015d3, 0x00004522,<br>
+       0xffffbade, 0x00002245, 0xffffddbb, 0x00004613, 0xffffb9ed, 0x00001346, 0xffffecba, 0x00004935,<br>
+       0xffffb6cb, 0x00003549, 0xffffcab7, 0x00003def, 0xffffc211, 0xffffef3e, 0x000010c2, 0x00004d05,<br>
+       0xffffb2fb, 0x0000054d, 0xfffffab3, 0x00005252, 0xffffadae, 0x000032cd, 0xffffcd33, 0x00003fd5,<br>
+       0xffffc02b, 0xffffd540, 0x00002ac0, 0x000059f6, 0xffffa60a, 0xfffff65a, 0x000009a6, 0x00007229,<br>
+       0xffff8dd7, 0x00002972, 0xffffd68e, 0x00007440, 0xffff8bc0, 0x00004074, 0xffffbf8c, 0x000051db,<br>
+       0xffffae25, 0xffffdb52, 0x000024ae, 0x00007716, 0xffff88ea, 0x00001677, 0xffffe989, 0x00007c5f,<br>
+       0xffff83a1, 0x00005f7c, 0xffffa084, 0x00006ee2, 0xffff911e, 0xffffe26f, 0x00001d91, 0x00005bb2,<br>
+       0xffffa44e, 0xffffb25c, 0x00004da4, 0x000070bc, 0xffff8f44, 0xffffbc71, 0x0000438f, 0x00001212,<br>
+       0xffffedee, 0x00002222, 0xffffddde, 0x00003f3f, 0xffffc0c1, 0x00006d6d, 0xffff9293, 0x00000000,<br>
+       0x03030000, 0xfcfd0000, 0x03ff0000, 0xfc010000, 0xff040000, 0x00fc0000, 0x07070000, 0xf8f90000,<br>
+       0x00000303, 0x03030303, 0xfcfd0303, 0x03ff0303, 0xfc010303, 0xff040303, 0x00fc0303, 0x07070303,<br>
+       0xf8f90303, 0xfffffcfd, 0x0302fcfd, 0xfcfcfcfd, 0x03fefcfd, 0xfc00fcfd, 0xff03fcfd, 0x00fbfcfd,<br>
+       0x0706fcfd, 0xf8f8fcfd, 0x000003ff, 0x030303ff, 0xfcfd03ff, 0x03ff03ff, 0xfc0103ff, 0xff0403ff,<br>
+       0x00fc03ff, 0x070703ff, 0xf8f903ff, 0xfffffc01, 0x0302fc01, 0xfcfcfc01, 0x03fefc01, 0xfc00fc01,<br>
+       0xff03fc01, 0x00fbfc01, 0x0706fc01, 0xf8f8fc01, 0xffffff04, 0x0302ff04, 0xfcfcff04, 0x03feff04,<br>
+       0xfc00ff04, 0xff03ff04, 0x00fbff04, 0x0706ff04, 0xf8f8ff04, 0x000000fc, 0x030300fc, 0xfcfd00fc,<br>
+       0x03ff00fc, 0xfc0100fc, 0xff0400fc, 0x00fc00fc, 0x070700fc, 0xf8f900fc, 0x00000707, 0x03030707,<br>
+       0xfcfd0707, 0x03ff0707, 0xfc010707, 0xff040707, 0x00fc0707, 0x07070707, 0xf8f90707, 0xfffff8f9,<br>
+       0x0302f8f9, 0xfcfcf8f9, 0x03fef8f9, 0xfc00f8f9, 0xff03f8f9, 0x00fbf8f9, 0x0706f8f9, 0xf8f8f8f9,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000404, 0xfffffbfc, 0x000004ff, 0xfffffb01, 0xffffff05, 0x000000fb, 0x00000a03,<br>
+       0xfffff5fd, 0x0000030a, 0xfffffcf6, 0x00000909, 0xfffff6f7, 0x000006f9, 0xfffff907, 0x00000bfd,<br>
+       0xfffff403, 0xfffffd0c, 0x000002f4, 0x00001108, 0xffffeef8, 0x00000811, 0xfffff7ef, 0x00001111,<br>
+       0xffffeeef, 0x00001301, 0xffffecff, 0x00000113, 0xfffffeed, 0x00000ff5, 0xfffff00b, 0xfffff510,<br>
+       0x00000af0, 0x000016fa, 0xffffe906, 0xfffffa17, 0x000005e9, 0x00001f12, 0xffffe0ee, 0x0000121f,<br>
+       0xffffede1, 0x00002008, 0xffffdff8, 0x00000820, 0xfffff7e0, 0x00002121, 0xffffdedf, 0x000023ff,<br>
+       0xffffdc01, 0xffffff24, 0x000000dc, 0x000016e9, 0xffffe917, 0x00001eef, 0xffffe111, 0xffffef1f,<br>
+       0x000010e1, 0x00003615, 0xffffc9eb, 0x00001536, 0xffffeaca, 0x00003725, 0xffffc8db, 0x00002537,<br>
+       0xffffdac9, 0x00002bf4, 0xffffd40c, 0xfffff42c, 0x00000bd4, 0x00003908, 0xffffc6f8, 0x00000839,<br>
+       0xfffff7c7, 0x00003d3d, 0xffffc2c3, 0x000041fb, 0xffffbe05, 0xfffffb42, 0x000004be, 0x00002cdc,<br>
+       0xffffd324, 0xffffdc2d, 0x000023d3, 0x00003be3, 0xffffc41d, 0xffffe33c, 0x00001cc4, 0x00005c2d,<br>
+       0xffffa3d3, 0x00002d5c, 0xffffd2a4, 0x00005d19, 0xffffa2e7, 0x0000195d, 0xffffe6a3, 0x00006147,<br>
+       0xffff9eb9, 0x00004761, 0xffffb89f, 0x000052ea, 0xffffad16, 0xffffea53, 0x000015ad, 0x00006607,<br>
+       0xffff99f9, 0x00000766, 0xfffff89a, 0x00006d6d, 0xffff9293, 0x000043bc, 0xffffbc44, 0x000054c7,<br>
+       0xffffab39, 0xffffc755, 0x000038ab, 0x000077f3, 0xffff880d, 0xfffff378, 0x00000c88, 0x00006dcf,<br>
+       0xffff9231, 0xffffcf6e, 0x00003092, 0x00007a98, 0xffff8568, 0xffff987b, 0x00006785, 0x00001818,<br>
+       0xffffe7e8, 0x00002e2e, 0xffffd1d2, 0x00005454, 0xffffabac, 0x00000000, 0x04040000, 0xfbfc0000,<br>
+       0x04ff0000, 0xfb010000, 0xff050000, 0x00fb0000, 0x0a030000, 0xf5fd0000, 0x030a0000, 0x00000404,<br>
+       0x04040404, 0xfbfc0404, 0x04ff0404, 0xfb010404, 0xff050404, 0x00fb0404, 0x0a030404, 0xf5fd0404,<br>
+       0x030a0404, 0xfffffbfc, 0x0403fbfc, 0xfbfbfbfc, 0x04fefbfc, 0xfb00fbfc, 0xff04fbfc, 0x00fafbfc,<br>
+       0x0a02fbfc, 0xf5fcfbfc, 0x0309fbfc, 0x000004ff, 0x040404ff, 0xfbfc04ff, 0x04ff04ff, 0xfb0104ff,<br>
+       0xff0504ff, 0x00fb04ff, 0x0a0304ff, 0xf5fd04ff, 0x030a04ff, 0xfffffb01, 0x0403fb01, 0xfbfbfb01,<br>
+       0x04fefb01, 0xfb00fb01, 0xff04fb01, 0x00fafb01, 0x0a02fb01, 0xf5fcfb01, 0x0309fb01, 0xffffff05,<br>
+       0x0403ff05, 0xfbfbff05, 0x04feff05, 0xfb00ff05, 0xff04ff05, 0x00faff05, 0x0a02ff05, 0xf5fcff05,<br>
+       0x0309ff05, 0x000000fb, 0x040400fb, 0xfbfc00fb, 0x04ff00fb, 0xfb0100fb, 0xff0500fb, 0x00fb00fb,<br>
+       0x0a0300fb, 0xf5fd00fb, 0x030a00fb, 0x00000a03, 0x04040a03, 0xfbfc0a03, 0x04ff0a03, 0xfb010a03,<br>
+       0xff050a03, 0x00fb0a03, 0x0a030a03, 0xf5fd0a03, 0x030a0a03, 0xfffff5fd, 0x0403f5fd, 0xfbfbf5fd,<br>
+       0x04fef5fd, 0xfb00f5fd, 0xff04f5fd, 0x00faf5fd, 0x0a02f5fd, 0xf5fcf5fd, 0x0309f5fd, 0x0000030a,<br>
+       0x0404030a, 0xfbfc030a, 0x04ff030a, 0xfb01030a, 0xff05030a, 0x00fb030a, 0x0a03030a, 0xf5fd030a,<br>
+       0x030a030a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000505, 0xfffffafb, 0x000006fe, 0xfffff902, 0xfffffe07, 0x000001f9, 0x00000b0b,<br>
+       0xfffff4f5, 0x00000d03, 0xfffff2fd, 0x0000030d, 0xfffffcf3, 0x000008f7, 0xfffff709, 0x00000efc,<br>
+       0xfffff104, 0xfffffc0f, 0x000003f1, 0x0000160b, 0xffffe9f5, 0x00000b16, 0xfffff4ea, 0x00001515,<br>
+       0xffffeaeb, 0x00001802, 0xffffe7fe, 0x00000218, 0xfffffde8, 0x000013f2, 0xffffec0e, 0xfffff214,<br>
+       0x00000dec, 0x00002617, 0xffffd9e9, 0x00001726, 0xffffe8da, 0x00001cf8, 0xffffe308, 0xfffff81d,<br>
+       0x000007e3, 0x0000270b, 0xffffd8f5, 0x00000b27, 0xfffff4d9, 0x00002929, 0xffffd6d7, 0x00002cff,<br>
+       0xffffd301, 0xffffff2d, 0x000000d3, 0x00001ce3, 0xffffe31d, 0x000026ea, 0xffffd916, 0xffffea27,<br>
+       0x000015d9, 0x0000431b, 0xffffbce5, 0x00001b43, 0xffffe4bd, 0x0000452f, 0xffffbad1, 0x00002f45,<br>
+       0xffffd0bb, 0x000037f1, 0xffffc80f, 0xfffff138, 0x00000ec8, 0x0000470b, 0xffffb8f5, 0x00000b47,<br>
+       0xfffff4b9, 0x00004c4c, 0xffffb3b4, 0x000052fa, 0xffffad06, 0xfffffa53, 0x000005ad, 0x000038d3,<br>
+       0xffffc72d, 0xffffd339, 0x00002cc7, 0x00004adc, 0xffffb524, 0xffffdc4b, 0x000023b5, 0x00007338,<br>
+       0xffff8cc8, 0x00003873, 0xffffc78d, 0x0000751f, 0xffff8ae1, 0x00001f75, 0xffffe08b, 0x00007a58,<br>
+       0xffff85a8, 0x0000587a, 0xffffa786, 0x000067e4, 0xffff981c, 0xffffe468, 0x00001b98, 0x000054ab,<br>
+       0xffffab55, 0x000069b8, 0xffff9648, 0xffffb86a, 0x00004796, 0x00001e1e, 0xffffe1e2, 0x00003a3a,<br>
+       0xffffc5c6, 0x00006969, 0xffff9697, 0x00000000, 0x05050000, 0xfafb0000, 0x06fe0000, 0xf9020000,<br>
+       0xfe070000, 0x01f90000, 0x0b0b0000, 0xf4f50000, 0x0d030000, 0xf2fd0000, 0x00000505, 0x05050505,<br>
+       0xfafb0505, 0x06fe0505, 0xf9020505, 0xfe070505, 0x01f90505, 0x0b0b0505, 0xf4f50505, 0x0d030505,<br>
+       0xf2fd0505, 0xfffffafb, 0x0504fafb, 0xfafafafb, 0x06fdfafb, 0xf901fafb, 0xfe06fafb, 0x01f8fafb,<br>
+       0x0b0afafb, 0xf4f4fafb, 0x0d02fafb, 0xf2fcfafb, 0x000006fe, 0x050506fe, 0xfafb06fe, 0x06fe06fe,<br>
+       0xf90206fe, 0xfe0706fe, 0x01f906fe, 0x0b0b06fe, 0xf4f506fe, 0x0d0306fe, 0xf2fd06fe, 0xfffff902,<br>
+       0x0504f902, 0xfafaf902, 0x06fdf902, 0xf901f902, 0xfe06f902, 0x01f8f902, 0x0b0af902, 0xf4f4f902,<br>
+       0x0d02f902, 0xf2fcf902, 0xfffffe07, 0x0504fe07, 0xfafafe07, 0x06fdfe07, 0xf901fe07, 0xfe06fe07,<br>
+       0x01f8fe07, 0x0b0afe07, 0xf4f4fe07, 0x0d02fe07, 0xf2fcfe07, 0x000001f9, 0x050501f9, 0xfafb01f9,<br>
+       0x06fe01f9, 0xf90201f9, 0xfe0701f9, 0x01f901f9, 0x0b0b01f9, 0xf4f501f9, 0x0d0301f9, 0xf2fd01f9,<br>
+       0x00000b0b, 0x05050b0b, 0xfafb0b0b, 0x06fe0b0b, 0xf9020b0b, 0xfe070b0b, 0x01f90b0b, 0x0b0b0b0b,<br>
+       0xf4f50b0b, 0x0d030b0b, 0xf2fd0b0b, 0xfffff4f5, 0x0504f4f5, 0xfafaf4f5, 0x06fdf4f5, 0xf901f4f5,<br>
+       0xfe06f4f5, 0x01f8f4f5, 0x0b0af4f5, 0xf4f4f4f5, 0x0d02f4f5, 0xf2fcf4f5, 0x00000d03, 0x05050d03,<br>
+       0xfafb0d03, 0x06fe0d03, 0xf9020d03, 0xfe070d03, 0x01f90d03, 0x0b0b0d03, 0xf4f50d03, 0x0d030d03,<br>
+       0xf2fd0d03, 0xfffff2fd, 0x0504f2fd, 0xfafaf2fd, 0x06fdf2fd, 0xf901f2fd, 0xfe06f2fd, 0x01f8f2fd,<br>
+       0x0b0af2fd, 0xf4f4f2fd, 0x0d02f2fd, 0xf2fcf2fd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000606, 0xfffff9fa, 0x000007fe, 0xfffff802, 0xfffffe08, 0x000001f8, 0x00000d0d,<br>
+       0xfffff2f3, 0x00000f04, 0xfffff0fc, 0x0000040f, 0xfffffbf1, 0x00000af5, 0xfffff50b, 0x000011fb,<br>
+       0xffffee05, 0xfffffb12, 0x000004ee, 0x00001a0d, 0xffffe5f3, 0x00000d1a, 0xfffff2e6, 0x00001a1a,<br>
+       0xffffe5e6, 0x00001d02, 0xffffe2fe, 0x0000021d, 0xfffffde3, 0x000017f0, 0xffffe810, 0xfffff018,<br>
+       0x00000fe8, 0x00002e1c, 0xffffd1e4, 0x00001c2e, 0xffffe3d2, 0x000022f7, 0xffffdd09, 0xfffff723,<br>
+       0x000008dd, 0x00002f0d, 0xffffd0f3, 0x00000d2f, 0xfffff2d1, 0x00003131, 0xffffcecf, 0x000035ff,<br>
+       0xffffca01, 0xffffff36, 0x000000ca, 0x000022dd, 0xffffdd23, 0x00002ee6, 0xffffd11a, 0xffffe62f,<br>
+       0x000019d1, 0x00005120, 0xffffaee0, 0x00002051, 0xffffdfaf, 0x00005338, 0xffffacc8, 0x00003853,<br>
+       0xffffc7ad, 0x000042ee, 0xffffbd12, 0xffffee43, 0x000011bd, 0x0000560d, 0xffffa9f3, 0x00000d56,<br>
+       0xfffff2aa, 0x00005b5b, 0xffffa4a5, 0x000062f9, 0xffff9d07, 0xfffff963, 0x0000069d, 0x000043ca,<br>
+       0xffffbc36, 0xffffca44, 0x000035bc, 0x000059d4, 0xffffa62c, 0xffffd45a, 0x00002ba6, 0x00007bdf,<br>
+       0xffff8421, 0xffffdf7c, 0x00002084, 0x00006699, 0xffff9967, 0x00007eaa, 0xffff8156, 0xffffaa7f,<br>
+       0x00005581, 0x00002525, 0xffffdadb, 0x00004545, 0xffffbabb, 0x00000000, 0x06060000, 0xf9fa0000,<br>
+       0x07fe0000, 0xf8020000, 0xfe080000, 0x01f80000, 0x0d0d0000, 0xf2f30000, 0x0f040000, 0xf0fc0000,<br>
+       0x040f0000, 0x00000606, 0x06060606, 0xf9fa0606, 0x07fe0606, 0xf8020606, 0xfe080606, 0x01f80606,<br>
+       0x0d0d0606, 0xf2f30606, 0x0f040606, 0xf0fc0606, 0x040f0606, 0xfffff9fa, 0x0605f9fa, 0xf9f9f9fa,<br>
+       0x07fdf9fa, 0xf801f9fa, 0xfe07f9fa, 0x01f7f9fa, 0x0d0cf9fa, 0xf2f2f9fa, 0x0f03f9fa, 0xf0fbf9fa,<br>
+       0x040ef9fa, 0x000007fe, 0x060607fe, 0xf9fa07fe, 0x07fe07fe, 0xf80207fe, 0xfe0807fe, 0x01f807fe,<br>
+       0x0d0d07fe, 0xf2f307fe, 0x0f0407fe, 0xf0fc07fe, 0x040f07fe, 0xfffff802, 0x0605f802, 0xf9f9f802,<br>
+       0x07fdf802, 0xf801f802, 0xfe07f802, 0x01f7f802, 0x0d0cf802, 0xf2f2f802, 0x0f03f802, 0xf0fbf802,<br>
+       0x040ef802, 0xfffffe08, 0x0605fe08, 0xf9f9fe08, 0x07fdfe08, 0xf801fe08, 0xfe07fe08, 0x01f7fe08,<br>
+       0x0d0cfe08, 0xf2f2fe08, 0x0f03fe08, 0xf0fbfe08, 0x040efe08, 0x000001f8, 0x060601f8, 0xf9fa01f8,<br>
+       0x07fe01f8, 0xf80201f8, 0xfe0801f8, 0x01f801f8, 0x0d0d01f8, 0xf2f301f8, 0x0f0401f8, 0xf0fc01f8,<br>
+       0x040f01f8, 0x00000d0d, 0x06060d0d, 0xf9fa0d0d, 0x07fe0d0d, 0xf8020d0d, 0xfe080d0d, 0x01f80d0d,<br>
+       0x0d0d0d0d, 0xf2f30d0d, 0x0f040d0d, 0xf0fc0d0d, 0x040f0d0d, 0xfffff2f3, 0x0605f2f3, 0xf9f9f2f3,<br>
+       0x07fdf2f3, 0xf801f2f3, 0xfe07f2f3, 0x01f7f2f3, 0x0d0cf2f3, 0xf2f2f2f3, 0x0f03f2f3, 0xf0fbf2f3,<br>
+       0x040ef2f3, 0x00000f04, 0x06060f04, 0xf9fa0f04, 0x07fe0f04, 0xf8020f04, 0xfe080f04, 0x01f80f04,<br>
+       0x0d0d0f04, 0xf2f30f04, 0x0f040f04, 0xf0fc0f04, 0x040f0f04, 0xfffff0fc, 0x0605f0fc, 0xf9f9f0fc,<br>
+       0x07fdf0fc, 0xf801f0fc, 0xfe07f0fc, 0x01f7f0fc, 0x0d0cf0fc, 0xf2f2f0fc, 0x0f03f0fc, 0xf0fbf0fc,<br>
+       0x040ef0fc, 0x0000040f, 0x0606040f, 0xf9fa040f, 0x07fe040f, 0xf802040f, 0xfe08040f, 0x01f8040f,<br>
+       0x0d0d040f, 0xf2f3040f, 0x0f04040f, 0xf0fc040f, 0x040f040f, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000707, 0xfffff8f9, 0x000009fd, 0xfffff603, 0xfffffd0a, 0x000002f6, 0x00001010,<br>
+       0xffffeff0, 0x00001205, 0xffffedfb, 0x00000512, 0xfffffaee, 0x00000cf3, 0xfffff30d, 0x000014fa,<br>
+       0xffffeb06, 0xfffffa15, 0x000005eb, 0x00001e0f, 0xffffe1f1, 0x00000f1e, 0xfffff0e2, 0x00001e1e,<br>
+       0xffffe1e2, 0x00002202, 0xffffddfe, 0x00000222, 0xfffffdde, 0x00001bed, 0xffffe413, 0xffffed1c,<br>
+       0x000012e4, 0x00003620, 0xffffc9e0, 0x00002036, 0xffffdfca, 0x000028f5, 0xffffd70b, 0xfffff529,<br>
+       0x00000ad7, 0x0000370f, 0xffffc8f1, 0x00000f37, 0xfffff0c9, 0x00003939, 0xffffc6c7, 0x00003eff,<br>
+       0xffffc101, 0xffffff3f, 0x000000c1, 0x000027d8, 0xffffd828, 0x000036e2, 0xffffc91e, 0xffffe237,<br>
+       0x00001dc9, 0x00005e25, 0xffffa1db, 0x0000255e, 0xffffdaa2, 0x00006041, 0xffff9fbf, 0x00004160,<br>
+       0xffffbea0, 0x00004deb, 0xffffb215, 0xffffeb4e, 0x000014b2, 0x0000640f, 0xffff9bf1, 0x00000f64,<br>
+       0xfffff09c, 0x00006a6a, 0xffff9596, 0x000073f8, 0xffff8c08, 0xfffff874, 0x0000078c, 0x00004ec1,<br>
+       0xffffb13f, 0xffffc14f, 0x00003eb1, 0x000068cd, 0xffff9733, 0xffffcd69, 0x00003297, 0x00007788,<br>
+       0xffff8878, 0x00002b2b, 0xffffd4d5, 0x00005050, 0xffffafb0, 0x00000000, 0x07070000, 0xf8f90000,<br>
+       0x09fd0000, 0xf6030000, 0xfd0a0000, 0x02f60000, 0x10100000, 0xeff00000, 0x12050000, 0xedfb0000,<br>
+       0x05120000, 0x00000707, 0x07070707, 0xf8f90707, 0x09fd0707, 0xf6030707, 0xfd0a0707, 0x02f60707,<br>
+       0x10100707, 0xeff00707, 0x12050707, 0xedfb0707, 0x05120707, 0xfffff8f9, 0x0706f8f9, 0xf8f8f8f9,<br>
+       0x09fcf8f9, 0xf602f8f9, 0xfd09f8f9, 0x02f5f8f9, 0x100ff8f9, 0xefeff8f9, 0x1204f8f9, 0xedfaf8f9,<br>
+       0x0511f8f9, 0x000009fd, 0x070709fd, 0xf8f909fd, 0x09fd09fd, 0xf60309fd, 0xfd0a09fd, 0x02f609fd,<br>
+       0x101009fd, 0xeff009fd, 0x120509fd, 0xedfb09fd, 0x051209fd, 0xfffff603, 0x0706f603, 0xf8f8f603,<br>
+       0x09fcf603, 0xf602f603, 0xfd09f603, 0x02f5f603, 0x100ff603, 0xefeff603, 0x1204f603, 0xedfaf603,<br>
+       0x0511f603, 0xfffffd0a, 0x0706fd0a, 0xf8f8fd0a, 0x09fcfd0a, 0xf602fd0a, 0xfd09fd0a, 0x02f5fd0a,<br>
+       0x100ffd0a, 0xefeffd0a, 0x1204fd0a, 0xedfafd0a, 0x0511fd0a, 0x000002f6, 0x070702f6, 0xf8f902f6,<br>
+       0x09fd02f6, 0xf60302f6, 0xfd0a02f6, 0x02f602f6, 0x101002f6, 0xeff002f6, 0x120502f6, 0xedfb02f6,<br>
+       0x051202f6, 0x00001010, 0x07071010, 0xf8f91010, 0x09fd1010, 0xf6031010, 0xfd0a1010, 0x02f61010,<br>
+       0x10101010, 0xeff01010, 0x12051010, 0xedfb1010, 0x05121010, 0xffffeff0, 0x0706eff0, 0xf8f8eff0,<br>
+       0x09fceff0, 0xf602eff0, 0xfd09eff0, 0x02f5eff0, 0x100feff0, 0xefefeff0, 0x1204eff0, 0xedfaeff0,<br>
+       0x0511eff0, 0x00001205, 0x07071205, 0xf8f91205, 0x09fd1205, 0xf6031205, 0xfd0a1205, 0x02f61205,<br>
+       0x10101205, 0xeff01205, 0x12051205, 0xedfb1205, 0x05121205, 0xffffedfb, 0x0706edfb, 0xf8f8edfb,<br>
+       0x09fcedfb, 0xf602edfb, 0xfd09edfb, 0x02f5edfb, 0x100fedfb, 0xefefedfb, 0x1204edfb, 0xedfaedfb,<br>
+       0x0511edfb, 0x00000512, 0x07070512, 0xf8f90512, 0x09fd0512, 0xf6030512, 0xfd0a0512, 0x02f60512,<br>
+       0x10100512, 0xeff00512, 0x12050512, 0xedfb0512, 0x05120512, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000808, 0xfffff7f8, 0x00000afd, 0xfffff503, 0xfffffd0b, 0x000002f5, 0x00001212,<br>
+       0xffffedee, 0x00001405, 0xffffebfb, 0x00000514, 0xfffffaec, 0x00000ef1, 0xfffff10f, 0x000017f9,<br>
+       0xffffe807, 0xfffff918, 0x000006e8, 0x00002311, 0xffffdcef, 0x00001123, 0xffffeedd, 0x00002222,<br>
+       0xffffddde, 0x00002603, 0xffffd9fd, 0x00000326, 0xfffffcda, 0x00001fea, 0xffffe016, 0xffffea20,<br>
+       0x000015e0, 0x00003d25, 0xffffc2db, 0x0000253d, 0xffffdac3, 0x00002ef3, 0xffffd10d, 0xfffff32f,<br>
+       0x00000cd1, 0x00003f11, 0xffffc0ef, 0x0000113f, 0xffffeec1, 0x00004141, 0xffffbebf, 0x000047ff,<br>
+       0xffffb801, 0xffffff48, 0x000000b8, 0x00002dd2, 0xffffd22e, 0x00003edd, 0xffffc123, 0xffffdd3f,<br>
+       0x000022c1, 0x00006b2b, 0xffff94d5, 0x00002b6b, 0xffffd495, 0x00006e4b, 0xffff91b5, 0x00004b6e,<br>
+       0xffffb492, 0x000058e8, 0xffffa718, 0xffffe859, 0x000017a7, 0x00007211, 0xffff8def, 0x00001172,<br>
+       0xffffee8e, 0x00007979, 0xffff8687, 0x00005ab8, 0xffffa548, 0xffffb85b, 0x000047a5, 0x000077c6,<br>
+       0xffff883a, 0xffffc678, 0x00003988, 0x00003131, 0xffffcecf, 0x00005c5c, 0xffffa3a4, 0x00000000,<br>
+       0x08080000, 0xf7f80000, 0x0afd0000, 0xf5030000, 0xfd0b0000, 0x02f50000, 0x12120000, 0xedee0000,<br>
+       0x14050000, 0xebfb0000, 0x05140000, 0x00000808, 0x08080808, 0xf7f80808, 0x0afd0808, 0xf5030808,<br>
+       0xfd0b0808, 0x02f50808, 0x12120808, 0xedee0808, 0x14050808, 0xebfb0808, 0x05140808, 0xfffff7f8,<br>
+       0x0807f7f8, 0xf7f7f7f8, 0x0afcf7f8, 0xf502f7f8, 0xfd0af7f8, 0x02f4f7f8, 0x1211f7f8, 0xededf7f8,<br>
+       0x1404f7f8, 0xebfaf7f8, 0x0513f7f8, 0x00000afd, 0x08080afd, 0xf7f80afd, 0x0afd0afd, 0xf5030afd,<br>
+       0xfd0b0afd, 0x02f50afd, 0x12120afd, 0xedee0afd, 0x14050afd, 0xebfb0afd, 0x05140afd, 0xfffff503,<br>
+       0x0807f503, 0xf7f7f503, 0x0afcf503, 0xf502f503, 0xfd0af503, 0x02f4f503, 0x1211f503, 0xededf503,<br>
+       0x1404f503, 0xebfaf503, 0x0513f503, 0xfffffd0b, 0x0807fd0b, 0xf7f7fd0b, 0x0afcfd0b, 0xf502fd0b,<br>
+       0xfd0afd0b, 0x02f4fd0b, 0x1211fd0b, 0xededfd0b, 0x1404fd0b, 0xebfafd0b, 0x0513fd0b, 0x000002f5,<br>
+       0x080802f5, 0xf7f802f5, 0x0afd02f5, 0xf50302f5, 0xfd0b02f5, 0x02f502f5, 0x121202f5, 0xedee02f5,<br>
+       0x140502f5, 0xebfb02f5, 0x051402f5, 0x00001212, 0x08081212, 0xf7f81212, 0x0afd1212, 0xf5031212,<br>
+       0xfd0b1212, 0x02f51212, 0x12121212, 0xedee1212, 0x14051212, 0xebfb1212, 0x05141212, 0xffffedee,<br>
+       0x0807edee, 0xf7f7edee, 0x0afcedee, 0xf502edee, 0xfd0aedee, 0x02f4edee, 0x1211edee, 0xedededee,<br>
+       0x1404edee, 0xebfaedee, 0x0513edee, 0x00001405, 0x08081405, 0xf7f81405, 0x0afd1405, 0xf5031405,<br>
+       0xfd0b1405, 0x02f51405, 0x12121405, 0xedee1405, 0x14051405, 0xebfb1405, 0x05141405, 0xffffebfb,<br>
+       0x0807ebfb, 0xf7f7ebfb, 0x0afcebfb, 0xf502ebfb, 0xfd0aebfb, 0x02f4ebfb, 0x1211ebfb, 0xededebfb,<br>
+       0x1404ebfb, 0xebfaebfb, 0x0513ebfb, 0x00000514, 0x08080514, 0xf7f80514, 0x0afd0514, 0xf5030514,<br>
+       0xfd0b0514, 0x02f50514, 0x12120514, 0xedee0514, 0x14050514, 0xebfb0514, 0x05140514, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000909, 0xfffff6f7, 0x00000bfd, 0xfffff403, 0xfffffd0c, 0x000002f4, 0x00001414,<br>
+       0xffffebec, 0x00001706, 0xffffe8fa, 0x00000617, 0xfffff9e9, 0x000010ef, 0xffffef11, 0x00001af9,<br>
+       0xffffe507, 0xfffff91b, 0x000006e5, 0x00002713, 0xffffd8ed, 0x00001327, 0xffffecd9, 0x00002727,<br>
+       0xffffd8d9, 0x00002b03, 0xffffd4fd, 0x0000032b, 0xfffffcd5, 0x000023e8, 0xffffdc18, 0xffffe824,<br>
+       0x000017dc, 0x0000452a, 0xffffbad6, 0x00002a45, 0xffffd5bb, 0x000034f2, 0xffffcb0e, 0xfffff235,<br>
+       0x00000dcb, 0x00004713, 0xffffb8ed, 0x00001347, 0xffffecb9, 0x00004949, 0xffffb6b7, 0x00004ffe,<br>
+       0xffffb002, 0xfffffe50, 0x000001b0, 0x000033cc, 0xffffcc34, 0x000045d9, 0xffffba27, 0xffffd946,<br>
+       0x000026ba, 0x00007930, 0xffff86d0, 0x00003079, 0xffffcf87, 0x00007c54, 0xffff83ac, 0x0000547c,<br>
+       0xffffab84, 0x000063e5, 0xffff9c1b, 0xffffe564, 0x00001a9c, 0x000065af, 0xffff9a51, 0xffffaf66,<br>
+       0x0000509a, 0x00003737, 0xffffc8c9, 0x00006868, 0xffff9798, 0x00000000, 0x09090000, 0xf6f70000,<br>
+       0x0bfd0000, 0xf4030000, 0xfd0c0000, 0x02f40000, 0x14140000, 0xebec0000, 0x17060000, 0xe8fa0000,<br>
+       0x06170000, 0xf9e90000, 0x00000909, 0x09090909, 0xf6f70909, 0x0bfd0909, 0xf4030909, 0xfd0c0909,<br>
+       0x02f40909, 0x14140909, 0xebec0909, 0x17060909, 0xe8fa0909, 0x06170909, 0xf9e90909, 0xfffff6f7,<br>
+       0x0908f6f7, 0xf6f6f6f7, 0x0bfcf6f7, 0xf402f6f7, 0xfd0bf6f7, 0x02f3f6f7, 0x1413f6f7, 0xebebf6f7,<br>
+       0x1705f6f7, 0xe8f9f6f7, 0x0616f6f7, 0xf9e8f6f7, 0x00000bfd, 0x09090bfd, 0xf6f70bfd, 0x0bfd0bfd,<br>
+       0xf4030bfd, 0xfd0c0bfd, 0x02f40bfd, 0x14140bfd, 0xebec0bfd, 0x17060bfd, 0xe8fa0bfd, 0x06170bfd,<br>
+       0xf9e90bfd, 0xfffff403, 0x0908f403, 0xf6f6f403, 0x0bfcf403, 0xf402f403, 0xfd0bf403, 0x02f3f403,<br>
+       0x1413f403, 0xebebf403, 0x1705f403, 0xe8f9f403, 0x0616f403, 0xf9e8f403, 0xfffffd0c, 0x0908fd0c,<br>
+       0xf6f6fd0c, 0x0bfcfd0c, 0xf402fd0c, 0xfd0bfd0c, 0x02f3fd0c, 0x1413fd0c, 0xebebfd0c, 0x1705fd0c,<br>
+       0xe8f9fd0c, 0x0616fd0c, 0xf9e8fd0c, 0x000002f4, 0x090902f4, 0xf6f702f4, 0x0bfd02f4, 0xf40302f4,<br>
+       0xfd0c02f4, 0x02f402f4, 0x141402f4, 0xebec02f4, 0x170602f4, 0xe8fa02f4, 0x061702f4, 0xf9e902f4,<br>
+       0x00001414, 0x09091414, 0xf6f71414, 0x0bfd1414, 0xf4031414, 0xfd0c1414, 0x02f41414, 0x14141414,<br>
+       0xebec1414, 0x17061414, 0xe8fa1414, 0x06171414, 0xf9e91414, 0xffffebec, 0x0908ebec, 0xf6f6ebec,<br>
+       0x0bfcebec, 0xf402ebec, 0xfd0bebec, 0x02f3ebec, 0x1413ebec, 0xebebebec, 0x1705ebec, 0xe8f9ebec,<br>
+       0x0616ebec, 0xf9e8ebec, 0x00001706, 0x09091706, 0xf6f71706, 0x0bfd1706, 0xf4031706, 0xfd0c1706,<br>
+       0x02f41706, 0x14141706, 0xebec1706, 0x17061706, 0xe8fa1706, 0x06171706, 0xf9e91706, 0xffffe8fa,<br>
+       0x0908e8fa, 0xf6f6e8fa, 0x0bfce8fa, 0xf402e8fa, 0xfd0be8fa, 0x02f3e8fa, 0x1413e8fa, 0xebebe8fa,<br>
+       0x1705e8fa, 0xe8f9e8fa, 0x0616e8fa, 0xf9e8e8fa, 0x00000617, 0x09090617, 0xf6f70617, 0x0bfd0617,<br>
+       0xf4030617, 0xfd0c0617, 0x02f40617, 0x14140617, 0xebec0617, 0x17060617, 0xe8fa0617, 0x06170617,<br>
+       0xf9e90617, 0xfffff9e9, 0x0908f9e9, 0xf6f6f9e9, 0x0bfcf9e9, 0xf402f9e9, 0xfd0bf9e9, 0x02f3f9e9,<br>
+       0x1413f9e9, 0xebebf9e9, 0x1705f9e9, 0xe8f9f9e9, 0x0616f9e9, 0xf9e8f9e9, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404,<br>
+       0xfffffbfc, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x000003fc, 0xfffffc04, 0x000005fe,<br>
+       0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000804, 0xfffff7fc, 0x00000408, 0xfffffbf8, 0x00000808,<br>
+       0xfffff7f8, 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x000007fc, 0xfffff804, 0xfffffc08,<br>
+       0x000003f8, 0x00000e08, 0xfffff1f8, 0x0000080e, 0xfffff7f2, 0x00000bfe, 0xfffff402, 0xfffffe0c,<br>
+       0x000001f4, 0x00001004, 0xffffeffc, 0x00000410, 0xfffffbf0, 0x00001010, 0xffffeff0, 0x00001200,<br>
+       0xffffee00, 0x00000012, 0xffffffee, 0x00000bf4, 0xfffff40c, 0x00000ff8, 0xfffff008, 0xfffff810,<br>
+       0x000007f0, 0x00001a0a, 0xffffe5f6, 0x00000a1a, 0xfffff5e6, 0x00001c12, 0xffffe3ee, 0x0000121c,<br>
+       0xffffede4, 0x000015fa, 0xffffea06, 0xfffffa16, 0x000005ea, 0x00001c04, 0xffffe3fc, 0x0000041c,<br>
+       0xfffffbe4, 0x00001e1e, 0xffffe1e2, 0x00001ffe, 0xffffe002, 0xfffffe20, 0x000001e0, 0x000015ee,<br>
+       0xffffea12, 0xffffee16, 0x000011ea, 0x00001df2, 0xffffe20e, 0xfffff21e, 0x00000de2, 0x00002e16,<br>
+       0xffffd1ea, 0x0000162e, 0xffffe9d2, 0x00002e0c, 0xffffd1f4, 0x00000c2e, 0xfffff3d2, 0x00003022,<br>
+       0xffffcfde, 0x00002230, 0xffffddd0, 0x000027f6, 0xffffd80a, 0xfffff628, 0x000009d8, 0x00003204,<br>
+       0xffffcdfc, 0x00000432, 0xfffffbce, 0x00003636, 0xffffc9ca, 0x000021de, 0xffffde22, 0x000029e4,<br>
+       0xffffd61c, 0xffffe42a, 0x00001bd6, 0x00003bfa, 0xffffc406, 0xfffffa3c, 0x000005c4, 0x00004c1a,<br>
+       0xffffb3e6, 0x00001a4c, 0xffffe5b4, 0x00004c2a, 0xffffb3d6, 0x00002a4c, 0xffffd5b4, 0x000035e8,<br>
+       0xffffca18, 0xffffe836, 0x000017ca, 0x00004e0e, 0xffffb1f2, 0x00000e4e, 0xfffff1b2, 0x0000523e,<br>
+       0xffffadc2, 0x00003e52, 0xffffc1ae, 0x000049ec, 0xffffb614, 0xffffec4a, 0x000013b6, 0x00005802,<br>
+       0xffffa7fe, 0x00000258, 0xfffffda8, 0x00005c5c, 0xffffa3a4, 0x00003bcc, 0xffffc434, 0xffffcc3c,<br>
+       0x000033c4, 0x00007634, 0xffff89cc, 0x00003476, 0xffffcb8a, 0x000049d4, 0xffffb62c, 0xffffd44a,<br>
+       0x00002bb6, 0x0000764a, 0xffff89b6, 0x00004a76, 0xffffb58a, 0x00007620, 0xffff89e0, 0x00002076,<br>
+       0xffffdf8a, 0x000065f4, 0xffff9a0c, 0xfffff466, 0x00000b9a, 0x00005fd8, 0xffffa028, 0xffffd860,<br>
+       0x000027a0, 0x000075de, 0xffff8a22, 0xffffde76, 0x0000218a, 0x000057a8, 0xffffa858, 0x000067b2,<br>
+       0xffff984e, 0xffffb268, 0x00004d98, 0x00000c0c, 0xfffff3f4, 0x00001616, 0xffffe9ea, 0x00002a2a,<br>
+       0xffffd5d6, 0x00004848, 0xffffb7b8, 0x00000000, 0x02020000, 0xfdfe0000, 0x02000000, 0xfe000000,<br>
+       0x00020000, 0xfffe0000, 0x00000202, 0x02020202, 0xfdfe0202, 0x02000202, 0xfe000202, 0x00020202,<br>
+       0xfffe0202, 0xfffffdfe, 0x0201fdfe, 0xfdfdfdfe, 0x01fffdfe, 0xfdfffdfe, 0x0001fdfe, 0xfffdfdfe,<br>
+       0x00000200, 0x02020200, 0xfdfe0200, 0x02000200, 0xfe000200, 0x00020200, 0xfffe0200, 0xfffffe00,<br>
+       0x0201fe00, 0xfdfdfe00, 0x01fffe00, 0xfdfffe00, 0x0001fe00, 0xfffdfe00, 0x00000002, 0x02020002,<br>
+       0xfdfe0002, 0x02000002, 0xfe000002, 0x00020002, 0xfffe0002, 0xfffffffe, 0x0201fffe, 0xfdfdfffe,<br>
+       0x01fffffe, 0xfdfffffe, 0x0001fffe, 0xfffdfffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000303, 0xfffffcfd, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606,<br>
+       0xfffff9fa, 0x00000903, 0xfffff6fd, 0x00000309, 0xfffffcf7, 0x000008fd, 0xfffff703, 0xfffffd09,<br>
+       0x000002f7, 0x000005fa, 0xfffffa06, 0x00000c06, 0xfffff3fa, 0x0000060c, 0xfffff9f4, 0x00000c0c,<br>
+       0xfffff3f4, 0x00000f00, 0xfffff100, 0x0000000f, 0xfffffff1, 0x00000bf7, 0xfffff409, 0xfffff70c,<br>
+       0x000008f4, 0x0000180f, 0xffffe7f1, 0x00000f18, 0xfffff0e8, 0x000011fa, 0xffffee06, 0xfffffa12,<br>
+       0x000005ee, 0x00001806, 0xffffe7fa, 0x00000618, 0xfffff9e8, 0x00001818, 0xffffe7e8, 0x00001b00,<br>
+       0xffffe500, 0x0000001b, 0xffffffe5, 0x000011ee, 0xffffee12, 0x000017f4, 0xffffe80c, 0xfffff418,<br>
+       0x00000be8, 0x0000270f, 0xffffd8f1, 0x00000f27, 0xfffff0d9, 0x00002a1b, 0xffffd5e5, 0x00001b2a,<br>
+       0xffffe4d6, 0x000020f7, 0xffffdf09, 0xfffff721, 0x000008df, 0x00002a06, 0xffffd5fa, 0x0000062a,<br>
+       0xfffff9d6, 0x00002d2d, 0xffffd2d3, 0x000032fd, 0xffffcd03, 0xfffffd33, 0x000002cd, 0x000020e5,<br>
+       0xffffdf1b, 0xffffe521, 0x00001adf, 0x00002ceb, 0xffffd315, 0xffffeb2d, 0x000014d3, 0x00004521,<br>
+       0xffffbadf, 0x00002145, 0xffffdebb, 0x00004512, 0xffffbaee, 0x00001245, 0xffffedbb, 0x00004836,<br>
+       0xffffb7ca, 0x00003648, 0xffffc9b8, 0x00003eee, 0xffffc112, 0xffffee3f, 0x000011c1, 0x00004e06,<br>
+       0xffffb1fa, 0x0000064e, 0xfffff9b2, 0x00005151, 0xffffaeaf, 0x000032cd, 0xffffcd33, 0x00003ed6,<br>
+       0xffffc12a, 0xffffd63f, 0x000029c1, 0x000059f7, 0xffffa609, 0xfffff75a, 0x000008a6, 0x0000722a,<br>
+       0xffff8dd6, 0x00002a72, 0xffffd58e, 0x0000753f, 0xffff8ac1, 0x00003f75, 0xffffc08b, 0x000050dc,<br>
+       0xffffaf24, 0xffffdc51, 0x000023af, 0x00007815, 0xffff87eb, 0x00001578, 0xffffea88, 0x00007b60,<br>
+       0xffff84a0, 0x0000607b, 0xffff9f85, 0x00006ee2, 0xffff911e, 0xffffe26f, 0x00001d91, 0x00005cb2,<br>
+       0xffffa34e, 0xffffb25d, 0x00004da3, 0x000071bb, 0xffff8e45, 0xffffbb72, 0x0000448e, 0x00001212,<br>
+       0xffffedee, 0x00002121, 0xffffdedf, 0x00003f3f, 0xffffc0c1, 0x00006c6c, 0xffff9394, 0x00000000,<br>
+       0x03030000, 0xfcfd0000, 0x03000000, 0xfd000000, 0x00030000, 0xfffd0000, 0x06060000, 0xf9fa0000,<br>
+       0x00000303, 0x03030303, 0xfcfd0303, 0x03000303, 0xfd000303, 0x00030303, 0xfffd0303, 0x06060303,<br>
+       0xf9fa0303, 0xfffffcfd, 0x0302fcfd, 0xfcfcfcfd, 0x02fffcfd, 0xfcfffcfd, 0x0002fcfd, 0xfffcfcfd,<br>
+       0x0605fcfd, 0xf9f9fcfd, 0x00000300, 0x03030300, 0xfcfd0300, 0x03000300, 0xfd000300, 0x00030300,<br>
+       0xfffd0300, 0x06060300, 0xf9fa0300, 0xfffffd00, 0x0302fd00, 0xfcfcfd00, 0x02fffd00, 0xfcfffd00,<br>
+       0x0002fd00, 0xfffcfd00, 0x0605fd00, 0xf9f9fd00, 0x00000003, 0x03030003, 0xfcfd0003, 0x03000003,<br>
+       0xfd000003, 0x00030003, 0xfffd0003, 0x06060003, 0xf9fa0003, 0xfffffffd, 0x0302fffd, 0xfcfcfffd,<br>
+       0x02fffffd, 0xfcfffffd, 0x0002fffd, 0xfffcfffd, 0x0605fffd, 0xf9f9fffd, 0x00000606, 0x03030606,<br>
+       0xfcfd0606, 0x03000606, 0xfd000606, 0x00030606, 0xfffd0606, 0x06060606, 0xf9fa0606, 0xfffff9fa,<br>
+       0x0302f9fa, 0xfcfcf9fa, 0x02fff9fa, 0xfcfff9fa, 0x0002f9fa, 0xfffcf9fa, 0x0605f9fa, 0xf9f9f9fa,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000404, 0xfffffbfc, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000804,<br>
+       0xfffff7fc, 0x00000408, 0xfffffbf8, 0x00000808, 0xfffff7f8, 0x000007f8, 0xfffff808, 0x00000bfc,<br>
+       0xfffff404, 0xfffffc0c, 0x000003f4, 0x00001008, 0xffffeff8, 0x00000810, 0xfffff7f0, 0x00001010,<br>
+       0xffffeff0, 0x00001400, 0xffffec00, 0x00000014, 0xffffffec, 0x00000ff4, 0xfffff00c, 0xfffff410,<br>
+       0x00000bf0, 0x000017fc, 0xffffe804, 0xfffffc18, 0x000003e8, 0x00002010, 0xffffdff0, 0x00001020,<br>
+       0xffffefe0, 0x00002008, 0xffffdff8, 0x00000820, 0xfffff7e0, 0x00002020, 0xffffdfe0, 0x00002400,<br>
+       0xffffdc00, 0x00000024, 0xffffffdc, 0x000017e8, 0xffffe818, 0x00001ff0, 0xffffe010, 0xfffff020,<br>
+       0x00000fe0, 0x00003414, 0xffffcbec, 0x00001434, 0xffffebcc, 0x00003824, 0xffffc7dc, 0x00002438,<br>
+       0xffffdbc8, 0x00002bf4, 0xffffd40c, 0xfffff42c, 0x00000bd4, 0x00003808, 0xffffc7f8, 0x00000838,<br>
+       0xfffff7c8, 0x00003c3c, 0xffffc3c4, 0x00003ffc, 0xffffc004, 0xfffffc40, 0x000003c0, 0x00002bdc,<br>
+       0xffffd424, 0xffffdc2c, 0x000023d4, 0x00003be4, 0xffffc41c, 0xffffe43c, 0x00001bc4, 0x00005c2c,<br>
+       0xffffa3d4, 0x00002c5c, 0xffffd3a4, 0x00005c18, 0xffffa3e8, 0x0000185c, 0xffffe7a4, 0x00006048,<br>
+       0xffff9fb8, 0x00004860, 0xffffb7a0, 0x000053ec, 0xffffac14, 0xffffec54, 0x000013ac, 0x00006408,<br>
+       0xffff9bf8, 0x00000864, 0xfffff79c, 0x00006c6c, 0xffff9394, 0x000043bc, 0xffffbc44, 0x000053c8,<br>
+       0xffffac38, 0xffffc854, 0x000037ac, 0x000077f4, 0xffff880c, 0xfffff478, 0x00000b88, 0x00006bd0,<br>
+       0xffff9430, 0xffffd06c, 0x00002f94, 0x00007b98, 0xffff8468, 0xffff987c, 0x00006784, 0x00001818,<br>
+       0xffffe7e8, 0x00002c2c, 0xffffd3d4, 0x00005454, 0xffffabac, 0x00000000, 0x04040000, 0xfbfc0000,<br>
+       0x04000000, 0xfc000000, 0x00040000, 0xfffc0000, 0x08040000, 0xf7fc0000, 0x04080000, 0x00000404,<br>
+       0x04040404, 0xfbfc0404, 0x04000404, 0xfc000404, 0x00040404, 0xfffc0404, 0x08040404, 0xf7fc0404,<br>
+       0x04080404, 0xfffffbfc, 0x0403fbfc, 0xfbfbfbfc, 0x03fffbfc, 0xfbfffbfc, 0x0003fbfc, 0xfffbfbfc,<br>
+       0x0803fbfc, 0xf7fbfbfc, 0x0407fbfc, 0x00000400, 0x04040400, 0xfbfc0400, 0x04000400, 0xfc000400,<br>
+       0x00040400, 0xfffc0400, 0x08040400, 0xf7fc0400, 0x04080400, 0xfffffc00, 0x0403fc00, 0xfbfbfc00,<br>
+       0x03fffc00, 0xfbfffc00, 0x0003fc00, 0xfffbfc00, 0x0803fc00, 0xf7fbfc00, 0x0407fc00, 0x00000004,<br>
+       0x04040004, 0xfbfc0004, 0x04000004, 0xfc000004, 0x00040004, 0xfffc0004, 0x08040004, 0xf7fc0004,<br>
+       0x04080004, 0xfffffffc, 0x0403fffc, 0xfbfbfffc, 0x03fffffc, 0xfbfffffc, 0x0003fffc, 0xfffbfffc,<br>
+       0x0803fffc, 0xf7fbfffc, 0x0407fffc, 0x00000804, 0x04040804, 0xfbfc0804, 0x04000804, 0xfc000804,<br>
+       0x00040804, 0xfffc0804, 0x08040804, 0xf7fc0804, 0x04080804, 0xfffff7fc, 0x0403f7fc, 0xfbfbf7fc,<br>
+       0x03fff7fc, 0xfbfff7fc, 0x0003f7fc, 0xfffbf7fc, 0x0803f7fc, 0xf7fbf7fc, 0x0407f7fc, 0x00000408,<br>
+       0x04040408, 0xfbfc0408, 0x04000408, 0xfc000408, 0x00040408, 0xfffc0408, 0x08040408, 0xf7fc0408,<br>
+       0x04080408, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000505, 0xfffffafb, 0x00000500, 0xfffffb00, 0x00000005, 0xfffffffb, 0x00000a0a,<br>
+       0xfffff5f6, 0x00000f05, 0xfffff0fb, 0x0000050f, 0xfffffaf1, 0x000009f6, 0xfffff60a, 0x00000efb,<br>
+       0xfffff105, 0xfffffb0f, 0x000004f1, 0x0000140a, 0xffffebf6, 0x00000a14, 0xfffff5ec, 0x00001414,<br>
+       0xffffebec, 0x00001900, 0xffffe700, 0x00000019, 0xffffffe7, 0x000013f1, 0xffffec0f, 0xfffff114,<br>
+       0x00000eec, 0x00002819, 0xffffd7e7, 0x00001928, 0xffffe6d8, 0x00001df6, 0xffffe20a, 0xfffff61e,<br>
+       0x000009e2, 0x0000280a, 0xffffd7f6, 0x00000a28, 0xfffff5d8, 0x00002828, 0xffffd7d8, 0x00002d00,<br>
+       0xffffd300, 0x0000002d, 0xffffffd3, 0x00001de2, 0xffffe21e, 0x000027ec, 0xffffd814, 0xffffec28,<br>
+       0x000013d8, 0x00004119, 0xffffbee7, 0x00001941, 0xffffe6bf, 0x0000462d, 0xffffb9d3, 0x00002d46,<br>
+       0xffffd2ba, 0x000036f1, 0xffffc90f, 0xfffff137, 0x00000ec9, 0x0000460a, 0xffffb9f6, 0x00000a46,<br>
+       0xfffff5ba, 0x00004b4b, 0xffffb4b5, 0x000054fb, 0xffffab05, 0xfffffb55, 0x000004ab, 0x000036d3,<br>
+       0xffffc92d, 0xffffd337, 0x00002cc9, 0x00004add, 0xffffb523, 0xffffdd4b, 0x000022b5, 0x00007337,<br>
+       0xffff8cc9, 0x00003773, 0xffffc88d, 0x0000731e, 0xffff8ce2, 0x00001e73, 0xffffe18d, 0x0000785a,<br>
+       0xffff87a6, 0x00005a78, 0xffffa588, 0x000068e2, 0xffff971e, 0xffffe269, 0x00001d97, 0x000054ab,<br>
+       0xffffab55, 0x000068ba, 0xffff9746, 0xffffba69, 0x00004597, 0x00001e1e, 0xffffe1e2, 0x00003c3c,<br>
+       0xffffc3c4, 0x00006969, 0xffff9697, 0x00000000, 0x05050000, 0xfafb0000, 0x05000000, 0xfb000000,<br>
+       0x00050000, 0xfffb0000, 0x0a0a0000, 0xf5f60000, 0x0f050000, 0xf0fb0000, 0x00000505, 0x05050505,<br>
+       0xfafb0505, 0x05000505, 0xfb000505, 0x00050505, 0xfffb0505, 0x0a0a0505, 0xf5f60505, 0x0f050505,<br>
+       0xf0fb0505, 0xfffffafb, 0x0504fafb, 0xfafafafb, 0x04fffafb, 0xfafffafb, 0x0004fafb, 0xfffafafb,<br>
+       0x0a09fafb, 0xf5f5fafb, 0x0f04fafb, 0xf0fafafb, 0x00000500, 0x05050500, 0xfafb0500, 0x05000500,<br>
+       0xfb000500, 0x00050500, 0xfffb0500, 0x0a0a0500, 0xf5f60500, 0x0f050500, 0xf0fb0500, 0xfffffb00,<br>
+       0x0504fb00, 0xfafafb00, 0x04fffb00, 0xfafffb00, 0x0004fb00, 0xfffafb00, 0x0a09fb00, 0xf5f5fb00,<br>
+       0x0f04fb00, 0xf0fafb00, 0x00000005, 0x05050005, 0xfafb0005, 0x05000005, 0xfb000005, 0x00050005,<br>
+       0xfffb0005, 0x0a0a0005, 0xf5f60005, 0x0f050005, 0xf0fb0005, 0xfffffffb, 0x0504fffb, 0xfafafffb,<br>
+       0x04fffffb, 0xfafffffb, 0x0004fffb, 0xfffafffb, 0x0a09fffb, 0xf5f5fffb, 0x0f04fffb, 0xf0fafffb,<br>
+       0x00000a0a, 0x05050a0a, 0xfafb0a0a, 0x05000a0a, 0xfb000a0a, 0x00050a0a, 0xfffb0a0a, 0x0a0a0a0a,<br>
+       0xf5f60a0a, 0x0f050a0a, 0xf0fb0a0a, 0xfffff5f6, 0x0504f5f6, 0xfafaf5f6, 0x04fff5f6, 0xfafff5f6,<br>
+       0x0004f5f6, 0xfffaf5f6, 0x0a09f5f6, 0xf5f5f5f6, 0x0f04f5f6, 0xf0faf5f6, 0x00000f05, 0x05050f05,<br>
+       0xfafb0f05, 0x05000f05, 0xfb000f05, 0x00050f05, 0xfffb0f05, 0x0a0a0f05, 0xf5f60f05, 0x0f050f05,<br>
+       0xf0fb0f05, 0xfffff0fb, 0x0504f0fb, 0xfafaf0fb, 0x04fff0fb, 0xfafff0fb, 0x0004f0fb, 0xfffaf0fb,<br>
+       0x0a09f0fb, 0xf5f5f0fb, 0x0f04f0fb, 0xf0faf0fb, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000606, 0xfffff9fa, 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x00000c0c,<br>
+       0xfffff3f4, 0x00000c06, 0xfffff3fa, 0x0000060c, 0xfffff9f4, 0x00000bf4, 0xfffff40c, 0x000011fa,<br>
+       0xffffee06, 0xfffffa12, 0x000005ee, 0x0000180c, 0xffffe7f4, 0x00000c18, 0xfffff3e8, 0x00001818,<br>
+       0xffffe7e8, 0x00001e00, 0xffffe200, 0x0000001e, 0xffffffe2, 0x000017ee, 0xffffe812, 0xffffee18,<br>
+       0x000011e8, 0x0000301e, 0xffffcfe2, 0x00001e30, 0xffffe1d0, 0x000023fa, 0xffffdc06, 0xfffffa24,<br>
+       0x000005dc, 0x0000300c, 0xffffcff4, 0x00000c30, 0xfffff3d0, 0x00003030, 0xffffcfd0, 0x00003600,<br>
+       0xffffca00, 0x00000036, 0xffffffca, 0x000023dc, 0xffffdc24, 0x00002fe8, 0xffffd018, 0xffffe830,<br>
+       0x000017d0, 0x00004e1e, 0xffffb1e2, 0x00001e4e, 0xffffe1b2, 0x00005436, 0xffffabca, 0x00003654,<br>
+       0xffffc9ac, 0x000041ee, 0xffffbe12, 0xffffee42, 0x000011be, 0x0000540c, 0xffffabf4, 0x00000c54,<br>
+       0xfffff3ac, 0x00005a5a, 0xffffa5a6, 0x00005ffa, 0xffffa006, 0xfffffa60, 0x000005a0, 0x000041ca,<br>
+       0xffffbe36, 0xffffca42, 0x000035be, 0x000059d6, 0xffffa62a, 0xffffd65a, 0x000029a6, 0x00007de2,<br>
+       0xffff821e, 0xffffe27e, 0x00001d82, 0x0000659a, 0xffff9a66, 0x00007dac, 0xffff8254, 0xffffac7e,<br>
+       0x00005382, 0x00002424, 0xffffdbdc, 0x00004242, 0xffffbdbe, 0x00000000, 0x06060000, 0xf9fa0000,<br>
+       0x06000000, 0xfa000000, 0x00060000, 0xfffa0000, 0x0c0c0000, 0xf3f40000, 0x0c060000, 0xf3fa0000,<br>
+       0x060c0000, 0x00000606, 0x06060606, 0xf9fa0606, 0x06000606, 0xfa000606, 0x00060606, 0xfffa0606,<br>
+       0x0c0c0606, 0xf3f40606, 0x0c060606, 0xf3fa0606, 0x060c0606, 0xfffff9fa, 0x0605f9fa, 0xf9f9f9fa,<br>
+       0x05fff9fa, 0xf9fff9fa, 0x0005f9fa, 0xfff9f9fa, 0x0c0bf9fa, 0xf3f3f9fa, 0x0c05f9fa, 0xf3f9f9fa,<br>
+       0x060bf9fa, 0x00000600, 0x06060600, 0xf9fa0600, 0x06000600, 0xfa000600, 0x00060600, 0xfffa0600,<br>
+       0x0c0c0600, 0xf3f40600, 0x0c060600, 0xf3fa0600, 0x060c0600, 0xfffffa00, 0x0605fa00, 0xf9f9fa00,<br>
+       0x05fffa00, 0xf9fffa00, 0x0005fa00, 0xfff9fa00, 0x0c0bfa00, 0xf3f3fa00, 0x0c05fa00, 0xf3f9fa00,<br>
+       0x060bfa00, 0x00000006, 0x06060006, 0xf9fa0006, 0x06000006, 0xfa000006, 0x00060006, 0xfffa0006,<br>
+       0x0c0c0006, 0xf3f40006, 0x0c060006, 0xf3fa0006, 0x060c0006, 0xfffffffa, 0x0605fffa, 0xf9f9fffa,<br>
+       0x05fffffa, 0xf9fffffa, 0x0005fffa, 0xfff9fffa, 0x0c0bfffa, 0xf3f3fffa, 0x0c05fffa, 0xf3f9fffa,<br>
+       0x060bfffa, 0x00000c0c, 0x06060c0c, 0xf9fa0c0c, 0x06000c0c, 0xfa000c0c, 0x00060c0c, 0xfffa0c0c,<br>
+       0x0c0c0c0c, 0xf3f40c0c, 0x0c060c0c, 0xf3fa0c0c, 0x060c0c0c, 0xfffff3f4, 0x0605f3f4, 0xf9f9f3f4,<br>
+       0x05fff3f4, 0xf9fff3f4, 0x0005f3f4, 0xfff9f3f4, 0x0c0bf3f4, 0xf3f3f3f4, 0x0c05f3f4, 0xf3f9f3f4,<br>
+       0x060bf3f4, 0x00000c06, 0x06060c06, 0xf9fa0c06, 0x06000c06, 0xfa000c06, 0x00060c06, 0xfffa0c06,<br>
+       0x0c0c0c06, 0xf3f40c06, 0x0c060c06, 0xf3fa0c06, 0x060c0c06, 0xfffff3fa, 0x0605f3fa, 0xf9f9f3fa,<br>
+       0x05fff3fa, 0xf9fff3fa, 0x0005f3fa, 0xfff9f3fa, 0x0c0bf3fa, 0xf3f3f3fa, 0x0c05f3fa, 0xf3f9f3fa,<br>
+       0x060bf3fa, 0x0000060c, 0x0606060c, 0xf9fa060c, 0x0600060c, 0xfa00060c, 0x0006060c, 0xfffa060c,<br>
+       0x0c0c060c, 0xf3f4060c, 0x0c06060c, 0xf3fa060c, 0x060c060c, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000707, 0xfffff8f9, 0x00000700, 0xfffff900, 0x00000007, 0xfffffff9, 0x00000e0e,<br>
+       0xfffff1f2, 0x00001507, 0xffffeaf9, 0x00000715, 0xfffff8eb, 0x00000df2, 0xfffff20e, 0x000014f9,<br>
+       0xffffeb07, 0xfffff915, 0x000006eb, 0x00001c0e, 0xffffe3f2, 0x00000e1c, 0xfffff1e4, 0x00001c1c,<br>
+       0xffffe3e4, 0x00002300, 0xffffdd00, 0x00000023, 0xffffffdd, 0x00001beb, 0xffffe415, 0xffffeb1c,<br>
+       0x000014e4, 0x00003823, 0xffffc7dd, 0x00002338, 0xffffdcc8, 0x000029f2, 0xffffd60e, 0xfffff22a,<br>
+       0x00000dd6, 0x0000380e, 0xffffc7f2, 0x00000e38, 0xfffff1c8, 0x00003838, 0xffffc7c8, 0x00003f00,<br>
+       0xffffc100, 0x0000003f, 0xffffffc1, 0x000029d6, 0xffffd62a, 0x000037e4, 0xffffc81c, 0xffffe438,<br>
+       0x00001bc8, 0x00005b23, 0xffffa4dd, 0x0000235b, 0xffffdca5, 0x0000623f, 0xffff9dc1, 0x00003f62,<br>
+       0xffffc09e, 0x00004ceb, 0xffffb315, 0xffffeb4d, 0x000014b3, 0x0000620e, 0xffff9df2, 0x00000e62,<br>
+       0xfffff19e, 0x00006969, 0xffff9697, 0x000076f9, 0xffff8907, 0xfffff977, 0x00000689, 0x00004cc1,<br>
+       0xffffb33f, 0xffffc14d, 0x00003eb3, 0x000068cf, 0xffff9731, 0xffffcf69, 0x00003097, 0x00007689,<br>
+       0xffff8977, 0x00002a2a, 0xffffd5d6, 0x00004d4d, 0xffffb2b3, 0x00000000, 0x07070000, 0xf8f90000,<br>
+       0x07000000, 0xf9000000, 0x00070000, 0xfff90000, 0x0e0e0000, 0xf1f20000, 0x15070000, 0xeaf90000,<br>
+       0x07150000, 0x00000707, 0x07070707, 0xf8f90707, 0x07000707, 0xf9000707, 0x00070707, 0xfff90707,<br>
+       0x0e0e0707, 0xf1f20707, 0x15070707, 0xeaf90707, 0x07150707, 0xfffff8f9, 0x0706f8f9, 0xf8f8f8f9,<br>
+       0x06fff8f9, 0xf8fff8f9, 0x0006f8f9, 0xfff8f8f9, 0x0e0df8f9, 0xf1f1f8f9, 0x1506f8f9, 0xeaf8f8f9,<br>
+       0x0714f8f9, 0x00000700, 0x07070700, 0xf8f90700, 0x07000700, 0xf9000700, 0x00070700, 0xfff90700,<br>
+       0x0e0e0700, 0xf1f20700, 0x15070700, 0xeaf90700, 0x07150700, 0xfffff900, 0x0706f900, 0xf8f8f900,<br>
+       0x06fff900, 0xf8fff900, 0x0006f900, 0xfff8f900, 0x0e0df900, 0xf1f1f900, 0x1506f900, 0xeaf8f900,<br>
+       0x0714f900, 0x00000007, 0x07070007, 0xf8f90007, 0x07000007, 0xf9000007, 0x00070007, 0xfff90007,<br>
+       0x0e0e0007, 0xf1f20007, 0x15070007, 0xeaf90007, 0x07150007, 0xfffffff9, 0x0706fff9, 0xf8f8fff9,<br>
+       0x06fffff9, 0xf8fffff9, 0x0006fff9, 0xfff8fff9, 0x0e0dfff9, 0xf1f1fff9, 0x1506fff9, 0xeaf8fff9,<br>
+       0x0714fff9, 0x00000e0e, 0x07070e0e, 0xf8f90e0e, 0x07000e0e, 0xf9000e0e, 0x00070e0e, 0xfff90e0e,<br>
+       0x0e0e0e0e, 0xf1f20e0e, 0x15070e0e, 0xeaf90e0e, 0x07150e0e, 0xfffff1f2, 0x0706f1f2, 0xf8f8f1f2,<br>
+       0x06fff1f2, 0xf8fff1f2, 0x0006f1f2, 0xfff8f1f2, 0x0e0df1f2, 0xf1f1f1f2, 0x1506f1f2, 0xeaf8f1f2,<br>
+       0x0714f1f2, 0x00001507, 0x07071507, 0xf8f91507, 0x07001507, 0xf9001507, 0x00071507, 0xfff91507,<br>
+       0x0e0e1507, 0xf1f21507, 0x15071507, 0xeaf91507, 0x07151507, 0xffffeaf9, 0x0706eaf9, 0xf8f8eaf9,<br>
+       0x06ffeaf9, 0xf8ffeaf9, 0x0006eaf9, 0xfff8eaf9, 0x0e0deaf9, 0xf1f1eaf9, 0x1506eaf9, 0xeaf8eaf9,<br>
+       0x0714eaf9, 0x00000715, 0x07070715, 0xf8f90715, 0x07000715, 0xf9000715, 0x00070715, 0xfff90715,<br>
+       0x0e0e0715, 0xf1f20715, 0x15070715, 0xeaf90715, 0x07150715, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000808, 0xfffff7f8, 0x00000800, 0xfffff800, 0x00000008, 0xfffffff8, 0x00001010,<br>
+       0xffffeff0, 0x00001008, 0xffffeff8, 0x00000810, 0xfffff7f0, 0x00000ff0, 0xfffff010, 0x000017f8,<br>
+       0xffffe808, 0xfffff818, 0x000007e8, 0x00002010, 0xffffdff0, 0x00001020, 0xffffefe0, 0x00002020,<br>
+       0xffffdfe0, 0x00002800, 0xffffd800, 0x00000028, 0xffffffd8, 0x00001fe8, 0xffffe018, 0xffffe820,<br>
+       0x000017e0, 0x00004028, 0xffffbfd8, 0x00002840, 0xffffd7c0, 0x00002ff0, 0xffffd010, 0xfffff030,<br>
+       0x00000fd0, 0x00004010, 0xffffbff0, 0x00001040, 0xffffefc0, 0x00004040, 0xffffbfc0, 0x00004800,<br>
+       0xffffb800, 0x00000048, 0xffffffb8, 0x00002fd0, 0xffffd030, 0x00003fe0, 0xffffc020, 0xffffe040,<br>
+       0x00001fc0, 0x00006828, 0xffff97d8, 0x00002868, 0xffffd798, 0x00007048, 0xffff8fb8, 0x00004870,<br>
+       0xffffb790, 0x000057e8, 0xffffa818, 0xffffe858, 0x000017a8, 0x00007010, 0xffff8ff0, 0x00001070,<br>
+       0xffffef90, 0x00007878, 0xffff8788, 0x000057b8, 0xffffa848, 0xffffb858, 0x000047a8, 0x000077c8,<br>
+       0xffff8838, 0xffffc878, 0x00003788, 0x00003030, 0xffffcfd0, 0x00005858, 0xffffa7a8, 0x00000000,<br>
+       0x08080000, 0xf7f80000, 0x08000000, 0xf8000000, 0x00080000, 0xfff80000, 0x10100000, 0xeff00000,<br>
+       0x10080000, 0xeff80000, 0x08100000, 0x00000808, 0x08080808, 0xf7f80808, 0x08000808, 0xf8000808,<br>
+       0x00080808, 0xfff80808, 0x10100808, 0xeff00808, 0x10080808, 0xeff80808, 0x08100808, 0xfffff7f8,<br>
+       0x0807f7f8, 0xf7f7f7f8, 0x07fff7f8, 0xf7fff7f8, 0x0007f7f8, 0xfff7f7f8, 0x100ff7f8, 0xefeff7f8,<br>
+       0x1007f7f8, 0xeff7f7f8, 0x080ff7f8, 0x00000800, 0x08080800, 0xf7f80800, 0x08000800, 0xf8000800,<br>
+       0x00080800, 0xfff80800, 0x10100800, 0xeff00800, 0x10080800, 0xeff80800, 0x08100800, 0xfffff800,<br>
+       0x0807f800, 0xf7f7f800, 0x07fff800, 0xf7fff800, 0x0007f800, 0xfff7f800, 0x100ff800, 0xefeff800,<br>
+       0x1007f800, 0xeff7f800, 0x080ff800, 0x00000008, 0x08080008, 0xf7f80008, 0x08000008, 0xf8000008,<br>
+       0x00080008, 0xfff80008, 0x10100008, 0xeff00008, 0x10080008, 0xeff80008, 0x08100008, 0xfffffff8,<br>
+       0x0807fff8, 0xf7f7fff8, 0x07fffff8, 0xf7fffff8, 0x0007fff8, 0xfff7fff8, 0x100ffff8, 0xefeffff8,<br>
+       0x1007fff8, 0xeff7fff8, 0x080ffff8, 0x00001010, 0x08081010, 0xf7f81010, 0x08001010, 0xf8001010,<br>
+       0x00081010, 0xfff81010, 0x10101010, 0xeff01010, 0x10081010, 0xeff81010, 0x08101010, 0xffffeff0,<br>
+       0x0807eff0, 0xf7f7eff0, 0x07ffeff0, 0xf7ffeff0, 0x0007eff0, 0xfff7eff0, 0x100feff0, 0xefefeff0,<br>
+       0x1007eff0, 0xeff7eff0, 0x080feff0, 0x00001008, 0x08081008, 0xf7f81008, 0x08001008, 0xf8001008,<br>
+       0x00081008, 0xfff81008, 0x10101008, 0xeff01008, 0x10081008, 0xeff81008, 0x08101008, 0xffffeff8,<br>
+       0x0807eff8, 0xf7f7eff8, 0x07ffeff8, 0xf7ffeff8, 0x0007eff8, 0xfff7eff8, 0x100feff8, 0xefefeff8,<br>
+       0x1007eff8, 0xeff7eff8, 0x080feff8, 0x00000810, 0x08080810, 0xf7f80810, 0x08000810, 0xf8000810,<br>
+       0x00080810, 0xfff80810, 0x10100810, 0xeff00810, 0x10080810, 0xeff80810, 0x08100810, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000909, 0xfffff6f7, 0x00000900, 0xfffff700, 0x00000009, 0xfffffff7, 0x00001212,<br>
+       0xffffedee, 0x00001b09, 0xffffe4f7, 0x0000091b, 0xfffff6e5, 0x000011ee, 0xffffee12, 0x00001af7,<br>
+       0xffffe509, 0xfffff71b, 0x000008e5, 0x00002412, 0xffffdbee, 0x00001224, 0xffffeddc, 0x00002424,<br>
+       0xffffdbdc, 0x00002d00, 0xffffd300, 0x0000002d, 0xffffffd3, 0x000023e5, 0xffffdc1b, 0xffffe524,<br>
+       0x00001adc, 0x0000482d, 0xffffb7d3, 0x00002d48, 0xffffd2b8, 0x000035ee, 0xffffca12, 0xffffee36,<br>
+       0x000011ca, 0x00004812, 0xffffb7ee, 0x00001248, 0xffffedb8, 0x00004848, 0xffffb7b8, 0x00005100,<br>
+       0xffffaf00, 0x00000051, 0xffffffaf, 0x000035ca, 0xffffca36, 0x000047dc, 0xffffb824, 0xffffdc48,<br>
+       0x000023b8, 0x0000752d, 0xffff8ad3, 0x00002d75, 0xffffd28b, 0x00007e51, 0xffff81af, 0x0000517e,<br>
+       0xffffae82, 0x000062e5, 0xffff9d1b, 0xffffe563, 0x00001a9d, 0x000062af, 0xffff9d51, 0xffffaf63,<br>
+       0x0000509d, 0x00003636, 0xffffc9ca, 0x00006c6c, 0xffff9394, 0x00000000, 0x09090000, 0xf6f70000,<br>
+       0x09000000, 0xf7000000, 0x00090000, 0xfff70000, 0x12120000, 0xedee0000, 0x1b090000, 0xe4f70000,<br>
+       0x091b0000, 0xf6e50000, 0x00000909, 0x09090909, 0xf6f70909, 0x09000909, 0xf7000909, 0x00090909,<br>
+       0xfff70909, 0x12120909, 0xedee0909, 0x1b090909, 0xe4f70909, 0x091b0909, 0xf6e50909, 0xfffff6f7,<br>
+       0x0908f6f7, 0xf6f6f6f7, 0x08fff6f7, 0xf6fff6f7, 0x0008f6f7, 0xfff6f6f7, 0x1211f6f7, 0xededf6f7,<br>
+       0x1b08f6f7, 0xe4f6f6f7, 0x091af6f7, 0xf6e4f6f7, 0x00000900, 0x09090900, 0xf6f70900, 0x09000900,<br>
+       0xf7000900, 0x00090900, 0xfff70900, 0x12120900, 0xedee0900, 0x1b090900, 0xe4f70900, 0x091b0900,<br>
+       0xf6e50900, 0xfffff700, 0x0908f700, 0xf6f6f700, 0x08fff700, 0xf6fff700, 0x0008f700, 0xfff6f700,<br>
+       0x1211f700, 0xededf700, 0x1b08f700, 0xe4f6f700, 0x091af700, 0xf6e4f700, 0x00000009, 0x09090009,<br>
+       0xf6f70009, 0x09000009, 0xf7000009, 0x00090009, 0xfff70009, 0x12120009, 0xedee0009, 0x1b090009,<br>
+       0xe4f70009, 0x091b0009, 0xf6e50009, 0xfffffff7, 0x0908fff7, 0xf6f6fff7, 0x08fffff7, 0xf6fffff7,<br>
+       0x0008fff7, 0xfff6fff7, 0x1211fff7, 0xededfff7, 0x1b08fff7, 0xe4f6fff7, 0x091afff7, 0xf6e4fff7,<br>
+       0x00001212, 0x09091212, 0xf6f71212, 0x09001212, 0xf7001212, 0x00091212, 0xfff71212, 0x12121212,<br>
+       0xedee1212, 0x1b091212, 0xe4f71212, 0x091b1212, 0xf6e51212, 0xffffedee, 0x0908edee, 0xf6f6edee,<br>
+       0x08ffedee, 0xf6ffedee, 0x0008edee, 0xfff6edee, 0x1211edee, 0xedededee, 0x1b08edee, 0xe4f6edee,<br>
+       0x091aedee, 0xf6e4edee, 0x00001b09, 0x09091b09, 0xf6f71b09, 0x09001b09, 0xf7001b09, 0x00091b09,<br>
+       0xfff71b09, 0x12121b09, 0xedee1b09, 0x1b091b09, 0xe4f71b09, 0x091b1b09, 0xf6e51b09, 0xffffe4f7,<br>
+       0x0908e4f7, 0xf6f6e4f7, 0x08ffe4f7, 0xf6ffe4f7, 0x0008e4f7, 0xfff6e4f7, 0x1211e4f7, 0xedede4f7,<br>
+       0x1b08e4f7, 0xe4f6e4f7, 0x091ae4f7, 0xf6e4e4f7, 0x0000091b, 0x0909091b, 0xf6f7091b, 0x0900091b,<br>
+       0xf700091b, 0x0009091b, 0xfff7091b, 0x1212091b, 0xedee091b, 0x1b09091b, 0xe4f7091b, 0x091b091b,<br>
+       0xf6e5091b, 0xfffff6e5, 0x0908f6e5, 0xf6f6f6e5, 0x08fff6e5, 0xf6fff6e5, 0x0008f6e5, 0xfff6f6e5,<br>
+       0x1211f6e5, 0xededf6e5, 0x1b08f6e5, 0xe4f6f6e5, 0x091af6e5, 0xf6e4f6e5, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606,<br>
+       0xfffff9fa, 0x00000700, 0xfffff900, 0x00000007, 0xfffffff9, 0x000004fb, 0xfffffb05, 0xfffffb05,<br>
+       0x000004fb, 0x00000b06, 0xfffff4fa, 0x0000060b, 0xfffff9f5, 0x00000800, 0xfffff800, 0x00000008,<br>
+       0xfffffff8, 0x00000b0b, 0xfffff4f5, 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x0000110c,<br>
+       0xffffeef4, 0x00000c11, 0xfffff3ef, 0x00001111, 0xffffeeef, 0x00001206, 0xffffedfa, 0x00000612,<br>
+       0xfffff9ee, 0x00000af8, 0xfffff508, 0xfffff80b, 0x000007f5, 0x00000f00, 0xfffff100, 0x0000000f,<br>
+       0xfffffff1, 0x00001400, 0xffffec00, 0x00000014, 0xffffffec, 0x00001912, 0xffffe6ee, 0x00001219,<br>
+       0xffffede7, 0x0000190b, 0xffffe6f5, 0x00000b19, 0xfffff4e7, 0x00001919, 0xffffe6e7, 0x00000df2,<br>
+       0xfffff20e, 0xfffff20e, 0x00000df2, 0x00001a00, 0xffffe600, 0x0000001a, 0xffffffe6, 0x000011f5,<br>
+       0xffffee0b, 0xfffff512, 0x00000aee, 0x000015f9, 0xffffea07, 0xfffff916, 0x000006ea, 0x0000221a,<br>
+       0xffffdde6, 0x00001a22, 0xffffe5de, 0x00002212, 0xffffddee, 0x00001222, 0xffffedde, 0x00002222,<br>
+       0xffffddde, 0x0000230b, 0xffffdcf5, 0x00000b23, 0xfffff4dd, 0x00001d00, 0xffffe300, 0x0000001d,<br>
+       0xffffffe3, 0x000015ed, 0xffffea13, 0xffffed16, 0x000012ea, 0x000019f1, 0xffffe60f, 0xfffff11a,<br>
+       0x00000ee6, 0x00002500, 0xffffdb00, 0x00000025, 0xffffffdb, 0x00002c1b, 0xffffd3e5, 0x00001b2c,<br>
+       0xffffe4d4, 0x00002c24, 0xffffd3dc, 0x0000242c, 0xffffdbd4, 0x00002c12, 0xffffd3ee, 0x0000122c,<br>
+       0xffffedd4, 0x000020f6, 0xffffdf0a, 0xfffff621, 0x000009df, 0x00002d2d, 0xffffd2d3, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606,<br>
+       0xfffff9fa, 0x00000700, 0xfffff900, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020300, 0x0201fd00,<br>
+       0x02020003, 0x0201fffd, 0x02020606, 0x0201f9fa, 0x02020700, 0x0201f900, 0xfdfe0000, 0xfdfe0202,<br>
+       0xfdfdfdfe, 0xfdfe0300, 0xfdfdfd00, 0xfdfe0003, 0xfdfdfffd, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0700,<br>
+       0xfdfdf900, 0x03000000, 0x03000202, 0x02fffdfe, 0x03000300, 0x02fffd00, 0x03000003, 0x02fffffd,<br>
+       0x03000606, 0x02fff9fa, 0x03000700, 0x02fff900, 0xfd000000, 0xfd000202, 0xfcfffdfe, 0xfd000300,<br>
+       0xfcfffd00, 0xfd000003, 0xfcfffffd, 0xfd000606, 0xfcfff9fa, 0xfd000700, 0xfcfff900, 0x00030000,<br>
+       0x00030202, 0x0002fdfe, 0x00030300, 0x0002fd00, 0x00030003, 0x0002fffd, 0x00030606, 0x0002f9fa,<br>
+       0x00030700, 0x0002f900, 0xfffd0000, 0xfffd0202, 0xfffcfdfe, 0xfffd0300, 0xfffcfd00, 0xfffd0003,<br>
+       0xfffcfffd, 0xfffd0606, 0xfffcf9fa, 0xfffd0700, 0xfffcf900, 0x06060000, 0x06060202, 0x0605fdfe,<br>
+       0x06060300, 0x0605fd00, 0x06060003, 0x0605fffd, 0x06060606, 0x0605f9fa, 0x06060700, 0x0605f900,<br>
+       0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0300, 0xf9f9fd00, 0xf9fa0003, 0xf9f9fffd, 0xf9fa0606,<br>
+       0xf9f9f9fa, 0xf9fa0700, 0xf9f9f900, 0x07000000, 0x07000202, 0x06fffdfe, 0x07000300, 0x06fffd00,<br>
+       0x07000003, 0x06fffffd, 0x07000606, 0x06fff9fa, 0x07000700, 0x06fff900, 0xf9000000, 0xf9000202,<br>
+       0xf8fffdfe, 0xf9000300, 0xf8fffd00, 0xf9000003, 0xf8fffffd, 0xf9000606, 0xf8fff9fa, 0xf9000700,<br>
+       0xf8fff900, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000202, 0xfffffdfe, 0x00000606,<br>
+       0xfffff9fa, 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x000003fc, 0xfffffc04, 0xfffffa0a,<br>
+       0x000005f6, 0xfffff400, 0x00000c00, 0xfffff3fa, 0xfffff406, 0x00000bfa, 0x00000c06, 0xfffffff2,<br>
+       0x0000000e, 0x00000c0c, 0xfffff3f4, 0xffffee00, 0x00001200, 0xfffff40e, 0x00000bf2, 0xfffff9ee,<br>
+       0xfffffa12, 0x000005ee, 0x00000612, 0xffffedf6, 0xffffee0a, 0x000011f6, 0x0000120a, 0xffffffea,<br>
+       0x00000016, 0xffffe800, 0x00001800, 0xfffff3ea, 0xfffff416, 0x00000bea, 0x00000c16, 0xffffe7f8,<br>
+       0xffffe808, 0x000017f8, 0x00001808, 0xfffff9e6, 0xfffffa1a, 0x000005e6, 0x0000061a, 0xffffffe4,<br>
+       0x0000001c, 0x00001414, 0xffffebec, 0xffffe5f2, 0x00001a0e, 0xfffff3e2, 0x00000c1e, 0xffffdff6,<br>
+       0x0000200a, 0xffffdfee, 0x00002012, 0xffffe5e6, 0x00001a1a, 0xffffebde, 0x00001422, 0xfffff3da,<br>
+       0x00000c26, 0xffffdfe0, 0x00002020, 0x00002020, 0xffffd7ea, 0xffffddde, 0x00002222, 0x00000000,<br>
+       0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa,<br>
+       0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x02000000, 0x02000200, 0x01fffe00, 0x02000002,<br>
+       0x01fffffe, 0x02000202, 0x01fffdfe, 0x02000606, 0x01fff9fa, 0x02000600, 0x01fffa00, 0x02000006,<br>
+       0x01fffffa, 0xfe000000, 0xfe000200, 0xfdfffe00, 0xfe000002, 0xfdfffffe, 0xfe000202, 0xfdfffdfe,<br>
+       0xfe000606, 0xfdfff9fa, 0xfe000600, 0xfdfffa00, 0xfe000006, 0xfdfffffa, 0x00020000, 0x00020200,<br>
+       0x0001fe00, 0x00020002, 0x0001fffe, 0x00020202, 0x0001fdfe, 0x00020606, 0x0001f9fa, 0x00020600,<br>
+       0x0001fa00, 0x00020006, 0x0001fffa, 0xfffe0000, 0xfffe0200, 0xfffdfe00, 0xfffe0002, 0xfffdfffe,<br>
+       0xfffe0202, 0xfffdfdfe, 0xfffe0606, 0xfffdf9fa, 0xfffe0600, 0xfffdfa00, 0xfffe0006, 0xfffdfffa,<br>
+       0x02020000, 0x02020200, 0x0201fe00, 0x02020002, 0x0201fffe, 0x02020202, 0x0201fdfe, 0x02020606,<br>
+       0x0201f9fa, 0x02020600, 0x0201fa00, 0x02020006, 0x0201fffa, 0xfdfe0000, 0xfdfe0200, 0xfdfdfe00,<br>
+       0xfdfe0002, 0xfdfdfffe, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0600, 0xfdfdfa00,<br>
+       0xfdfe0006, 0xfdfdfffa, 0x06060000, 0x06060200, 0x0605fe00, 0x06060002, 0x0605fffe, 0x06060202,<br>
+       0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060600, 0x0605fa00, 0x06060006, 0x0605fffa, 0xf9fa0000,<br>
+       0xf9fa0200, 0xf9f9fe00, 0xf9fa0002, 0xf9f9fffe, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,<br>
+       0xf9fa0600, 0xf9f9fa00, 0xf9fa0006, 0xf9f9fffa, 0x06000000, 0x06000200, 0x05fffe00, 0x06000002,<br>
+       0x05fffffe, 0x06000202, 0x05fffdfe, 0x06000606, 0x05fff9fa, 0x06000600, 0x05fffa00, 0x06000006,<br>
+       0x05fffffa, 0xfa000000, 0xfa000200, 0xf9fffe00, 0xfa000002, 0xf9fffffe, 0xfa000202, 0xf9fffdfe,<br>
+       0xfa000606, 0xf9fff9fa, 0xfa000600, 0xf9fffa00, 0xfa000006, 0xf9fffffa, 0x00060000, 0x00060200,<br>
+       0x0005fe00, 0x00060002, 0x0005fffe, 0x00060202, 0x0005fdfe, 0x00060606, 0x0005f9fa, 0x00060600,<br>
+       0x0005fa00, 0x00060006, 0x0005fffa, 0xfffa0000, 0xfffa0200, 0xfff9fe00, 0xfffa0002, 0xfff9fffe,<br>
+       0xfffa0202, 0xfff9fdfe, 0xfffa0606, 0xfff9f9fa, 0xfffa0600, 0xfff9fa00, 0xfffa0006, 0xfff9fffa,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, 0xfffffbfc, 0x00000a0a,<br>
+       0xfffff5f6, 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x000005fa, 0xfffffa06, 0xfffff80e,<br>
+       0x000007f2, 0xffffffee, 0x00000012, 0xfffff00a, 0x00000ff6, 0xffffe800, 0x00001800, 0xfffff7e8,<br>
+       0xfffff818, 0x000007e8, 0x00000818, 0x00001212, 0xffffedee, 0xfffff014, 0x00000fec, 0xffffe5f2,<br>
+       0xffffe60e, 0x000019f2, 0x00001a0e, 0xffffffe2, 0x0000001e, 0xffffde00, 0x00002200, 0xfffff7de,<br>
+       0xfffff822, 0x000007de, 0x00000822, 0xffffede2, 0xffffee1e, 0x000011e2, 0x0000121e, 0xffffddf6,<br>
+       0xffffde0a, 0x000021f6, 0x0000220a, 0xffffddec, 0x00002214, 0xffffffd8, 0x00000028, 0x00001e1e,<br>
+       0xffffe1e2, 0xffffedd8, 0x00001228, 0xffffd400, 0x00002c00, 0xffffd3f0, 0x00002c10, 0xffffdbdc,<br>
+       0xffffdbdc, 0x00002424, 0xffffd3e6, 0x00002c1a, 0xffffe5d2, 0x00001a2e, 0xffffedcc, 0x00001234,<br>
+       0xffffc9ec, 0xffffd3d4, 0x00002c2c, 0xffffc9e0, 0xffffd1d2, 0xffffd1d2, 0x00002e2e, 0x00000000,<br>
+       0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, 0xfffffbfc, 0x00000a0a, 0xfffff5f6,<br>
+       0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x02000000, 0x02000200, 0x01fffe00, 0x02000002,<br>
+       0x01fffffe, 0x02000404, 0x01fffbfc, 0x02000a0a, 0x01fff5f6, 0x02000a00, 0x01fff600, 0x0200000a,<br>
+       0x01fffff6, 0xfe000000, 0xfe000200, 0xfdfffe00, 0xfe000002, 0xfdfffffe, 0xfe000404, 0xfdfffbfc,<br>
+       0xfe000a0a, 0xfdfff5f6, 0xfe000a00, 0xfdfff600, 0xfe00000a, 0xfdfffff6, 0x00020000, 0x00020200,<br>
+       0x0001fe00, 0x00020002, 0x0001fffe, 0x00020404, 0x0001fbfc, 0x00020a0a, 0x0001f5f6, 0x00020a00,<br>
+       0x0001f600, 0x0002000a, 0x0001fff6, 0xfffe0000, 0xfffe0200, 0xfffdfe00, 0xfffe0002, 0xfffdfffe,<br>
+       0xfffe0404, 0xfffdfbfc, 0xfffe0a0a, 0xfffdf5f6, 0xfffe0a00, 0xfffdf600, 0xfffe000a, 0xfffdfff6,<br>
+       0x04040000, 0x04040200, 0x0403fe00, 0x04040002, 0x0403fffe, 0x04040404, 0x0403fbfc, 0x04040a0a,<br>
+       0x0403f5f6, 0x04040a00, 0x0403f600, 0x0404000a, 0x0403fff6, 0xfbfc0000, 0xfbfc0200, 0xfbfbfe00,<br>
+       0xfbfc0002, 0xfbfbfffe, 0xfbfc0404, 0xfbfbfbfc, 0xfbfc0a0a, 0xfbfbf5f6, 0xfbfc0a00, 0xfbfbf600,<br>
+       0xfbfc000a, 0xfbfbfff6, 0x0a0a0000, 0x0a0a0200, 0x0a09fe00, 0x0a0a0002, 0x0a09fffe, 0x0a0a0404,<br>
+       0x0a09fbfc, 0x0a0a0a0a, 0x0a09f5f6, 0x0a0a0a00, 0x0a09f600, 0x0a0a000a, 0x0a09fff6, 0xf5f60000,<br>
+       0xf5f60200, 0xf5f5fe00, 0xf5f60002, 0xf5f5fffe, 0xf5f60404, 0xf5f5fbfc, 0xf5f60a0a, 0xf5f5f5f6,<br>
+       0xf5f60a00, 0xf5f5f600, 0xf5f6000a, 0xf5f5fff6, 0x0a000000, 0x0a000200, 0x09fffe00, 0x0a000002,<br>
+       0x09fffffe, 0x0a000404, 0x09fffbfc, 0x0a000a0a, 0x09fff5f6, 0x0a000a00, 0x09fff600, 0x0a00000a,<br>
+       0x09fffff6, 0xf6000000, 0xf6000200, 0xf5fffe00, 0xf6000002, 0xf5fffffe, 0xf6000404, 0xf5fffbfc,<br>
+       0xf6000a0a, 0xf5fff5f6, 0xf6000a00, 0xf5fff600, 0xf600000a, 0xf5fffff6, 0x000a0000, 0x000a0200,<br>
+       0x0009fe00, 0x000a0002, 0x0009fffe, 0x000a0404, 0x0009fbfc, 0x000a0a0a, 0x0009f5f6, 0x000a0a00,<br>
+       0x0009f600, 0x000a000a, 0x0009fff6, 0xfff60000, 0xfff60200, 0xfff5fe00, 0xfff60002, 0xfff5fffe,<br>
+       0xfff60404, 0xfff5fbfc, 0xfff60a0a, 0xfff5f5f6, 0xfff60a00, 0xfff5f600, 0xfff6000a, 0xfff5fff6,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000404, 0xfffffbfc, 0x00000c0c,<br>
+       0xfffff3f4, 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x000007f8, 0xfffff808, 0xfffff008,<br>
+       0x00000ff8, 0xffffe800, 0x00001800, 0xfffff7e8, 0xfffff818, 0x000007e8, 0x00000818, 0xfffff014,<br>
+       0x00000fec, 0xffffffe4, 0x0000001c, 0xffffe7f0, 0xffffe810, 0x000017f0, 0x00001810, 0xffffe000,<br>
+       0x00002000, 0xffffefe4, 0xfffff01c, 0x00000fe4, 0x0000101c, 0xffffdff8, 0xffffe008, 0xfffff7e0,<br>
+       0xfffff820, 0x000007e0, 0x00000820, 0x00001ff8, 0x00002008, 0x00001818, 0xffffe7e8, 0xffffe818,<br>
+       0x000017e8, 0xffffdfec, 0x00002014, 0xffffffd8, 0x00000028, 0xffffefd8, 0x00001028, 0xffffd400,<br>
+       0xffffd400, 0xffffffd4, 0x0000002c, 0x00002c00, 0x00002c00, 0xffffdfe0, 0x00002020, 0xffffd3f0,<br>
+       0x00002c10, 0xffffd3e8, 0xffffe7d4, 0x0000182c, 0x00002c18, 0xffffefd0, 0x00001030, 0xffffdbdc,<br>
+       0xffffdbdc, 0x00002424, 0x00002424, 0xffffcbec, 0x00002828, 0xffffd7d8, 0xffffcbe0, 0x00000000,<br>
+       0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000404, 0xfffffbfc, 0x00000c0c, 0xfffff3f4,<br>
+       0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x04000000, 0x04000400, 0x03fffc00, 0x04000004,<br>
+       0x03fffffc, 0x04000404, 0x03fffbfc, 0x04000c0c, 0x03fff3f4, 0x04000c00, 0x03fff400, 0x0400000c,<br>
+       0x03fffff4, 0xfc000000, 0xfc000400, 0xfbfffc00, 0xfc000004, 0xfbfffffc, 0xfc000404, 0xfbfffbfc,<br>
+       0xfc000c0c, 0xfbfff3f4, 0xfc000c00, 0xfbfff400, 0xfc00000c, 0xfbfffff4, 0x00040000, 0x00040400,<br>
+       0x0003fc00, 0x00040004, 0x0003fffc, 0x00040404, 0x0003fbfc, 0x00040c0c, 0x0003f3f4, 0x00040c00,<br>
+       0x0003f400, 0x0004000c, 0x0003fff4, 0xfffc0000, 0xfffc0400, 0xfffbfc00, 0xfffc0004, 0xfffbfffc,<br>
+       0xfffc0404, 0xfffbfbfc, 0xfffc0c0c, 0xfffbf3f4, 0xfffc0c00, 0xfffbf400, 0xfffc000c, 0xfffbfff4,<br>
+       0x04040000, 0x04040400, 0x0403fc00, 0x04040004, 0x0403fffc, 0x04040404, 0x0403fbfc, 0x04040c0c,<br>
+       0x0403f3f4, 0x04040c00, 0x0403f400, 0x0404000c, 0x0403fff4, 0xfbfc0000, 0xfbfc0400, 0xfbfbfc00,<br>
+       0xfbfc0004, 0xfbfbfffc, 0xfbfc0404, 0xfbfbfbfc, 0xfbfc0c0c, 0xfbfbf3f4, 0xfbfc0c00, 0xfbfbf400,<br>
+       0xfbfc000c, 0xfbfbfff4, 0x0c0c0000, 0x0c0c0400, 0x0c0bfc00, 0x0c0c0004, 0x0c0bfffc, 0x0c0c0404,<br>
+       0x0c0bfbfc, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c0c00, 0x0c0bf400, 0x0c0c000c, 0x0c0bfff4, 0xf3f40000,<br>
+       0xf3f40400, 0xf3f3fc00, 0xf3f40004, 0xf3f3fffc, 0xf3f40404, 0xf3f3fbfc, 0xf3f40c0c, 0xf3f3f3f4,<br>
+       0xf3f40c00, 0xf3f3f400, 0xf3f4000c, 0xf3f3fff4, 0x0c000000, 0x0c000400, 0x0bfffc00, 0x0c000004,<br>
+       0x0bfffffc, 0x0c000404, 0x0bfffbfc, 0x0c000c0c, 0x0bfff3f4, 0x0c000c00, 0x0bfff400, 0x0c00000c,<br>
+       0x0bfffff4, 0xf4000000, 0xf4000400, 0xf3fffc00, 0xf4000004, 0xf3fffffc, 0xf4000404, 0xf3fffbfc,<br>
+       0xf4000c0c, 0xf3fff3f4, 0xf4000c00, 0xf3fff400, 0xf400000c, 0xf3fffff4, 0x000c0000, 0x000c0400,<br>
+       0x000bfc00, 0x000c0004, 0x000bfffc, 0x000c0404, 0x000bfbfc, 0x000c0c0c, 0x000bf3f4, 0x000c0c00,<br>
+       0x000bf400, 0x000c000c, 0x000bfff4, 0xfff40000, 0xfff40400, 0xfff3fc00, 0xfff40004, 0xfff3fffc,<br>
+       0xfff40404, 0xfff3fbfc, 0xfff40c0c, 0xfff3f3f4, 0xfff40c00, 0xfff3f400, 0xfff4000c, 0xfff3fff4,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,<br>
+       0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,<br>
+       0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,<br>
+       0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,<br>
+       0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,<br>
+       0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,<br>
+       0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,<br>
+       0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,<br>
+       0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,<br>
+       0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,<br>
+       0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,<br>
+       0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,<br>
+       0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,<br>
+       0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,<br>
+       0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,<br>
+       0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,<br>
+       0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,<br>
+       0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,<br>
+       0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,<br>
+       0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,<br>
+       0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,<br>
+       0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,<br>
+       0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,<br>
+       0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,<br>
+       0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,<br>
+       0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,<br>
+       0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,<br>
+       0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,<br>
+       0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,<br>
+       0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,<br>
+       0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,<br>
+       0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,<br>
+       0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,<br>
+       0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,<br>
+       0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,<br>
+       0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,<br>
+       0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,<br>
+       0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,<br>
+       0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,<br>
+       0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,<br>
+       0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,<br>
+       0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,<br>
+       0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,<br>
+       0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,<br>
+       0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,<br>
+       0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,<br>
+       0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,<br>
+       0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,<br>
+       0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,<br>
+       0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,<br>
+       0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,<br>
+       0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,<br>
+       0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,<br>
+       0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,<br>
+       0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,<br>
+       0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,<br>
+       0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,<br>
+       0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,<br>
+       0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,<br>
+       0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,<br>
+       0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,<br>
+       0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,<br>
+       0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,<br>
+       0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414,<br>
+       0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec,<br>
+       0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606,<br>
+       0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e,<br>
+       0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4,<br>
+       0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202,<br>
+       0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020,<br>
+       0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa,<br>
+       0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2,<br>
+       0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414,<br>
+       0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe,<br>
+       0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0,<br>
+       0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c,<br>
+       0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000,<br>
+       0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec,<br>
+       0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606,<br>
+       0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e,<br>
+       0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4,<br>
+       0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202,<br>
+       0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020,<br>
+       0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa,<br>
+       0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000<br>
+};<br>
+<br>
+<br>
+const uint32 Indeo3Decoder::correctionloworder[] = {<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x04040404,<br>
+       0xfbfbfbfc, 0x05050101, 0xfafafeff, 0x01010505, 0xfefefafb, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe,<br>
+       0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x09090404, 0xf6f6fbfc, 0x04040909, 0xfbfbf6f7, 0x09090909,<br>
+       0xf6f6f6f7, 0x0a0a0101, 0xf5f5feff, 0x01010a0a, 0xfefef5f6, 0x0807fafb, 0xf7f80505, 0xfafb0808,<br>
+       0x0504f7f8, 0x0f0f0909, 0xf0f0f6f7, 0x09090f0f, 0xf6f6f0f1, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c,<br>
+       0x0302f3f4, 0x10100404, 0xefeffbfc, 0x04041010, 0xfbfbeff0, 0x10101010, 0xefefeff0, 0x12120000,<br>
+       0xedee0000, 0x00001212, 0xffffedee, 0x0c0bf3f4, 0xf3f40c0c, 0x100ff6f7, 0xeff00909, 0xf6f71010,<br>
+       0x0908eff0, 0x1b1b0b0b, 0xe4e4f4f5, 0x0b0b1b1b, 0xf4f4e4e5, 0x1c1c1313, 0xe3e3eced, 0x13131c1c,<br>
+       0xecece3e4, 0x1615f9fa, 0xe9ea0606, 0xf9fa1616, 0x0605e9ea, 0x1d1d0404, 0xe2e2fbfc, 0x04041d1d,<br>
+       0xfbfbe2e3, 0x1e1e1e1e, 0xe1e1e1e2, 0x2120fdfe, 0xdedf0202, 0xfdfe2121, 0x0201dedf, 0x1716edee,<br>
+       0xe8e91212, 0xedee1717, 0x1211e8e9, 0x1e1df0f1, 0xe1e20f0f, 0xf0f11e1e, 0x0f0ee1e2, 0x2e2e1616,<br>
+       0xd1d1e9ea, 0x16162e2e, 0xe9e9d1d2, 0x2f2f0d0d, 0xd0d0f2f3, 0x0d0d2f2f, 0xf2f2d0d1, 0x31312323,<br>
+       0xcecedcdd, 0x23233131, 0xdcdccecf, 0x2928f4f5, 0xd6d70b0b, 0xf4f52929, 0x0b0ad6d7, 0x33330404,<br>
+       0xccccfbfc, 0x04043333, 0xfbfbcccd, 0x36363636, 0xc9c9c9ca, 0x2221ddde, 0xddde2222, 0x2a29e2e3,<br>
+       0xd5d61d1d, 0xe2e32a2a, 0x1d1cd5d6, 0x3c3bf9fa, 0xc3c40606, 0xf9fa3c3c, 0x0605c3c4, 0x4c4c1b1b,<br>
+       0xb3b3e4e5, 0x1b1b4c4c, 0xe4e4b3b4, 0x4d4d2b2b, 0xb2b2d4d5, 0x2b2b4d4d, 0xd4d4b2b3, 0x3736e7e8,<br>
+       0xc8c91818, 0xe7e83737, 0x1817c8c9, 0x4f4f0e0e, 0xb0b0f1f2, 0x0e0e4f4f, 0xf1f1b0b1, 0x53533f3f,<br>
+       0xacacc0c1, 0x3f3f5353, 0xc0c0acad, 0x4a49ebec, 0xb5b61414, 0xebec4a4a, 0x1413b5b6, 0x58580202,<br>
+       0xa7a7fdfe, 0x02025858, 0xfdfda7a8, 0x5d5d5d5d, 0xa2a2a2a3, 0x3d3ccbcc, 0xc2c33434, 0xcbcc3d3d,<br>
+       0x3433c2c3, 0x78783434, 0x8787cbcc, 0x34347878, 0xcbcb8788, 0x4b4ad2d3, 0xb4b52d2d, 0xd2d34b4b,<br>
+       0x2d2cb4b5, 0x7d7d4b4b, 0x8282b4b5, 0x4b4b7d7d, 0xb4b48283, 0x7a7a2121, 0x8585dedf, 0x21217a7a,<br>
+       0xdede8586, 0x6766f2f3, 0x98990d0d, 0xf2f36767, 0x0d0c9899, 0x605fd7d8, 0x9fa02828, 0xd7d86060,<br>
+       0x28279fa0, 0x7f7eddde, 0x80812222, 0xddde7f7f, 0x22218081, 0x5958a6a7, 0xa6a75959, 0x6968b1b2,<br>
+       0x96974e4e, 0xb1b26969, 0x4e4d9697, 0x0c0c0c0c, 0xf3f3f3f4, 0x17171717, 0xe8e8e8e9, 0x2a2a2a2a,<br>
+       0xd5d5d5d6, 0x49494949, 0xb6b6b6b7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0xfcfd0101,<br>
+       0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfeff0303, 0xfeff0303,<br>
+       0xfeff0303, 0xfeff0303, 0xfeff0303, 0xfeff0303, 0xfeff0303, 0x0100fcfd, 0x0100fcfd, 0x0100fcfd,<br>
+       0x0100fcfd, 0x0100fcfd, 0x0100fcfd, 0x0100fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707,<br>
+       0xf8f8f8f9, 0x08080202, 0xf7f7fdfe, 0x02020808, 0xfdfdf7f8, 0x0908fdfe, 0xf6f70202, 0xfdfe0909,<br>
+       0x0201f6f7, 0x0605f9fa, 0xf9fa0606, 0x0d0d0606, 0xf2f2f9fa, 0x06060d0d, 0xf9f9f2f3, 0x0d0d0d0d,<br>
+       0xf2f2f2f3, 0x0e0e0101, 0xf1f1feff, 0x01010e0e, 0xfefef1f2, 0x0c0bf7f8, 0xf3f40808, 0xf7f80c0c,<br>
+       0x0807f3f4, 0x17170e0e, 0xe8e8f1f2, 0x0e0e1717, 0xf1f1e8e9, 0x1211fafb, 0xedee0505, 0xfafb1212,<br>
+       0x0504edee, 0x18180606, 0xe7e7f9fa, 0x06061818, 0xf9f9e7e8, 0x18181818, 0xe7e7e7e8, 0x1b1afeff,<br>
+       0xe4e50101, 0xfeff1b1b, 0x0100e4e5, 0x1110eeef, 0xeeef1111, 0x1716f2f3, 0xe8e90d0d, 0xf2f31717,<br>
+       0x0d0ce8e9, 0x28281010, 0xd7d7eff0, 0x10102828, 0xefefd7d8, 0x29291c1c, 0xd6d6e3e4, 0x1c1c2929,<br>
+       0xe3e3d6d7, 0x2120f6f7, 0xdedf0909, 0xf6f72121, 0x0908dedf, 0x2b2b0606, 0xd4d4f9fa, 0x06062b2b,<br>
+       0xf9f9d4d5, 0x2e2e2e2e, 0xd1d1d1d2, 0x3231fbfc, 0xcdce0404, 0xfbfc3232, 0x0403cdce, 0x2221e4e5,<br>
+       0xddde1b1b, 0xe4e52222, 0x1b1addde, 0x2d2ce9ea, 0xd2d31616, 0xe9ea2d2d, 0x1615d2d3, 0x45452222,<br>
+       0xbabaddde, 0x22224545, 0xddddbabb, 0x46461313, 0xb9b9eced, 0x13134646, 0xececb9ba, 0x49493535,<br>
+       0xb6b6cacb, 0x35354949, 0xcacab6b7, 0x3e3deeef, 0xc1c21111, 0xeeef3e3e, 0x1110c1c2, 0x4d4d0505,<br>
+       0xb2b2fafb, 0x05054d4d, 0xfafab2b3, 0x52525252, 0xadadadae, 0x3332cccd, 0xcccd3333, 0x403fd4d5,<br>
+       0xbfc02b2b, 0xd4d54040, 0x2b2abfc0, 0x5a59f5f6, 0xa5a60a0a, 0xf5f65a5a, 0x0a09a5a6, 0x72722929,<br>
+       0x8d8dd6d7, 0x29297272, 0xd6d68d8e, 0x74744040, 0x8b8bbfc0, 0x40407474, 0xbfbf8b8c, 0x5251dadb,<br>
+       0xadae2525, 0xdadb5252, 0x2524adae, 0x77771616, 0x8888e9ea, 0x16167777, 0xe9e98889, 0x7c7c5f5f,<br>
+       0x8383a0a1, 0x5f5f7c7c, 0xa0a08384, 0x6f6ee1e2, 0x90911e1e, 0xe1e26f6f, 0x1e1d9091, 0x5c5bb1b2,<br>
+       0xa3a44e4e, 0xb1b25c5c, 0x4e4da3a4, 0x7170bbbc, 0x8e8f4444, 0xbbbc7171, 0x44438e8f, 0x12121212,<br>
+       0xedededee, 0x22222222, 0xddddddde, 0x3f3f3f3f, 0xc0c0c0c1, 0x6d6d6d6d, 0x92929293, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303,<br>
+       0x03030303, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd,<br>
+       0xfcfcfcfd, 0xfcfcfcfd, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff,<br>
+       0x0403feff, 0x0403feff, 0x0403feff, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101,<br>
+       0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404,<br>
+       0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc,<br>
+       0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x07070707, 0x07070707,<br>
+       0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9,<br>
+       0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303,<br>
+       0xf5f5fcfd, 0x03030a0a, 0xfcfcf5f6, 0x09090909, 0xf6f6f6f7, 0x0706f8f9, 0xf8f90707, 0x0c0bfcfd,<br>
+       0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x11110808, 0xeeeef7f8, 0x08081111, 0xf7f7eeef, 0x11111111,<br>
+       0xeeeeeeef, 0x13130101, 0xececfeff, 0x01011313, 0xfefeeced, 0x100ff4f5, 0xeff00b0b, 0xf4f51010,<br>
+       0x0b0aeff0, 0x1716f9fa, 0xe8e90606, 0xf9fa1717, 0x0605e8e9, 0x1f1f1212, 0xe0e0edee, 0x12121f1f,<br>
+       0xedede0e1, 0x20200808, 0xdfdff7f8, 0x08082020, 0xf7f7dfe0, 0x21212121, 0xdedededf, 0x2423feff,<br>
+       0xdbdc0101, 0xfeff2424, 0x0100dbdc, 0x1716e8e9, 0xe8e91717, 0x1f1eeeef, 0xe0e11111, 0xeeef1f1f,<br>
+       0x1110e0e1, 0x36361515, 0xc9c9eaeb, 0x15153636, 0xeaeac9ca, 0x37372525, 0xc8c8dadb, 0x25253737,<br>
+       0xdadac8c9, 0x2c2bf3f4, 0xd3d40c0c, 0xf3f42c2c, 0x0c0bd3d4, 0x39390808, 0xc6c6f7f8, 0x08083939,<br>
+       0xf7f7c6c7, 0x3d3d3d3d, 0xc2c2c2c3, 0x4241fafb, 0xbdbe0505, 0xfafb4242, 0x0504bdbe, 0x2d2cdbdc,<br>
+       0xd2d32424, 0xdbdc2d2d, 0x2423d2d3, 0x3c3be2e3, 0xc3c41d1d, 0xe2e33c3c, 0x1d1cc3c4, 0x5c5c2d2d,<br>
+       0xa3a3d2d3, 0x2d2d5c5c, 0xd2d2a3a4, 0x5d5d1919, 0xa2a2e6e7, 0x19195d5d, 0xe6e6a2a3, 0x61614747,<br>
+       0x9e9eb8b9, 0x47476161, 0xb8b89e9f, 0x5352e9ea, 0xacad1616, 0xe9ea5353, 0x1615acad, 0x66660707,<br>
+       0x9999f8f9, 0x07076666, 0xf8f8999a, 0x6d6d6d6d, 0x92929293, 0x4443bbbc, 0xbbbc4444, 0x5554c6c7,<br>
+       0xaaab3939, 0xc6c75555, 0x3938aaab, 0x7877f2f3, 0x87880d0d, 0xf2f37878, 0x0d0c8788, 0x6e6dcecf,<br>
+       0x91923131, 0xcecf6e6e, 0x31309192, 0x7b7a9798, 0x84856868, 0x97987b7b, 0x68678485, 0x18181818,<br>
+       0xe7e7e7e8, 0x2e2e2e2e, 0xd1d1d1d2, 0x54545454, 0xabababac, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040404,<br>
+       0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,<br>
+       0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,<br>
+       0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff,<br>
+       0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0xfafb0101, 0xfafb0101, 0xfafb0101,<br>
+       0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfeff0505,<br>
+       0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505,<br>
+       0xfeff0505, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb,<br>
+       0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303,<br>
+       0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd,<br>
+       0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0x03030a0a,<br>
+       0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a,<br>
+       0x03030a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b,<br>
+       0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x03030d0d, 0xfcfcf2f3, 0x0908f6f7, 0xf6f70909, 0x0f0efbfc,<br>
+       0xf0f10404, 0xfbfc0f0f, 0x0403f0f1, 0x16160b0b, 0xe9e9f4f5, 0x0b0b1616, 0xf4f4e9ea, 0x15151515,<br>
+       0xeaeaeaeb, 0x18180202, 0xe7e7fdfe, 0x02021818, 0xfdfde7e8, 0x1413f1f2, 0xebec0e0e, 0xf1f21414,<br>
+       0x0e0debec, 0x26261717, 0xd9d9e8e9, 0x17172626, 0xe8e8d9da, 0x1d1cf7f8, 0xe2e30808, 0xf7f81d1d,<br>
+       0x0807e2e3, 0x27270b0b, 0xd8d8f4f5, 0x0b0b2727, 0xf4f4d8d9, 0x29292929, 0xd6d6d6d7, 0x2d2cfeff,<br>
+       0xd2d30101, 0xfeff2d2d, 0x0100d2d3, 0x1d1ce2e3, 0xe2e31d1d, 0x2726e9ea, 0xd8d91616, 0xe9ea2727,<br>
+       0x1615d8d9, 0x43431b1b, 0xbcbce4e5, 0x1b1b4343, 0xe4e4bcbd, 0x45452f2f, 0xbabad0d1, 0x2f2f4545,<br>
+       0xd0d0babb, 0x3837f0f1, 0xc7c80f0f, 0xf0f13838, 0x0f0ec7c8, 0x47470b0b, 0xb8b8f4f5, 0x0b0b4747,<br>
+       0xf4f4b8b9, 0x4c4c4c4c, 0xb3b3b3b4, 0x5352f9fa, 0xacad0606, 0xf9fa5353, 0x0605acad, 0x3938d2d3,<br>
+       0xc6c72d2d, 0xd2d33939, 0x2d2cc6c7, 0x4b4adbdc, 0xb4b52424, 0xdbdc4b4b, 0x2423b4b5, 0x73733838,<br>
+       0x8c8cc7c8, 0x38387373, 0xc7c78c8d, 0x75751f1f, 0x8a8ae0e1, 0x1f1f7575, 0xe0e08a8b, 0x7a7a5858,<br>
+       0x8585a7a8, 0x58587a7a, 0xa7a78586, 0x6867e3e4, 0x97981c1c, 0xe3e46868, 0x1c1b9798, 0x5554aaab,<br>
+       0xaaab5555, 0x6a69b7b8, 0x95964848, 0xb7b86a6a, 0x48479596, 0x1e1e1e1e, 0xe1e1e1e2, 0x3a3a3a3a,<br>
+       0xc5c5c5c6, 0x69696969, 0x96969697, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05050505, 0x05050505,<br>
+       0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505,<br>
+       0x05050505, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb,<br>
+       0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe,<br>
+       0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0xf8f90202,<br>
+       0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202,<br>
+       0xf8f90202, 0xf8f90202, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707,<br>
+       0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9,<br>
+       0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9,<br>
+       0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b,<br>
+       0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5,<br>
+       0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0x0d0d0303, 0x0d0d0303,<br>
+       0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303,<br>
+       0x0d0d0303, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd,<br>
+       0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d,<br>
+       0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0xfbfbf0f1, 0x0b0af4f5, 0xf4f50b0b, 0x1211fafb,<br>
+       0xedee0505, 0xfafb1212, 0x0504edee, 0x1a1a0d0d, 0xe5e5f2f3, 0x0d0d1a1a, 0xf2f2e5e6, 0x1a1a1a1a,<br>
+       0xe5e5e5e6, 0x1d1d0202, 0xe2e2fdfe, 0x02021d1d, 0xfdfde2e3, 0x1817eff0, 0xe7e81010, 0xeff01818,<br>
+       0x100fe7e8, 0x2e2e1c1c, 0xd1d1e3e4, 0x1c1c2e2e, 0xe3e3d1d2, 0x2322f6f7, 0xdcdd0909, 0xf6f72323,<br>
+       0x0908dcdd, 0x2f2f0d0d, 0xd0d0f2f3, 0x0d0d2f2f, 0xf2f2d0d1, 0x31313131, 0xcecececf, 0x3635feff,<br>
+       0xc9ca0101, 0xfeff3636, 0x0100c9ca, 0x2322dcdd, 0xdcdd2323, 0x2f2ee5e6, 0xd0d11a1a, 0xe5e62f2f,<br>
+       0x1a19d0d1, 0x51512020, 0xaeaedfe0, 0x20205151, 0xdfdfaeaf, 0x53533838, 0xacacc7c8, 0x38385353,<br>
+       0xc7c7acad, 0x4342edee, 0xbcbd1212, 0xedee4343, 0x1211bcbd, 0x56560d0d, 0xa9a9f2f3, 0x0d0d5656,<br>
+       0xf2f2a9aa, 0x5b5b5b5b, 0xa4a4a4a5, 0x6362f8f9, 0x9c9d0707, 0xf8f96363, 0x07069c9d, 0x4443c9ca,<br>
+       0xbbbc3636, 0xc9ca4444, 0x3635bbbc, 0x5a59d3d4, 0xa5a62c2c, 0xd3d45a5a, 0x2c2ba5a6, 0x7c7bdedf,<br>
+       0x83842121, 0xdedf7c7c, 0x21208384, 0x67669899, 0x98996767, 0x7f7ea9aa, 0x80815656, 0xa9aa7f7f,<br>
+       0x56558081, 0x25252525, 0xdadadadb, 0x45454545, 0xbabababb, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe,<br>
+       0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0xf7f80202, 0xf7f80202, 0xf7f80202,<br>
+       0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202,<br>
+       0xf7f80202, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808,<br>
+       0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8,<br>
+       0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8,<br>
+       0x0201f7f8, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d,<br>
+       0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3,<br>
+       0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3,<br>
+       0xf2f2f2f3, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404,<br>
+       0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc,<br>
+       0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc,<br>
+       0xf0f0fbfc, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f,<br>
+       0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010,<br>
+       0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0xfafaedee, 0x0d0cf2f3, 0xf2f30d0d, 0x1514f9fa,<br>
+       0xeaeb0606, 0xf9fa1515, 0x0605eaeb, 0x1e1e0f0f, 0xe1e1f0f1, 0x0f0f1e1e, 0xf0f0e1e2, 0x1e1e1e1e,<br>
+       0xe1e1e1e2, 0x22220202, 0xddddfdfe, 0x02022222, 0xfdfdddde, 0x1c1beced, 0xe3e41313, 0xeced1c1c,<br>
+       0x1312e3e4, 0x36362020, 0xc9c9dfe0, 0x20203636, 0xdfdfc9ca, 0x2928f4f5, 0xd6d70b0b, 0xf4f52929,<br>
+       0x0b0ad6d7, 0x37370f0f, 0xc8c8f0f1, 0x0f0f3737, 0xf0f0c8c9, 0x39393939, 0xc6c6c6c7, 0x3f3efeff,<br>
+       0xc0c10101, 0xfeff3f3f, 0x0100c0c1, 0x2827d7d8, 0xd7d82828, 0x3736e1e2, 0xc8c91e1e, 0xe1e23737,<br>
+       0x1e1dc8c9, 0x5e5e2525, 0xa1a1dadb, 0x25255e5e, 0xdadaa1a2, 0x60604141, 0x9f9fbebf, 0x41416060,<br>
+       0xbebe9fa0, 0x4e4deaeb, 0xb1b21515, 0xeaeb4e4e, 0x1514b1b2, 0x64640f0f, 0x9b9bf0f1, 0x0f0f6464,<br>
+       0xf0f09b9c, 0x6a6a6a6a, 0x95959596, 0x7473f7f8, 0x8b8c0808, 0xf7f87474, 0x08078b8c, 0x4f4ec0c1,<br>
+       0xb0b13f3f, 0xc0c14f4f, 0x3f3eb0b1, 0x6968cccd, 0x96973333, 0xcccd6969, 0x33329697, 0x78778788,<br>
+       0x87887878, 0x2b2b2b2b, 0xd4d4d4d5, 0x50505050, 0xafafafb0, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707,<br>
+       0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,<br>
+       0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,<br>
+       0xf8f8f8f9, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd,<br>
+       0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0xf5f60303, 0xf5f60303, 0xf5f60303,<br>
+       0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303,<br>
+       0xf5f60303, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a,<br>
+       0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6,<br>
+       0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6,<br>
+       0x0302f5f6, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010,<br>
+       0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0xefefeff0, 0xefefeff0, 0xefefeff0,<br>
+       0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0,<br>
+       0xefefeff0, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505,<br>
+       0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0xededfafb, 0xededfafb, 0xededfafb,<br>
+       0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb,<br>
+       0xededfafb, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212,<br>
+       0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212,<br>
+       0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0xfafaebec, 0x0f0ef0f1, 0xf0f10f0f, 0x1817f8f9,<br>
+       0xe7e80707, 0xf8f91818, 0x0706e7e8, 0x23231111, 0xdcdceeef, 0x11112323, 0xeeeedcdd, 0x22222222,<br>
+       0xddddddde, 0x26260303, 0xd9d9fcfd, 0x03032626, 0xfcfcd9da, 0x201fe9ea, 0xdfe01616, 0xe9ea2020,<br>
+       0x1615dfe0, 0x3d3d2525, 0xc2c2dadb, 0x25253d3d, 0xdadac2c3, 0x2f2ef2f3, 0xd0d10d0d, 0xf2f32f2f,<br>
+       0x0d0cd0d1, 0x3f3f1111, 0xc0c0eeef, 0x11113f3f, 0xeeeec0c1, 0x41414141, 0xbebebebf, 0x4847feff,<br>
+       0xb7b80101, 0xfeff4848, 0x0100b7b8, 0x2e2dd1d2, 0xd1d22e2e, 0x3f3edcdd, 0xc0c12323, 0xdcdd3f3f,<br>
+       0x2322c0c1, 0x6b6b2b2b, 0x9494d4d5, 0x2b2b6b6b, 0xd4d49495, 0x6e6e4b4b, 0x9191b4b5, 0x4b4b6e6e,<br>
+       0xb4b49192, 0x5958e7e8, 0xa6a71818, 0xe7e85959, 0x1817a6a7, 0x72721111, 0x8d8deeef, 0x11117272,<br>
+       0xeeee8d8e, 0x79797979, 0x86868687, 0x5b5ab7b8, 0xa4a54848, 0xb7b85b5b, 0x4847a4a5, 0x7877c5c6,<br>
+       0x87883a3a, 0xc5c67878, 0x3a398788, 0x31313131, 0xcecececf, 0x5c5c5c5c, 0xa3a3a3a4, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808,<br>
+       0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0xf7f7f7f8,<br>
+       0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8,<br>
+       0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd,<br>
+       0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0xf4f50303,<br>
+       0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303,<br>
+       0xf4f50303, 0xf4f50303, 0xf4f50303, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b,<br>
+       0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0x0302f4f5,<br>
+       0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5,<br>
+       0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212,<br>
+       0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0xedededee,<br>
+       0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee,<br>
+       0xedededee, 0xedededee, 0xedededee, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505,<br>
+       0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0xebebfafb,<br>
+       0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb,<br>
+       0xebebfafb, 0xebebfafb, 0xebebfafb, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414,<br>
+       0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414,<br>
+       0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x1110eeef, 0xeeef1111, 0x1b1af8f9,<br>
+       0xe4e50707, 0xf8f91b1b, 0x0706e4e5, 0x27271313, 0xd8d8eced, 0x13132727, 0xececd8d9, 0x27272727,<br>
+       0xd8d8d8d9, 0x2b2b0303, 0xd4d4fcfd, 0x03032b2b, 0xfcfcd4d5, 0x2423e7e8, 0xdbdc1818, 0xe7e82424,<br>
+       0x1817dbdc, 0x45452a2a, 0xbabad5d6, 0x2a2a4545, 0xd5d5babb, 0x3534f1f2, 0xcacb0e0e, 0xf1f23535,<br>
+       0x0e0dcacb, 0x47471313, 0xb8b8eced, 0x13134747, 0xececb8b9, 0x49494949, 0xb6b6b6b7, 0x504ffdfe,<br>
+       0xafb00202, 0xfdfe5050, 0x0201afb0, 0x3433cbcc, 0xcbcc3434, 0x4645d8d9, 0xb9ba2727, 0xd8d94646,<br>
+       0x2726b9ba, 0x79793030, 0x8686cfd0, 0x30307979, 0xcfcf8687, 0x7c7c5454, 0x8383abac, 0x54547c7c,<br>
+       0xabab8384, 0x6463e4e5, 0x9b9c1b1b, 0xe4e56464, 0x1b1a9b9c, 0x6665aeaf, 0x999a5151, 0xaeaf6666,<br>
+       0x5150999a, 0x37373737, 0xc8c8c8c9, 0x68686868, 0x97979798, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909,<br>
+       0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0xf6f6f6f7,<br>
+       0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7,<br>
+       0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd,<br>
+       0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd,<br>
+       0x0c0bfcfd, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303,<br>
+       0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xfcfd0c0c, 0xfcfd0c0c,<br>
+       0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c,<br>
+       0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4,<br>
+       0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4,<br>
+       0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,<br>
+       0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, 0xebebebec, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606,<br>
+       0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0xe8e8f9fa,<br>
+       0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa,<br>
+       0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0x06061717, 0x06061717, 0x06061717, 0x06061717,<br>
+       0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717,<br>
+       0x06061717, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9,<br>
+       0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404,<br>
+       0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe,<br>
+       0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x08080404, 0xf7f7fbfc, 0x04040808, 0xfbfbf7f8, 0x08080808,<br>
+       0xf7f7f7f8, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x0807fbfc, 0xf7f80404, 0xfbfc0808,<br>
+       0x0403f7f8, 0x0e0e0808, 0xf1f1f7f8, 0x08080e0e, 0xf7f7f1f2, 0x0c0bfdfe, 0xf3f40202, 0xfdfe0c0c,<br>
+       0x0201f3f4, 0x10100404, 0xefeffbfc, 0x04041010, 0xfbfbeff0, 0x10101010, 0xefefeff0, 0x12120000,<br>
+       0xedee0000, 0x00001212, 0xffffedee, 0x0c0bf3f4, 0xf3f40c0c, 0x100ff7f8, 0xeff00808, 0xf7f81010,<br>
+       0x0807eff0, 0x1a1a0a0a, 0xe5e5f5f6, 0x0a0a1a1a, 0xf5f5e5e6, 0x1c1c1212, 0xe3e3edee, 0x12121c1c,<br>
+       0xedede3e4, 0x1615f9fa, 0xe9ea0606, 0xf9fa1616, 0x0605e9ea, 0x1c1c0404, 0xe3e3fbfc, 0x04041c1c,<br>
+       0xfbfbe3e4, 0x1e1e1e1e, 0xe1e1e1e2, 0x201ffdfe, 0xdfe00202, 0xfdfe2020, 0x0201dfe0, 0x1615edee,<br>
+       0xe9ea1212, 0xedee1616, 0x1211e9ea, 0x1e1df1f2, 0xe1e20e0e, 0xf1f21e1e, 0x0e0de1e2, 0x2e2e1616,<br>
+       0xd1d1e9ea, 0x16162e2e, 0xe9e9d1d2, 0x2e2e0c0c, 0xd1d1f3f4, 0x0c0c2e2e, 0xf3f3d1d2, 0x30302222,<br>
+       0xcfcfddde, 0x22223030, 0xddddcfd0, 0x2827f5f6, 0xd7d80a0a, 0xf5f62828, 0x0a09d7d8, 0x32320404,<br>
+       0xcdcdfbfc, 0x04043232, 0xfbfbcdce, 0x36363636, 0xc9c9c9ca, 0x2221ddde, 0xddde2222, 0x2a29e3e4,<br>
+       0xd5d61c1c, 0xe3e42a2a, 0x1c1bd5d6, 0x3c3bf9fa, 0xc3c40606, 0xf9fa3c3c, 0x0605c3c4, 0x4c4c1a1a,<br>
+       0xb3b3e5e6, 0x1a1a4c4c, 0xe5e5b3b4, 0x4c4c2a2a, 0xb3b3d5d6, 0x2a2a4c4c, 0xd5d5b3b4, 0x3635e7e8,<br>
+       0xc9ca1818, 0xe7e83636, 0x1817c9ca, 0x4e4e0e0e, 0xb1b1f1f2, 0x0e0e4e4e, 0xf1f1b1b2, 0x52523e3e,<br>
+       0xadadc1c2, 0x3e3e5252, 0xc1c1adae, 0x4a49ebec, 0xb5b61414, 0xebec4a4a, 0x1413b5b6, 0x58580202,<br>
+       0xa7a7fdfe, 0x02025858, 0xfdfda7a8, 0x5c5c5c5c, 0xa3a3a3a4, 0x3c3bcbcc, 0xc3c43434, 0xcbcc3c3c,<br>
+       0x3433c3c4, 0x76763434, 0x8989cbcc, 0x34347676, 0xcbcb898a, 0x4a49d3d4, 0xb5b62c2c, 0xd3d44a4a,<br>
+       0x2c2bb5b6, 0x76764a4a, 0x8989b5b6, 0x4a4a7676, 0xb5b5898a, 0x76762020, 0x8989dfe0, 0x20207676,<br>
+       0xdfdf898a, 0x6665f3f4, 0x999a0c0c, 0xf3f46666, 0x0c0b999a, 0x605fd7d8, 0x9fa02828, 0xd7d86060,<br>
+       0x28279fa0, 0x7675ddde, 0x898a2222, 0xddde7676, 0x2221898a, 0x5857a7a8, 0xa7a85858, 0x6867b1b2,<br>
+       0x97984e4e, 0xb1b26868, 0x4e4d9798, 0x0c0c0c0c, 0xf3f3f3f4, 0x16161616, 0xe9e9e9ea, 0x2a2a2a2a,<br>
+       0xd5d5d5d6, 0x48484848, 0xb7b7b7b8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0xfdfe0000,<br>
+       0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202,<br>
+       0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,<br>
+       0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,<br>
+       0xf9f9f9fa, 0x09090303, 0xf6f6fcfd, 0x03030909, 0xfcfcf6f7, 0x0908fcfd, 0xf6f70303, 0xfcfd0909,<br>
+       0x0302f6f7, 0x0605f9fa, 0xf9fa0606, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0xf9f9f3f4, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x0f0f0000, 0xf0f10000, 0x00000f0f, 0xfffff0f1, 0x0c0bf6f7, 0xf3f40909, 0xf6f70c0c,<br>
+       0x0908f3f4, 0x18180f0f, 0xe7e7f0f1, 0x0f0f1818, 0xf0f0e7e8, 0x1211f9fa, 0xedee0606, 0xf9fa1212,<br>
+       0x0605edee, 0x18180606, 0xe7e7f9fa, 0x06061818, 0xf9f9e7e8, 0x18181818, 0xe7e7e7e8, 0x1b1b0000,<br>
+       0xe4e50000, 0x00001b1b, 0xffffe4e5, 0x1211edee, 0xedee1212, 0x1817f3f4, 0xe7e80c0c, 0xf3f41818,<br>
+       0x0c0be7e8, 0x27270f0f, 0xd8d8f0f1, 0x0f0f2727, 0xf0f0d8d9, 0x2a2a1b1b, 0xd5d5e4e5, 0x1b1b2a2a,<br>
+       0xe4e4d5d6, 0x2120f6f7, 0xdedf0909, 0xf6f72121, 0x0908dedf, 0x2a2a0606, 0xd5d5f9fa, 0x06062a2a,<br>
+       0xf9f9d5d6, 0x2d2d2d2d, 0xd2d2d2d3, 0x3332fcfd, 0xcccd0303, 0xfcfd3333, 0x0302cccd, 0x2120e4e5,<br>
+       0xdedf1b1b, 0xe4e52121, 0x1b1adedf, 0x2d2ceaeb, 0xd2d31515, 0xeaeb2d2d, 0x1514d2d3, 0x45452121,<br>
+       0xbabadedf, 0x21214545, 0xdedebabb, 0x45451212, 0xbabaedee, 0x12124545, 0xededbabb, 0x48483636,<br>
+       0xb7b7c9ca, 0x36364848, 0xc9c9b7b8, 0x3f3eedee, 0xc0c11212, 0xedee3f3f, 0x1211c0c1, 0x4e4e0606,<br>
+       0xb1b1f9fa, 0x06064e4e, 0xf9f9b1b2, 0x51515151, 0xaeaeaeaf, 0x3332cccd, 0xcccd3333, 0x3f3ed5d6,<br>
+       0xc0c12a2a, 0xd5d63f3f, 0x2a29c0c1, 0x5a59f6f7, 0xa5a60909, 0xf6f75a5a, 0x0908a5a6, 0x72722a2a,<br>
+       0x8d8dd5d6, 0x2a2a7272, 0xd5d58d8e, 0x75753f3f, 0x8a8ac0c1, 0x3f3f7575, 0xc0c08a8b, 0x5150dbdc,<br>
+       0xaeaf2424, 0xdbdc5151, 0x2423aeaf, 0x78781515, 0x8787eaeb, 0x15157878, 0xeaea8788, 0x7b7b6060,<br>
+       0x84849fa0, 0x60607b7b, 0x9f9f8485, 0x6f6ee1e2, 0x90911e1e, 0xe1e26f6f, 0x1e1d9091, 0x5d5cb1b2,<br>
+       0xa2a34e4e, 0xb1b25d5d, 0x4e4da2a3, 0x7271babb, 0x8d8e4545, 0xbabb7272, 0x45448d8e, 0x12121212,<br>
+       0xedededee, 0x21212121, 0xdedededf, 0x3f3f3f3f, 0xc0c0c0c1, 0x6c6c6c6c, 0x93939394, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303,<br>
+       0x03030303, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd,<br>
+       0xfcfcfcfd, 0xfcfcfcfd, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000,<br>
+       0x03030000, 0x03030000, 0x03030000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000,<br>
+       0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0x00000303, 0x00000303, 0x00000303, 0x00000303,<br>
+       0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd,<br>
+       0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404,<br>
+       0xf7f7fbfc, 0x04040808, 0xfbfbf7f8, 0x08080808, 0xf7f7f7f8, 0x0807f7f8, 0xf7f80808, 0x0c0bfbfc,<br>
+       0xf3f40404, 0xfbfc0c0c, 0x0403f3f4, 0x10100808, 0xefeff7f8, 0x08081010, 0xf7f7eff0, 0x10101010,<br>
+       0xefefeff0, 0x14140000, 0xebec0000, 0x00001414, 0xffffebec, 0x100ff3f4, 0xeff00c0c, 0xf3f41010,<br>
+       0x0c0beff0, 0x1817fbfc, 0xe7e80404, 0xfbfc1818, 0x0403e7e8, 0x20201010, 0xdfdfeff0, 0x10102020,<br>
+       0xefefdfe0, 0x20200808, 0xdfdff7f8, 0x08082020, 0xf7f7dfe0, 0x20202020, 0xdfdfdfe0, 0x24240000,<br>
+       0xdbdc0000, 0x00002424, 0xffffdbdc, 0x1817e7e8, 0xe7e81818, 0x201feff0, 0xdfe01010, 0xeff02020,<br>
+       0x100fdfe0, 0x34341414, 0xcbcbebec, 0x14143434, 0xebebcbcc, 0x38382424, 0xc7c7dbdc, 0x24243838,<br>
+       0xdbdbc7c8, 0x2c2bf3f4, 0xd3d40c0c, 0xf3f42c2c, 0x0c0bd3d4, 0x38380808, 0xc7c7f7f8, 0x08083838,<br>
+       0xf7f7c7c8, 0x3c3c3c3c, 0xc3c3c3c4, 0x403ffbfc, 0xbfc00404, 0xfbfc4040, 0x0403bfc0, 0x2c2bdbdc,<br>
+       0xd3d42424, 0xdbdc2c2c, 0x2423d3d4, 0x3c3be3e4, 0xc3c41c1c, 0xe3e43c3c, 0x1c1bc3c4, 0x5c5c2c2c,<br>
+       0xa3a3d3d4, 0x2c2c5c5c, 0xd3d3a3a4, 0x5c5c1818, 0xa3a3e7e8, 0x18185c5c, 0xe7e7a3a4, 0x60604848,<br>
+       0x9f9fb7b8, 0x48486060, 0xb7b79fa0, 0x5453ebec, 0xabac1414, 0xebec5454, 0x1413abac, 0x64640808,<br>
+       0x9b9bf7f8, 0x08086464, 0xf7f79b9c, 0x6c6c6c6c, 0x93939394, 0x4443bbbc, 0xbbbc4444, 0x5453c7c8,<br>
+       0xabac3838, 0xc7c85454, 0x3837abac, 0x7877f3f4, 0x87880c0c, 0xf3f47878, 0x0c0b8788, 0x6c6bcfd0,<br>
+       0x93943030, 0xcfd06c6c, 0x302f9394, 0x7c7b9798, 0x83846868, 0x97987c7c, 0x68678384, 0x18181818,<br>
+       0xe7e7e7e8, 0x2c2c2c2c, 0xd3d3d3d4, 0x54545454, 0xabababac, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040404,<br>
+       0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,<br>
+       0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,<br>
+       0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000,<br>
+       0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000,<br>
+       0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0x00000404,<br>
+       0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404,<br>
+       0x00000404, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc,<br>
+       0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0x08080404,<br>
+       0x08080404, 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc,<br>
+       0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0x04040808,<br>
+       0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808,<br>
+       0x04040808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a,<br>
+       0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x05050f0f, 0xfafaf0f1, 0x0a09f5f6, 0xf5f60a0a, 0x0f0efafb,<br>
+       0xf0f10505, 0xfafb0f0f, 0x0504f0f1, 0x14140a0a, 0xebebf5f6, 0x0a0a1414, 0xf5f5ebec, 0x14141414,<br>
+       0xebebebec, 0x19190000, 0xe6e70000, 0x00001919, 0xffffe6e7, 0x1413f0f1, 0xebec0f0f, 0xf0f11414,<br>
+       0x0f0eebec, 0x28281919, 0xd7d7e6e7, 0x19192828, 0xe6e6d7d8, 0x1e1df5f6, 0xe1e20a0a, 0xf5f61e1e,<br>
+       0x0a09e1e2, 0x28280a0a, 0xd7d7f5f6, 0x0a0a2828, 0xf5f5d7d8, 0x28282828, 0xd7d7d7d8, 0x2d2d0000,<br>
+       0xd2d30000, 0x00002d2d, 0xffffd2d3, 0x1e1de1e2, 0xe1e21e1e, 0x2827ebec, 0xd7d81414, 0xebec2828,<br>
+       0x1413d7d8, 0x41411919, 0xbebee6e7, 0x19194141, 0xe6e6bebf, 0x46462d2d, 0xb9b9d2d3, 0x2d2d4646,<br>
+       0xd2d2b9ba, 0x3736f0f1, 0xc8c90f0f, 0xf0f13737, 0x0f0ec8c9, 0x46460a0a, 0xb9b9f5f6, 0x0a0a4646,<br>
+       0xf5f5b9ba, 0x4b4b4b4b, 0xb4b4b4b5, 0x5554fafb, 0xaaab0505, 0xfafb5555, 0x0504aaab, 0x3736d2d3,<br>
+       0xc8c92d2d, 0xd2d33737, 0x2d2cc8c9, 0x4b4adcdd, 0xb4b52323, 0xdcdd4b4b, 0x2322b4b5, 0x73733737,<br>
+       0x8c8cc8c9, 0x37377373, 0xc8c88c8d, 0x73731e1e, 0x8c8ce1e2, 0x1e1e7373, 0xe1e18c8d, 0x78785a5a,<br>
+       0x8787a5a6, 0x5a5a7878, 0xa5a58788, 0x6968e1e2, 0x96971e1e, 0xe1e26969, 0x1e1d9697, 0x5554aaab,<br>
+       0xaaab5555, 0x6968b9ba, 0x96974646, 0xb9ba6969, 0x46459697, 0x1e1e1e1e, 0xe1e1e1e2, 0x3c3c3c3c,<br>
+       0xc3c3c3c4, 0x69696969, 0x96969697, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05050505, 0x05050505,<br>
+       0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505,<br>
+       0x05050505, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb,<br>
+       0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0x05050000, 0x05050000, 0x05050000, 0x05050000,<br>
+       0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0xfafb0000,<br>
+       0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000,<br>
+       0xfafb0000, 0xfafb0000, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505,<br>
+       0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0xfffffafb, 0xfffffafb, 0xfffffafb,<br>
+       0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb,<br>
+       0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a,<br>
+       0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6,<br>
+       0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0x0f0f0505, 0x0f0f0505,<br>
+       0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505,<br>
+       0x0f0f0505, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb,<br>
+       0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0xf9f9f3f4, 0x0c0bf3f4, 0xf3f40c0c, 0x1211f9fa,<br>
+       0xedee0606, 0xf9fa1212, 0x0605edee, 0x18180c0c, 0xe7e7f3f4, 0x0c0c1818, 0xf3f3e7e8, 0x18181818,<br>
+       0xe7e7e7e8, 0x1e1e0000, 0xe1e20000, 0x00001e1e, 0xffffe1e2, 0x1817edee, 0xe7e81212, 0xedee1818,<br>
+       0x1211e7e8, 0x30301e1e, 0xcfcfe1e2, 0x1e1e3030, 0xe1e1cfd0, 0x2423f9fa, 0xdbdc0606, 0xf9fa2424,<br>
+       0x0605dbdc, 0x30300c0c, 0xcfcff3f4, 0x0c0c3030, 0xf3f3cfd0, 0x30303030, 0xcfcfcfd0, 0x36360000,<br>
+       0xc9ca0000, 0x00003636, 0xffffc9ca, 0x2423dbdc, 0xdbdc2424, 0x302fe7e8, 0xcfd01818, 0xe7e83030,<br>
+       0x1817cfd0, 0x4e4e1e1e, 0xb1b1e1e2, 0x1e1e4e4e, 0xe1e1b1b2, 0x54543636, 0xababc9ca, 0x36365454,<br>
+       0xc9c9abac, 0x4241edee, 0xbdbe1212, 0xedee4242, 0x1211bdbe, 0x54540c0c, 0xababf3f4, 0x0c0c5454,<br>
+       0xf3f3abac, 0x5a5a5a5a, 0xa5a5a5a6, 0x605ff9fa, 0x9fa00606, 0xf9fa6060, 0x06059fa0, 0x4241c9ca,<br>
+       0xbdbe3636, 0xc9ca4242, 0x3635bdbe, 0x5a59d5d6, 0xa5a62a2a, 0xd5d65a5a, 0x2a29a5a6, 0x7e7de1e2,<br>
+       0x81821e1e, 0xe1e27e7e, 0x1e1d8182, 0x6665999a, 0x999a6666, 0x7e7dabac, 0x81825454, 0xabac7e7e,<br>
+       0x54538182, 0x24242424, 0xdbdbdbdc, 0x42424242, 0xbdbdbdbe, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000,<br>
+       0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000,<br>
+       0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000,<br>
+       0xf9fa0000, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606,<br>
+       0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,<br>
+       0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,<br>
+       0xfffff9fa, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606,<br>
+       0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa,<br>
+       0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa,<br>
+       0xf3f3f9fa, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c,<br>
+       0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e,<br>
+       0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0xf8f8eaeb, 0x0e0df1f2, 0xf1f20e0e, 0x1514f8f9,<br>
+       0xeaeb0707, 0xf8f91515, 0x0706eaeb, 0x1c1c0e0e, 0xe3e3f1f2, 0x0e0e1c1c, 0xf1f1e3e4, 0x1c1c1c1c,<br>
+       0xe3e3e3e4, 0x23230000, 0xdcdd0000, 0x00002323, 0xffffdcdd, 0x1c1beaeb, 0xe3e41515, 0xeaeb1c1c,<br>
+       0x1514e3e4, 0x38382323, 0xc7c7dcdd, 0x23233838, 0xdcdcc7c8, 0x2a29f1f2, 0xd5d60e0e, 0xf1f22a2a,<br>
+       0x0e0dd5d6, 0x38380e0e, 0xc7c7f1f2, 0x0e0e3838, 0xf1f1c7c8, 0x38383838, 0xc7c7c7c8, 0x3f3f0000,<br>
+       0xc0c10000, 0x00003f3f, 0xffffc0c1, 0x2a29d5d6, 0xd5d62a2a, 0x3837e3e4, 0xc7c81c1c, 0xe3e43838,<br>
+       0x1c1bc7c8, 0x5b5b2323, 0xa4a4dcdd, 0x23235b5b, 0xdcdca4a5, 0x62623f3f, 0x9d9dc0c1, 0x3f3f6262,<br>
+       0xc0c09d9e, 0x4d4ceaeb, 0xb2b31515, 0xeaeb4d4d, 0x1514b2b3, 0x62620e0e, 0x9d9df1f2, 0x0e0e6262,<br>
+       0xf1f19d9e, 0x69696969, 0x96969697, 0x7776f8f9, 0x88890707, 0xf8f97777, 0x07068889, 0x4d4cc0c1,<br>
+       0xb2b33f3f, 0xc0c14d4d, 0x3f3eb2b3, 0x6968cecf, 0x96973131, 0xcecf6969, 0x31309697, 0x77768889,<br>
+       0x88897777, 0x2a2a2a2a, 0xd5d5d5d6, 0x4d4d4d4d, 0xb2b2b2b3, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707,<br>
+       0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,<br>
+       0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9,<br>
+       0xf8f8f8f9, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000,<br>
+       0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0xf8f90000, 0xf8f90000, 0xf8f90000,<br>
+       0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000,<br>
+       0xf8f90000, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707,<br>
+       0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9,<br>
+       0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9,<br>
+       0xfffff8f9, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e,<br>
+       0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2,<br>
+       0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2,<br>
+       0xf1f1f1f2, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707,<br>
+       0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9,<br>
+       0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9,<br>
+       0xeaeaf8f9, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515,<br>
+       0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010,<br>
+       0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0xf7f7eff0, 0x100feff0, 0xeff01010, 0x1817f7f8,<br>
+       0xe7e80808, 0xf7f81818, 0x0807e7e8, 0x20201010, 0xdfdfeff0, 0x10102020, 0xefefdfe0, 0x20202020,<br>
+       0xdfdfdfe0, 0x28280000, 0xd7d80000, 0x00002828, 0xffffd7d8, 0x201fe7e8, 0xdfe01818, 0xe7e82020,<br>
+       0x1817dfe0, 0x40402828, 0xbfbfd7d8, 0x28284040, 0xd7d7bfc0, 0x302feff0, 0xcfd01010, 0xeff03030,<br>
+       0x100fcfd0, 0x40401010, 0xbfbfeff0, 0x10104040, 0xefefbfc0, 0x40404040, 0xbfbfbfc0, 0x48480000,<br>
+       0xb7b80000, 0x00004848, 0xffffb7b8, 0x302fcfd0, 0xcfd03030, 0x403fdfe0, 0xbfc02020, 0xdfe04040,<br>
+       0x201fbfc0, 0x68682828, 0x9797d7d8, 0x28286868, 0xd7d79798, 0x70704848, 0x8f8fb7b8, 0x48487070,<br>
+       0xb7b78f90, 0x5857e7e8, 0xa7a81818, 0xe7e85858, 0x1817a7a8, 0x70701010, 0x8f8feff0, 0x10107070,<br>
+       0xefef8f90, 0x78787878, 0x87878788, 0x5857b7b8, 0xa7a84848, 0xb7b85858, 0x4847a7a8, 0x7877c7c8,<br>
+       0x87883838, 0xc7c87878, 0x38378788, 0x30303030, 0xcfcfcfd0, 0x58585858, 0xa7a7a7a8, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808,<br>
+       0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0xf7f7f7f8,<br>
+       0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8,<br>
+       0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000,<br>
+       0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0xf7f80000,<br>
+       0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000,<br>
+       0xf7f80000, 0xf7f80000, 0xf7f80000, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808,<br>
+       0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0xfffff7f8,<br>
+       0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8,<br>
+       0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010,<br>
+       0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0xefefeff0,<br>
+       0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0,<br>
+       0xefefeff0, 0xefefeff0, 0xefefeff0, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808,<br>
+       0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0xefeff7f8,<br>
+       0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8,<br>
+       0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010,<br>
+       0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212,<br>
+       0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x1211edee, 0xedee1212, 0x1b1af6f7,<br>
+       0xe4e50909, 0xf6f71b1b, 0x0908e4e5, 0x24241212, 0xdbdbedee, 0x12122424, 0xededdbdc, 0x24242424,<br>
+       0xdbdbdbdc, 0x2d2d0000, 0xd2d30000, 0x00002d2d, 0xffffd2d3, 0x2423e4e5, 0xdbdc1b1b, 0xe4e52424,<br>
+       0x1b1adbdc, 0x48482d2d, 0xb7b7d2d3, 0x2d2d4848, 0xd2d2b7b8, 0x3635edee, 0xc9ca1212, 0xedee3636,<br>
+       0x1211c9ca, 0x48481212, 0xb7b7edee, 0x12124848, 0xededb7b8, 0x48484848, 0xb7b7b7b8, 0x51510000,<br>
+       0xaeaf0000, 0x00005151, 0xffffaeaf, 0x3635c9ca, 0xc9ca3636, 0x4847dbdc, 0xb7b82424, 0xdbdc4848,<br>
+       0x2423b7b8, 0x75752d2d, 0x8a8ad2d3, 0x2d2d7575, 0xd2d28a8b, 0x7e7e5151, 0x8181aeaf, 0x51517e7e,<br>
+       0xaeae8182, 0x6362e4e5, 0x9c9d1b1b, 0xe4e56363, 0x1b1a9c9d, 0x6362aeaf, 0x9c9d5151, 0xaeaf6363,<br>
+       0x51509c9d, 0x36363636, 0xc9c9c9ca, 0x6c6c6c6c, 0x93939394, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909,<br>
+       0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0xf6f6f6f7,<br>
+       0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7,<br>
+       0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0x09090000, 0x09090000, 0x09090000, 0x09090000,<br>
+       0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000,<br>
+       0x09090000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000,<br>
+       0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0x00000909, 0x00000909,<br>
+       0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909,<br>
+       0x00000909, 0x00000909, 0x00000909, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7,<br>
+       0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7,<br>
+       0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212,<br>
+       0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0xedededee, 0xedededee, 0xedededee,<br>
+       0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee,<br>
+       0xedededee, 0xedededee, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909,<br>
+       0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0xe4e4f6f7,<br>
+       0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7,<br>
+       0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b,<br>
+       0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b,<br>
+       0x09091b1b, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5,<br>
+       0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,<br>
+       0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0504fafb, 0xfafb0505, 0xfafb0505,<br>
+       0x0504fafb, 0x0b0b0606, 0xf4f4f9fa, 0x06060b0b, 0xf9f9f4f5, 0x08080000, 0xf7f80000, 0x00000808,<br>
+       0xfffff7f8, 0x0b0b0b0b, 0xf4f4f4f5, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x11110c0c,<br>
+       0xeeeef3f4, 0x0c0c1111, 0xf3f3eeef, 0x11111111, 0xeeeeeeef, 0x12120606, 0xededf9fa, 0x06061212,<br>
+       0xf9f9edee, 0x0b0af7f8, 0xf4f50808, 0xf7f80b0b, 0x0807f4f5, 0x0f0f0000, 0xf0f10000, 0x00000f0f,<br>
+       0xfffff0f1, 0x14140000, 0xebec0000, 0x00001414, 0xffffebec, 0x19191212, 0xe6e6edee, 0x12121919,<br>
+       0xedede6e7, 0x19190b0b, 0xe6e6f4f5, 0x0b0b1919, 0xf4f4e6e7, 0x19191919, 0xe6e6e6e7, 0x0e0df1f2,<br>
+       0xf1f20e0e, 0xf1f20e0e, 0x0e0df1f2, 0x1a1a0000, 0xe5e60000, 0x00001a1a, 0xffffe5e6, 0x1211f4f5,<br>
+       0xedee0b0b, 0xf4f51212, 0x0b0aedee, 0x1615f8f9, 0xe9ea0707, 0xf8f91616, 0x0706e9ea, 0x22221a1a,<br>
+       0xdddde5e6, 0x1a1a2222, 0xe5e5ddde, 0x22221212, 0xddddedee, 0x12122222, 0xededddde, 0x22222222,<br>
+       0xddddddde, 0x23230b0b, 0xdcdcf4f5, 0x0b0b2323, 0xf4f4dcdd, 0x1d1d0000, 0xe2e30000, 0x00001d1d,<br>
+       0xffffe2e3, 0x1615eced, 0xe9ea1313, 0xeced1616, 0x1312e9ea, 0x1a19f0f1, 0xe5e60f0f, 0xf0f11a1a,<br>
+       0x0f0ee5e6, 0x25250000, 0xdadb0000, 0x00002525, 0xffffdadb, 0x2c2c1b1b, 0xd3d3e4e5, 0x1b1b2c2c,<br>
+       0xe4e4d3d4, 0x2c2c2424, 0xd3d3dbdc, 0x24242c2c, 0xdbdbd3d4, 0x2c2c1212, 0xd3d3edee, 0x12122c2c,<br>
+       0xededd3d4, 0x2120f5f6, 0xdedf0a0a, 0xf5f62121, 0x0a09dedf, 0x2d2d2d2d, 0xd2d2d2d3, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,<br>
+       0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000,<br>
+       0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000,<br>
+       0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd,<br>
+       0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000,<br>
+       0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa,<br>
+       0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303,<br>
+       0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,<br>
+       0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000,<br>
+       0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000,<br>
+       0xf8f90000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0403fbfc, 0xfbfc0404, 0xf9fa0a0a,<br>
+       0x0605f5f6, 0xf3f40000, 0x0c0c0000, 0xf3f3f9fa, 0xf3f40606, 0x0c0bf9fa, 0x0c0c0606, 0xfffff1f2,<br>
+       0x00000e0e, 0x0c0c0c0c, 0xf3f3f3f4, 0xedee0000, 0x12120000, 0xf3f40e0e, 0x0c0bf1f2, 0xf9f9edee,<br>
+       0xf9fa1212, 0x0605edee, 0x06061212, 0xededf5f6, 0xedee0a0a, 0x1211f5f6, 0x12120a0a, 0xffffe9ea,<br>
+       0x00001616, 0xe7e80000, 0x18180000, 0xf3f3e9ea, 0xf3f41616, 0x0c0be9ea, 0x0c0c1616, 0xe7e7f7f8,<br>
+       0xe7e80808, 0x1817f7f8, 0x18180808, 0xf9f9e5e6, 0xf9fa1a1a, 0x0605e5e6, 0x06061a1a, 0xffffe3e4,<br>
+       0x00001c1c, 0x14141414, 0xebebebec, 0xe5e5f1f2, 0x1a1a0e0e, 0xf3f3e1e2, 0x0c0c1e1e, 0xdfdff5f6,<br>
+       0x20200a0a, 0xdfdfedee, 0x20201212, 0xe5e5e5e6, 0x1a1a1a1a, 0xebebddde, 0x14142222, 0xf3f3d9da,<br>
+       0x0c0c2626, 0xdfdfdfe0, 0x20202020, 0x20202020, 0xd7d7e9ea, 0xddddddde, 0x22222222, 0x00000000,<br>
+       0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,<br>
+       0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606,<br>
+       0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe,<br>
+       0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000,<br>
+       0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000,<br>
+       0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000,<br>
+       0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000,<br>
+       0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000,<br>
+       0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,<br>
+       0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606,<br>
+       0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe,<br>
+       0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000,<br>
+       0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000,<br>
+       0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a,<br>
+       0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x0605f9fa, 0xf9fa0606, 0xf7f80e0e,<br>
+       0x0807f1f2, 0xffffedee, 0x00001212, 0xeff00a0a, 0x100ff5f6, 0xe7e80000, 0x18180000, 0xf7f7e7e8,<br>
+       0xf7f81818, 0x0807e7e8, 0x08081818, 0x12121212, 0xedededee, 0xeff01414, 0x100febec, 0xe5e5f1f2,<br>
+       0xe5e60e0e, 0x1a19f1f2, 0x1a1a0e0e, 0xffffe1e2, 0x00001e1e, 0xddde0000, 0x22220000, 0xf7f7ddde,<br>
+       0xf7f82222, 0x0807ddde, 0x08082222, 0xedede1e2, 0xedee1e1e, 0x1211e1e2, 0x12121e1e, 0xddddf5f6,<br>
+       0xddde0a0a, 0x2221f5f6, 0x22220a0a, 0xddddebec, 0x22221414, 0xffffd7d8, 0x00002828, 0x1e1e1e1e,<br>
+       0xe1e1e1e2, 0xededd7d8, 0x12122828, 0xd3d40000, 0x2c2c0000, 0xd3d3eff0, 0x2c2c1010, 0xdbdbdbdc,<br>
+       0xdbdbdbdc, 0x24242424, 0xd3d3e5e6, 0x2c2c1a1a, 0xe5e5d1d2, 0x1a1a2e2e, 0xededcbcc, 0x12123434,<br>
+       0xc9c9ebec, 0xd3d3d3d4, 0x2c2c2c2c, 0xc9c9dfe0, 0xd1d1d1d2, 0xd1d1d1d2, 0x2e2e2e2e, 0x00000000,<br>
+       0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6,<br>
+       0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,<br>
+       0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a,<br>
+       0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc,<br>
+       0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000,<br>
+       0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000,<br>
+       0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,<br>
+       0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6,<br>
+       0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a,<br>
+       0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000,<br>
+       0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000,<br>
+       0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404,<br>
+       0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000,<br>
+       0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6,<br>
+       0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202,<br>
+       0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a,<br>
+       0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc,<br>
+       0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000,<br>
+       0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000,<br>
+       0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,<br>
+       0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x0807f7f8, 0xf7f80808, 0xeff00808,<br>
+       0x100ff7f8, 0xe7e80000, 0x18180000, 0xf7f7e7e8, 0xf7f81818, 0x0807e7e8, 0x08081818, 0xeff01414,<br>
+       0x100febec, 0xffffe3e4, 0x00001c1c, 0xe7e7eff0, 0xe7e81010, 0x1817eff0, 0x18181010, 0xdfe00000,<br>
+       0x20200000, 0xefefe3e4, 0xeff01c1c, 0x100fe3e4, 0x10101c1c, 0xdfdff7f8, 0xdfe00808, 0xf7f7dfe0,<br>
+       0xf7f82020, 0x0807dfe0, 0x08082020, 0x201ff7f8, 0x20200808, 0x18181818, 0xe7e7e7e8, 0xe7e81818,<br>
+       0x1817e7e8, 0xdfdfebec, 0x20201414, 0xffffd7d8, 0x00002828, 0xefefd7d8, 0x10102828, 0xd3d40000,<br>
+       0xd3d40000, 0xffffd3d4, 0x00002c2c, 0x2c2c0000, 0x2c2c0000, 0xdfdfdfe0, 0x20202020, 0xd3d3eff0,<br>
+       0x2c2c1010, 0xd3d3e7e8, 0xe7e7d3d4, 0x18182c2c, 0x2c2c1818, 0xefefcfd0, 0x10103030, 0xdbdbdbdc,<br>
+       0xdbdbdbdc, 0x24242424, 0x24242424, 0xcbcbebec, 0x28282828, 0xd7d7d7d8, 0xcbcbdfe0, 0x00000000,<br>
+       0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404,<br>
+       0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c,<br>
+       0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000,<br>
+       0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000,<br>
+       0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,<br>
+       0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4,<br>
+       0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000,<br>
+       0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000,<br>
+       0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404,<br>
+       0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000,<br>
+       0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404,<br>
+       0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c,<br>
+       0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000,<br>
+       0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000,<br>
+       0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,<br>
+       0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,<br>
+       0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,<br>
+       0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,<br>
+       0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414,<br>
+       0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0,<br>
+       0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c,<br>
+       0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec,<br>
+       0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606,<br>
+       0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e,<br>
+       0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020,<br>
+       0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000<br>
+};<br>
+<br>
+<br>
+const uint32 Indeo3Decoder::correctionhighorder[] = {<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101,<br>
+       0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303,<br>
+       0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9,<br>
+       0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707,<br>
+       0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc,<br>
+       0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404,<br>
+       0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101,<br>
+       0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff,<br>
+       0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd,<br>
+       0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303,<br>
+       0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000,<br>
+       0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x04040404, 0xfbfbfbfc,<br>
+       0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000,<br>
+       0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd,<br>
+       0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb,<br>
+       0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101,<br>
+       0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc,<br>
+       0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000,<br>
+       0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd,<br>
+       0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb,<br>
+       0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101,<br>
+       0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc,<br>
+       0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000,<br>
+       0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd,<br>
+       0x03030a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202,<br>
+       0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505,<br>
+       0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303,<br>
+       0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9,<br>
+       0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe,<br>
+       0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000,<br>
+       0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5,<br>
+       0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707,<br>
+       0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb,<br>
+       0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd,<br>
+       0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b,<br>
+       0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202,<br>
+       0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505,<br>
+       0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303,<br>
+       0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9,<br>
+       0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,<br>
+       0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,<br>
+       0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,<br>
+       0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,<br>
+       0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,<br>
+       0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,<br>
+       0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,<br>
+       0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,<br>
+       0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,<br>
+       0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,<br>
+       0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc,<br>
+       0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8,<br>
+       0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,<br>
+       0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,<br>
+       0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,<br>
+       0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,<br>
+       0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,<br>
+       0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,<br>
+       0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,<br>
+       0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,<br>
+       0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,<br>
+       0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,<br>
+       0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb,<br>
+       0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6,<br>
+       0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,<br>
+       0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,<br>
+       0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,<br>
+       0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,<br>
+       0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,<br>
+       0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,<br>
+       0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,<br>
+       0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,<br>
+       0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,<br>
+       0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,<br>
+       0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee,<br>
+       0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303,<br>
+       0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x09090909, 0xf6f6f6f7,<br>
+       0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa,<br>
+       0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c,<br>
+       0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000,<br>
+       0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec,<br>
+       0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd,<br>
+       0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717,<br>
+       0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4,<br>
+       0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909,<br>
+       0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606,<br>
+       0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303,<br>
+       0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9,<br>
+       0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414,<br>
+       0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7,<br>
+       0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa,<br>
+       0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c,<br>
+       0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000,<br>
+       0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec,<br>
+       0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd,<br>
+       0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717,<br>
+       0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4,<br>
+       0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000,<br>
+       0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202,<br>
+       0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe,<br>
+       0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000,<br>
+       0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202,<br>
+       0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe,<br>
+       0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa,<br>
+       0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606,<br>
+       0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd,<br>
+       0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303,<br>
+       0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000,<br>
+       0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000,<br>
+       0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd,<br>
+       0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303,<br>
+       0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000,<br>
+       0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x04040404, 0xfbfbfbfc,<br>
+       0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000,<br>
+       0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc,<br>
+       0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,<br>
+       0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000,<br>
+       0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc,<br>
+       0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000,<br>
+       0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc,<br>
+       0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc,<br>
+       0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000,<br>
+       0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc,<br>
+       0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000,<br>
+       0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc,<br>
+       0x04040808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000,<br>
+       0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505,<br>
+       0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505,<br>
+       0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb,<br>
+       0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000,<br>
+       0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000,<br>
+       0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6,<br>
+       0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505,<br>
+       0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb,<br>
+       0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb,<br>
+       0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a,<br>
+       0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000,<br>
+       0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505,<br>
+       0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505,<br>
+       0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb,<br>
+       0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,<br>
+       0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,<br>
+       0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,<br>
+       0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,<br>
+       0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,<br>
+       0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa,<br>
+       0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa,<br>
+       0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa,<br>
+       0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,<br>
+       0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,<br>
+       0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,<br>
+       0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,<br>
+       0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,<br>
+       0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,<br>
+       0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,<br>
+       0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,<br>
+       0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,<br>
+       0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,<br>
+       0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9,<br>
+       0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9,<br>
+       0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9,<br>
+       0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,<br>
+       0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,<br>
+       0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,<br>
+       0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,<br>
+       0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,<br>
+       0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,<br>
+       0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,<br>
+       0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,<br>
+       0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,<br>
+       0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,<br>
+       0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,<br>
+       0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0,<br>
+       0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000,<br>
+       0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x09090909, 0xf6f6f6f7,<br>
+       0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7,<br>
+       0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909,<br>
+       0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000,<br>
+       0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee,<br>
+       0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000,<br>
+       0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b,<br>
+       0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7,<br>
+       0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909,<br>
+       0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909,<br>
+       0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000,<br>
+       0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5,<br>
+       0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212,<br>
+       0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7,<br>
+       0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7,<br>
+       0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909,<br>
+       0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000,<br>
+       0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee,<br>
+       0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000,<br>
+       0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b,<br>
+       0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7,<br>
+       0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000,<br>
+       0x03030000, 0x03030000, 0x03030000, 0x03030000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000,<br>
+       0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0x00000303,<br>
+       0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303,<br>
+       0x00000303, 0x00000303, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd,<br>
+       0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000,<br>
+       0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0xf8f90000, 0xf8f90000,<br>
+       0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000,<br>
+       0xf8f90000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,<br>
+       0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,<br>
+       0x02020000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000,<br>
+       0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202,<br>
+       0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202,<br>
+       0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,<br>
+       0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0x06060000, 0x06060000, 0x06060000, 0x06060000,<br>
+       0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000,<br>
+       0x06060000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000,<br>
+       0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0x00000606, 0x00000606,<br>
+       0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606,<br>
+       0x00000606, 0x00000606, 0x00000606, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,<br>
+       0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,<br>
+       0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000,<br>
+       0x02020000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000,<br>
+       0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202,<br>
+       0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202,<br>
+       0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,<br>
+       0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe,<br>
+       0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,<br>
+       0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,<br>
+       0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,<br>
+       0xfbfbfbfc, 0xfbfbfbfc, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a,<br>
+       0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0xf5f5f5f6,<br>
+       0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6,<br>
+       0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000,<br>
+       0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000,<br>
+       0x0a0a0000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000,<br>
+       0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0x00000a0a, 0x00000a0a,<br>
+       0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a,<br>
+       0x00000a0a, 0x00000a0a, 0x00000a0a, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6,<br>
+       0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040000, 0x04040000, 0x04040000, 0x04040000,<br>
+       0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000,<br>
+       0x04040000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000,<br>
+       0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0x00000404, 0x00000404,<br>
+       0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404,<br>
+       0x00000404, 0x00000404, 0x00000404, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc,<br>
+       0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc,<br>
+       0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404,<br>
+       0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,<br>
+       0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc,<br>
+       0xfbfbfbfc, 0xfbfbfbfc, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000,<br>
+       0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000,<br>
+       0x0c0c0000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000,<br>
+       0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0x00000c0c, 0x00000c0c,<br>
+       0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c,<br>
+       0x00000c0c, 0x00000c0c, 0x00000c0c, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4,<br>
+       0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,<br>
+       0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,<br>
+       0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,<br>
+       0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,<br>
+       0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,<br>
+       0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,<br>
+       0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,<br>
+       0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202,<br>
+       0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe,<br>
+       0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606,<br>
+       0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c,<br>
+       0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4,<br>
+       0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414,<br>
+       0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec,<br>
+       0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020,<br>
+       0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0,<br>
+       0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e,<br>
+       0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2,<br>
+       0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000<br>
+};<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/indeo3.h b/image/codecs/indeo3.h<br>
new file mode 100644<br>
index 0000000..275cbc1<br>
--- /dev/null<br>
+++ b/image/codecs/indeo3.h<br>
@@ -0,0 +1,94 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "common/scummsys.h"<br>
+<br>
+/* Intel Indeo 3 decompressor, derived from ffmpeg.<br>
+ *<br>
+ * Original copyright note:<br>
+ * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg<br>
+ * written, produced, and directed by Alan Smithee<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_INDEO3_H<br>
+#define IMAGE_CODECS_INDEO3_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Intel Indeo 3 decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - AVIDecoder<br>
+ *  - VMDDecoder<br>
+ */<br>
+class Indeo3Decoder : public Codec {<br>
+public:<br>
+       Indeo3Decoder(uint16 width, uint16 height);<br>
+       ~Indeo3Decoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const;<br>
+<br>
+       static bool isIndeo3(Common::SeekableReadStream &stream);<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+<br>
+       Graphics::PixelFormat _pixelFormat;<br>
+<br>
+       static const int _corrector_type_0[24];<br>
+       static const int _corrector_type_2[8];<br>
+       static const uint32 correction[];<br>
+       static const uint32 correctionloworder[];<br>
+       static const uint32 correctionhighorder[];<br>
+<br>
+       struct YUVBufs {<br>
+               byte *Ybuf;<br>
+               byte *Ubuf;<br>
+               byte *Vbuf;<br>
+               byte *the_buf;<br>
+               uint32 the_buf_size;<br>
+               uint16 y_w, y_h;<br>
+               uint16 uv_w, uv_h;<br>
+       };<br>
+<br>
+       YUVBufs _iv_frame[2];<br>
+       YUVBufs *_cur_frame;<br>
+       YUVBufs *_ref_frame;<br>
+<br>
+       byte *_ModPred;<br>
+       uint16 *_corrector_type;<br>
+<br>
+       void buildModPred();<br>
+       void allocFrames();<br>
+<br>
+       void decodeChunk(byte *cur, byte *ref, int width, int height,<br>
+                       const byte *buf1, uint32 fflags2, const byte *hdr,<br>
+                       const byte *buf2, int min_width_160);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/jpeg.cpp b/image/codecs/jpeg.cpp<br>
new file mode 100644<br>
index 0000000..9e8ba5a<br>
--- /dev/null<br>
+++ b/image/codecs/jpeg.cpp<br>
@@ -0,0 +1,66 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "common/system.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/surface.h"<br>
+#include "image/jpeg.h"<br>
+<br>
+#include "image/codecs/jpeg.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+JPEGCodec::JPEGCodec() : Codec() {<br>
+       _pixelFormat = g_system->getScreenFormat();<br>
+       _surface = NULL;<br>
+}<br>
+<br>
+JPEGCodec::~JPEGCodec() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+}<br>
+<br>
+const Graphics::Surface *JPEGCodec::decodeImage(Common::SeekableReadStream *stream) {<br>
+       JPEGDecoder jpeg;<br>
+<br>
+       if (!jpeg.loadStream(*stream)) {<br>
+               warning("Failed to decode JPEG frame");<br>
+               return 0;<br>
+       }<br>
+<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+<br>
+       _surface = jpeg.getSurface()->convertTo(_pixelFormat);<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/jpeg.h b/image/codecs/jpeg.h<br>
new file mode 100644<br>
index 0000000..d48604b<br>
--- /dev/null<br>
+++ b/image/codecs/jpeg.h<br>
@@ -0,0 +1,60 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_JPEG_H<br>
+#define IMAGE_CODECS_JPEG_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+#include "graphics/pixelformat.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * JPEG decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class JPEGCodec : public Codec {<br>
+public:<br>
+       JPEGCodec();<br>
+       ~JPEGCodec();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
+<br>
+private:<br>
+       Graphics::PixelFormat _pixelFormat;<br>
+       Graphics::Surface *_surface;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/mjpeg.cpp b/image/codecs/mjpeg.cpp<br>
new file mode 100644<br>
index 0000000..aa7e1d0<br>
--- /dev/null<br>
+++ b/image/codecs/mjpeg.cpp<br>
@@ -0,0 +1,217 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// Based on LGPL MJPEG/AVI to JPEG/JFIF conversion code from libav<br>
+// Copyright (c) 2010 Adrian Daerr and Nicolas George<br>
+// That in turn was adapted from mjpeg2jpeg.c, with original copyright:<br>
+// Paris 2010 Adrian Daerr, public domain<br>
+<br>
+#include "common/memstream.h"<br>
+#include "common/system.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/surface.h"<br>
+#include "image/jpeg.h"<br>
+<br>
+#include "image/codecs/mjpeg.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+MJPEGDecoder::MJPEGDecoder() : Codec() {<br>
+       _pixelFormat = g_system->getScreenFormat();<br>
+       _surface = 0;<br>
+}<br>
+<br>
+MJPEGDecoder::~MJPEGDecoder() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+}<br>
+<br>
+// Header to be inserted<br>
+static const byte s_jpegHeader[] = {<br>
+       0xff, 0xd8,                     // SOI<br>
+       0xff, 0xe0,                     // APP0<br>
+       0x00, 0x10,                     // APP0 header size (including<br>
+                                       // this field, but excluding preceding)<br>
+       'J', 'F', 'I', 'F', 0x00,       // ID string 'JFIF\0'<br>
+       0x01, 0x01,                     // version<br>
+       0x00,                           // bits per type<br>
+       0x00, 0x00,                     // X density<br>
+       0x00, 0x00,                     // Y density<br>
+       0x00,                           // X thumbnail size<br>
+       0x00<br>
+};<br>
+<br>
+enum {<br>
+       DHT_SEGMENT_SIZE = 420<br>
+};<br>
+<br>
+static const byte s_dhtSegmentHead[] = { 0xFF, 0xC4, 0x01, 0xA2, 0x00 };<br>
+static const byte s_dhtSegmentFrag[] = {<br>
+       0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,<br>
+       0x0a, 0x0b, 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,<br>
+       0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00<br>
+};<br>
+<br>
+// Set up the standard Huffman tables (cf. JPEG standard section K.3)<br>
+// IMPORTANT: these are only valid for 8-bit data precision!<br>
+static const byte s_mjpegBitsDCLuminance[17] = {<br>
+       /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0<br>
+};<br>
+<br>
+static const byte s_mjpegValDC[12] = {<br>
+       0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11<br>
+};<br>
+<br>
+static const byte s_mjpegBitsDCChrominance[17] = {<br>
+       /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0<br>
+};<br>
+<br>
+static const byte s_mjpegBitsACLuminance[17] = {<br>
+       /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d<br>
+};<br>
+<br>
+static const byte s_mjpegValACLuminance[] = {<br>
+       0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,<br>
+       0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,<br>
+       0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,<br>
+       0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,<br>
+       0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,<br>
+       0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,<br>
+       0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,<br>
+       0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,<br>
+       0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,<br>
+       0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,<br>
+       0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,<br>
+       0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,<br>
+       0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,<br>
+       0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,<br>
+       0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,<br>
+       0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,<br>
+       0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,<br>
+       0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,<br>
+       0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,<br>
+       0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,<br>
+       0xf9, 0xfa<br>
+};<br>
+<br>
+static const byte s_mjpegBitsACChrominance[17] = {<br>
+       /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77<br>
+};<br>
+<br>
+static const byte s_mjpegValACChrominance[] = {<br>
+       0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,<br>
+       0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,<br>
+       0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,<br>
+       0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,<br>
+       0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,<br>
+       0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,<br>
+       0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,<br>
+       0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,<br>
+       0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,<br>
+       0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,<br>
+       0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,<br>
+       0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,<br>
+       0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,<br>
+       0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,<br>
+       0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,<br>
+       0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,<br>
+       0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,<br>
+       0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,<br>
+       0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,<br>
+       0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,<br>
+       0xf9, 0xfa<br>
+};<br>
+<br>
+const Graphics::Surface *MJPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       // We need to reconstruct an actual JPEG stream here, then feed it to the JPEG decoder<br>
+       // Yes, this is a pain.<br>
+<br>
+       stream->readUint32BE(); // Skip nonsense JPEG header<br>
+       uint16 inputSkip = stream->readUint16BE() + 4;<br>
+       uint32 tag = stream->readUint32BE();<br>
+<br>
+       if (tag != MKTAG('A', 'V', 'I', '1')) {<br>
+               warning("Invalid MJPEG tag found");<br>
+               return 0;<br>
+       }<br>
+<br>
+       uint32 outputSize = stream->size() - inputSkip + sizeof(s_jpegHeader) + DHT_SEGMENT_SIZE;<br>
+       byte *data = (byte *)malloc(outputSize);<br>
+<br>
+       if (!data) {<br>
+               warning("Failed to allocate data for MJPEG conversion");<br>
+               return 0;<br>
+       }<br>
+<br>
+       // Copy the header<br>
+       memcpy(data, s_jpegHeader, sizeof(s_jpegHeader));<br>
+       uint32 dataOffset = sizeof(s_jpegHeader);<br>
+<br>
+       // Write the fake DHT segment<br>
+       memcpy(data + dataOffset, s_dhtSegmentHead, sizeof(s_dhtSegmentHead));<br>
+       dataOffset += sizeof(s_dhtSegmentHead);<br>
+       memcpy(data + dataOffset, s_mjpegBitsDCLuminance + 1, 16);<br>
+       dataOffset += 16;<br>
+       memcpy(data + dataOffset, s_dhtSegmentFrag, sizeof(s_dhtSegmentFrag));<br>
+       dataOffset += sizeof(s_dhtSegmentFrag);<br>
+       memcpy(data + dataOffset, s_mjpegValDC, 12);<br>
+       dataOffset += 12;<br>
+       data[dataOffset++] = 0x10;<br>
+       memcpy(data + dataOffset, s_mjpegBitsACLuminance + 1, 16);<br>
+       dataOffset += 16;<br>
+       memcpy(data + dataOffset, s_mjpegValACLuminance, 162);<br>
+       dataOffset += 162;<br>
+       data[dataOffset++] = 0x11;<br>
+       memcpy(data + dataOffset, s_mjpegBitsACChrominance + 1, 16);<br>
+       dataOffset += 16;<br>
+       memcpy(data + dataOffset, s_mjpegValACChrominance, 162);<br>
+       dataOffset += 162;<br>
+<br>
+       // Write the actual data<br>
+       stream->seek(inputSkip);<br>
+       stream->read(data + dataOffset, stream->size() - inputSkip);<br>
+<br>
+       Common::MemoryReadStream convertedStream(data, outputSize, DisposeAfterUse::YES);<br>
+       JPEGDecoder jpeg;<br>
+<br>
+       if (!jpeg.loadStream(convertedStream)) {<br>
+               warning("Failed to decode MJPEG frame");<br>
+               return 0;<br>
+       }<br>
+<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+<br>
+       _surface = jpeg.getSurface()->convertTo(_pixelFormat);<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/mjpeg.h b/image/codecs/mjpeg.h<br>
new file mode 100644<br>
index 0000000..b34b84b<br>
--- /dev/null<br>
+++ b/image/codecs/mjpeg.h<br>
@@ -0,0 +1,60 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_MJPEG_H<br>
+#define IMAGE_CODECS_MJPEG_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+#include "graphics/pixelformat.h"<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Motion JPEG decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - AVIDecoder<br>
+ */<br>
+class MJPEGDecoder : public Codec {<br>
+public:<br>
+       MJPEGDecoder();<br>
+       ~MJPEGDecoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
+<br>
+private:<br>
+       Graphics::PixelFormat _pixelFormat;<br>
+       Graphics::Surface *_surface;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/mpeg.cpp b/image/codecs/mpeg.cpp<br>
new file mode 100644<br>
index 0000000..d81123f<br>
--- /dev/null<br>
+++ b/image/codecs/mpeg.cpp<br>
@@ -0,0 +1,107 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "common/debug.h"<br>
+#include "common/stream.h"<br>
+#include "common/system.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/surface.h"<br>
+#include "graphics/yuv_to_rgb.h"<br>
+<br>
+#include "image/codecs/mpeg.h"<br>
+<br>
+namespace Image {<br>
+<br>
+MPEGDecoder::MPEGDecoder() : Codec() {<br>
+       _pixelFormat = g_system->getScreenFormat();<br>
+       _surface = 0;<br>
+<br>
+       _mpegDecoder = mpeg2_init();<br>
+<br>
+       if (!_mpegDecoder)<br>
+               error("Could not initialize libmpeg2");<br>
+<br>
+       _mpegInfo = mpeg2_info(_mpegDecoder);<br>
+}<br>
+<br>
+MPEGDecoder::~MPEGDecoder() {<br>
+       mpeg2_close(_mpegDecoder);<br>
+<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+}<br>
+<br>
+const Graphics::Surface *MPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       uint32 framePeriod;<br>
+       decodePacket(stream, framePeriod);<br>
+       return _surface;<br>
+}<br>
+<br>
+bool MPEGDecoder::decodePacket(Common::SeekableReadStream *packet, uint32 &framePeriod, Graphics::Surface *dst) {<br>
+       // Decode as much as we can out of this packet<br>
+       uint32 size = 0xFFFFFFFF;<br>
+       mpeg2_state_t state;<br>
+       bool foundFrame = false;<br>
+       framePeriod = 0;<br>
+<br>
+       do {<br>
+               state = mpeg2_parse(_mpegDecoder);<br>
+<br>
+               switch (state) {<br>
+               case STATE_BUFFER:<br>
+                       size = packet->read(_buffer, BUFFER_SIZE);<br>
+                       mpeg2_buffer(_mpegDecoder, _buffer, _buffer + size);<br>
+                       break;<br>
+               case STATE_SLICE:<br>
+               case STATE_END:<br>
+                       if (_mpegInfo->display_fbuf) {<br>
+                               foundFrame = true;<br>
+                               const mpeg2_sequence_t *sequence = _mpegInfo->sequence;<br>
+<br>
+                               framePeriod += sequence->frame_period;<br>
+<br>
+                               if (!dst) {<br>
+                                       // If no destination is specified, use our internal storage<br>
+                                       if (!_surface) {<br>
+                                               _surface = new Graphics::Surface();<br>
+                                               _surface->create(sequence->picture_width, sequence->picture_height, _pixelFormat);<br>
+                                       }<br>
+<br>
+                                       dst = _surface;<br>
+                               }<br>
+<br>
+                               YUVToRGBMan.convert420(dst, Graphics::YUVToRGBManager::kScaleITU, _mpegInfo->display_fbuf->buf[0],<br>
+                                               _mpegInfo->display_fbuf->buf[1], _mpegInfo->display_fbuf->buf[2], sequence->picture_width,<br>
+                                               sequence->picture_height, sequence->width, sequence->chroma_width);<br>
+                       }<br>
+                       break;<br>
+               default:<br>
+                       break;<br>
+               }<br>
+       } while (size != 0);<br>
+<br>
+       return foundFrame;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/mpeg.h b/image/codecs/mpeg.h<br>
new file mode 100644<br>
index 0000000..b9e961c<br>
--- /dev/null<br>
+++ b/image/codecs/mpeg.h<br>
@@ -0,0 +1,98 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifdef USE_MPEG2<br>
+<br>
+#ifndef IMAGE_CODECS_MPEG_H<br>
+#define IMAGE_CODECS_MPEG_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+#include "graphics/pixelformat.h"<br>
+<br>
+#if defined(__PLAYSTATION2__)<br>
+       typedef uint8 uint8_t;<br>
+       typedef uint16 uint16_t;<br>
+       typedef uint32 uint32_t;<br>
+#elif defined(_WIN32_WCE)<br>
+       typedef signed char int8_t;<br>
+       typedef signed short int16_t;<br>
+       typedef unsigned char uint8_t;<br>
+       typedef unsigned short uint16_t;<br>
+#elif defined(_MSC_VER) || defined (__SYMBIAN32__)<br>
+       typedef signed char int8_t;<br>
+       typedef signed short int16_t;<br>
+       typedef unsigned char uint8_t;<br>
+       typedef unsigned short uint16_t;<br>
+       #if !defined(SDL_COMPILEDVERSION) || (SDL_COMPILEDVERSION < 1210)<br>
+       typedef signed long int32_t;<br>
+       typedef unsigned long uint32_t;<br>
+       #endif<br>
+#else<br>
+#      include <inttypes.h><br>
+#endif<br>
+<br>
+extern "C" {<br>
+       #include <mpeg2dec/mpeg2.h><br>
+}<br>
+<br>
+namespace Common {<br>
+class SeekableReadStream;<br>
+}<br>
+<br>
+namespace Graphics {<br>
+struct Surface;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+// MPEG 1/2 video decoder<br>
+<br>
+class MPEGDecoder : public Codec {<br>
+public:<br>
+       MPEGDecoder();<br>
+       ~MPEGDecoder();<br>
+<br>
+       // Codec interface<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
+<br>
+       // MPEGPSDecoder call<br>
+       bool decodePacket(Common::SeekableReadStream *packet, uint32 &framePeriod, Graphics::Surface *dst = 0);<br>
+<br>
+private:<br>
+       Graphics::PixelFormat _pixelFormat;<br>
+       Graphics::Surface *_surface;<br>
+<br>
+       enum {<br>
+               BUFFER_SIZE = 4096<br>
+       };<br>
+<br>
+       byte _buffer[BUFFER_SIZE];<br>
+       mpeg2dec_t *_mpegDecoder;<br>
+       const mpeg2_info_t *_mpegInfo;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif // IMAGE_CODECS_MPEG_H<br>
+<br>
+#endif // USE_MPEG2<br>
diff --git a/image/codecs/msrle.cpp b/image/codecs/msrle.cpp<br>
new file mode 100644<br>
index 0000000..951de83<br>
--- /dev/null<br>
+++ b/image/codecs/msrle.cpp<br>
@@ -0,0 +1,132 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// Based off ffmpeg's msrledec.c<br>
+<br>
+#include "image/codecs/msrle.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+<br>
+namespace Image {<br>
+<br>
+MSRLEDecoder::MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) {<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+       _bitsPerPixel = bitsPerPixel;<br>
+}<br>
+<br>
+MSRLEDecoder::~MSRLEDecoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+}<br>
+<br>
+const Graphics::Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       if (_bitsPerPixel == 8) {<br>
+               decode8(stream);<br>
+       } else<br>
+               error("Unhandled %d bit Microsoft RLE encoding", _bitsPerPixel);<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {<br>
+<br>
+       int x = 0;<br>
+       int y = _surface->h - 1;<br>
+<br>
+       byte *data = (byte *) _surface->getPixels();<br>
+       uint16 width  = _surface->w;<br>
+       uint16 height = _surface->h;<br>
+<br>
+       byte *output     = data + ((height - 1) * width);<br>
+       byte *output_end = data + ((height)     * width);<br>
+<br>
+       while (!stream->eos()) {<br>
+               byte count = stream->readByte();<br>
+               byte value = stream->readByte();<br>
+<br>
+               if (count == 0) {<br>
+                       if (value == 0) {<br>
+                               // End of line<br>
+<br>
+                               x = 0;<br>
+                               y--;<br>
+                               output = data + (y * width);<br>
+<br>
+                               if (y < 0) {<br>
+                                       warning("MS RLE Codec: Next line is beyond picture bounds");<br>
+                                       return;<br>
+                               }<br>
+<br>
+                       } else if (value == 1) {<br>
+                               // End of image<br>
+<br>
+                               return;<br>
+                       } else if (value == 2) {<br>
+                               // Skip<br>
+<br>
+                               count = stream->readByte();<br>
+                               value = stream->readByte();<br>
+<br>
+                               y -= value;<br>
+                               x += count;<br>
+<br>
+                               if (y < 0) {<br>
+                                       warning("MS RLE Codec: Skip beyond picture bounds");<br>
+                                       return;<br>
+                               }<br>
+<br>
+                               output = data + ((y * width) + x);<br>
+<br>
+                       } else {<br>
+                               // Copy data<br>
+<br>
+                               if (output + value > output_end) {<br>
+                                       stream->skip(value);<br>
+                                       continue;<br>
+                               }<br>
+<br>
+                               for (int i = 0; i < value; i++)<br>
+                                       *output++ = stream->readByte();<br>
+<br>
+                               if (value & 1)<br>
+                                       stream->skip(1);<br>
+<br>
+                               x += value;<br>
+                       }<br>
+<br>
+               } else {<br>
+                       // Run data<br>
+<br>
+                       if (output + count > output_end)<br>
+                               continue;<br>
+<br>
+                       for (int i = 0; i < count; i++, x++)<br>
+                               *output++ = value;<br>
+               }<br>
+<br>
+       }<br>
+<br>
+       warning("MS RLE Codec: No end-of-picture code");<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/msrle.h b/image/codecs/msrle.h<br>
new file mode 100644<br>
index 0000000..10e3531<br>
--- /dev/null<br>
+++ b/image/codecs/msrle.h<br>
@@ -0,0 +1,54 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_MSRLE_H<br>
+#define IMAGE_CODECS_MSRLE_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Microsoft Run-Length Encoding decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - AVIDecoder<br>
+ */<br>
+class MSRLEDecoder : public Codec {<br>
+public:<br>
+       MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);<br>
+       ~MSRLEDecoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
+<br>
+private:<br>
+       byte _bitsPerPixel;<br>
+<br>
+       Graphics::Surface *_surface;<br>
+<br>
+       void decode8(Common::SeekableReadStream *stream);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/msvideo1.cpp b/image/codecs/msvideo1.cpp<br>
new file mode 100644<br>
index 0000000..e94afed<br>
--- /dev/null<br>
+++ b/image/codecs/msvideo1.cpp<br>
@@ -0,0 +1,139 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+ // Based off ffmpeg's msvideo.cpp<br>
+<br>
+#include "image/codecs/msvideo1.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+<br>
+namespace Image {<br>
+<br>
+#define CHECK_STREAM_PTR(n) \<br>
+  if ((stream->pos() + n) > stream->size() ) { \<br>
+       warning ("MS Video-1: Stream out of bounds (%d >= %d)", stream->pos() + n, stream->size()); \<br>
+    return; \<br>
+  }<br>
+<br>
+MSVideo1Decoder::MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {<br>
+       _surface = new Graphics::Surface();<br>
+       // TODO: Specify the correct pixel format for 2Bpp mode.<br>
+       _surface->create(width, height, (bitsPerPixel == 8) ? Graphics::PixelFormat::createFormatCLUT8() : Graphics::PixelFormat(2, 0, 0, 0, 0, 0, 0, 0, 0));<br>
+       _bitsPerPixel = bitsPerPixel;<br>
+}<br>
+<br>
+MSVideo1Decoder::~MSVideo1Decoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+}<br>
+<br>
+void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {<br>
+    byte colors[8];<br>
+    byte *pixels = (byte *)_surface->getPixels();<br>
+    uint16 stride = _surface->w;<br>
+<br>
+    int skipBlocks = 0;<br>
+    uint16 blocks_wide = _surface->w / 4;<br>
+    uint16 blocks_high = _surface->h / 4;<br>
+    uint32 totalBlocks = blocks_wide * blocks_high;<br>
+    uint32 blockInc = 4;<br>
+    uint16 rowDec = stride + 4;<br>
+<br>
+    for (uint16 block_y = blocks_high; block_y > 0; block_y--) {<br>
+        uint32 blockPtr = (block_y * 4 - 1) * stride;<br>
+        for (uint16 block_x = blocks_wide; block_x > 0; block_x--) {<br>
+            // check if this block should be skipped<br>
+            if (skipBlocks > 0) {<br>
+                blockPtr += blockInc;<br>
+                skipBlocks--;<br>
+                totalBlocks--;<br>
+                continue;<br>
+            }<br>
+<br>
+            uint32 pixelPtr = blockPtr;<br>
+<br>
+            /* get the next two bytes in the encoded data stream */<br>
+            CHECK_STREAM_PTR(2);<br>
+            byte byte_a = stream->readByte();<br>
+            byte byte_b = stream->readByte();<br>
+<br>
+            /* check if the decode is finished */<br>
+            if (byte_a == 0 && byte_b == 0 && totalBlocks == 0) {<br>
+                return;<br>
+            } else if ((byte_b & 0xFC) == 0x84) {<br>
+                // skip code, but don't count the current block<br>
+                skipBlocks = ((byte_b - 0x84) << 8) + byte_a - 1;<br>
+            } else if (byte_b < 0x80) {<br>
+                // 2-color encoding<br>
+                uint16 flags = (byte_b << 8) | byte_a;<br>
+<br>
+                CHECK_STREAM_PTR(2);<br>
+                colors[0] = stream->readByte();<br>
+                colors[1] = stream->readByte();<br>
+<br>
+                for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
+                    for (byte pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1)<br>
+                        pixels[pixelPtr++] = colors[(flags & 0x1) ^ 1];<br>
+                    pixelPtr -= rowDec;<br>
+                }<br>
+            } else if (byte_b >= 0x90) {<br>
+                // 8-color encoding<br>
+                uint16 flags = (byte_b << 8) | byte_a;<br>
+<br>
+                CHECK_STREAM_PTR(8);<br>
+                               for (byte i = 0; i < 8; i++)<br>
+                                       colors[i] = stream->readByte();<br>
+<br>
+                for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
+                    for (byte pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1)<br>
+                        pixels[pixelPtr++] = colors[((pixel_y & 0x2) << 1) + (pixel_x & 0x2) + ((flags & 0x1) ^ 1)];<br>
+                    pixelPtr -= rowDec;<br>
+                }<br>
+            } else {<br>
+                // 1-color encoding<br>
+                colors[0] = byte_a;<br>
+<br>
+                for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
+                    for (byte pixel_x = 0; pixel_x < 4; pixel_x++)<br>
+                        pixels[pixelPtr++] = colors[0];<br>
+                    pixelPtr -= rowDec;<br>
+                }<br>
+            }<br>
+<br>
+            blockPtr += blockInc;<br>
+            totalBlocks--;<br>
+        }<br>
+    }<br>
+}<br>
+<br>
+const Graphics::Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       if (_bitsPerPixel == 8)<br>
+               decode8(stream);<br>
+       else {<br>
+    // decode16(stream);<br>
+               error ("Unhandled MS Video-1 16bpp encoding");<br>
+       }<br>
+<br>
+    return _surface;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/msvideo1.h b/image/codecs/msvideo1.h<br>
new file mode 100644<br>
index 0000000..517936d<br>
--- /dev/null<br>
+++ b/image/codecs/msvideo1.h<br>
@@ -0,0 +1,55 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_MSVIDEO1_H<br>
+#define IMAGE_CODECS_MSVIDEO1_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Microsoft Video 1 decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - AVIDecoder<br>
+ */<br>
+class MSVideo1Decoder : public Codec {<br>
+public:<br>
+       MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);<br>
+       ~MSVideo1Decoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
+<br>
+private:<br>
+       byte _bitsPerPixel;<br>
+<br>
+       Graphics::Surface *_surface;<br>
+<br>
+       void decode8(Common::SeekableReadStream *stream);<br>
+       //void decode16(Common::SeekableReadStream *stream);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/qtrle.cpp b/image/codecs/qtrle.cpp<br>
new file mode 100644<br>
index 0000000..a609e9b<br>
--- /dev/null<br>
+++ b/image/codecs/qtrle.cpp<br>
@@ -0,0 +1,431 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// QuickTime RLE Decoder<br>
+// Based off ffmpeg's QuickTime RLE decoder (written by Mike Melanson)<br>
+<br>
+#include "image/codecs/qtrle.h"<br>
+<br>
+#include "common/debug.h"<br>
+#include "common/scummsys.h"<br>
+#include "common/stream.h"<br>
+#include "common/system.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/colormasks.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+namespace Image {<br>
+<br>
+QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {<br>
+       _bitsPerPixel = bitsPerPixel;<br>
+<br>
+       // We need to ensure the width is a multiple of 4<br>
+       uint16 wMod = width % 4;<br>
+       if (wMod != 0)<br>
+               width += 4 - wMod;<br>
+<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(width, height, getPixelFormat());<br>
+}<br>
+<br>
+#define CHECK_STREAM_PTR(n) \<br>
+  if ((stream->pos() + n) > stream->size()) { \<br>
+    warning("QTRLE Problem: stream out of bounds (%d > %d)", stream->pos() + n, stream->size()); \<br>
+    return; \<br>
+  }<br>
+<br>
+#define CHECK_PIXEL_PTR(n) \<br>
+  if ((int32)pixelPtr + n > _surface->w * _surface->h) { \<br>
+    warning("QTRLE Problem: pixel ptr = %d, pixel limit = %d", pixelPtr + n, _surface->w * _surface->h); \<br>
+    return; \<br>
+  } \<br>
+<br>
+void QTRLEDecoder::decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+       uint32 pixelPtr = 0;<br>
+       byte *rgb = (byte *)_surface->getPixels();<br>
+<br>
+       while (linesToChange) {<br>
+               CHECK_STREAM_PTR(2);<br>
+               byte skip = stream->readByte();<br>
+               int8 rleCode = stream->readSByte();<br>
+<br>
+               if (rleCode == 0)<br>
+                       break;<br>
+<br>
+               if (skip & 0x80) {<br>
+                       linesToChange--;<br>
+                       rowPtr += _surface->w;<br>
+                       pixelPtr = rowPtr + 2 * (skip & 0x7f);<br>
+               } else<br>
+                       pixelPtr += 2 * skip;<br>
+<br>
+               if (rleCode < 0) {<br>
+                       // decode the run length code<br>
+                       rleCode = -rleCode;<br>
+                       // get the next 2 bytes from the stream, treat them as groups of 8 pixels, and output them rleCode times */<br>
+                       CHECK_STREAM_PTR(2);<br>
+                       byte pi0 = stream->readByte();<br>
+                       byte pi1 = stream->readByte();<br>
+                       CHECK_PIXEL_PTR(rleCode * 2);<br>
+<br>
+                       while (rleCode--) {<br>
+                               rgb[pixelPtr++] = pi0;<br>
+                               rgb[pixelPtr++] = pi1;<br>
+                       }<br>
+               } else {<br>
+                       // copy the same pixel directly to output 2 times<br>
+                       rleCode *= 2;<br>
+                       CHECK_STREAM_PTR(rleCode);<br>
+                       CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                       while (rleCode--)<br>
+                               rgb[pixelPtr++] = stream->readByte();<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+void QTRLEDecoder::decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp) {<br>
+       uint32 pixelPtr = 0;<br>
+       byte *rgb = (byte *)_surface->getPixels();<br>
+       byte numPixels = (bpp == 4) ? 8 : 16;<br>
+<br>
+       while (linesToChange--) {<br>
+               CHECK_STREAM_PTR(2);<br>
+               pixelPtr = rowPtr + (numPixels * (stream->readByte() - 1));<br>
+<br>
+               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+                       if (rleCode == 0) {<br>
+                               // there's another skip code in the stream<br>
+                               CHECK_STREAM_PTR(1);<br>
+                               pixelPtr += (numPixels * (stream->readByte() - 1));<br>
+                       } else if (rleCode < 0) {<br>
+                               // decode the run length code<br>
+                               rleCode = -rleCode;<br>
+<br>
+                               // get the next 4 bytes from the stream, treat them as palette indices, and output them rleCode times */<br>
+                               CHECK_STREAM_PTR(4);<br>
+<br>
+                               byte pi[16]; // 16 palette indices<br>
+<br>
+                               for (int8 i = numPixels - 1; i >= 0; i--) {<br>
+                                       pi[numPixels - 1 - i] = (stream->readByte() >> ((i * bpp) & 0x07)) & ((1 << bpp) - 1);<br>
+<br>
+                                       if ((i & ((numPixels >> 2) - 1)) == 0)<br>
+                                               stream->readByte();<br>
+                               }<br>
+<br>
+                               CHECK_PIXEL_PTR(rleCode * numPixels);<br>
+<br>
+                               while (rleCode--)<br>
+                                       for (byte i = 0; i < numPixels; i++)<br>
+                                               rgb[pixelPtr++] = pi[i];<br>
+                       } else {<br>
+                               // copy the same pixel directly to output 4 times<br>
+                               rleCode *= 4;<br>
+                               CHECK_STREAM_PTR(rleCode);<br>
+                               CHECK_PIXEL_PTR(rleCode * (numPixels >> 2));<br>
+<br>
+                               while (rleCode--) {<br>
+                                       byte temp = stream->readByte();<br>
+                                       if (bpp == 4) {<br>
+                                               rgb[pixelPtr++] = (temp >> 4) & 0x0f;<br>
+                                               rgb[pixelPtr++] = temp & 0x0f;<br>
+                                       } else {<br>
+                                               rgb[pixelPtr++] = (temp >> 6) & 0x03;<br>
+                                               rgb[pixelPtr++] = (temp >> 4) & 0x03;<br>
+                                               rgb[pixelPtr++] = (temp >> 2) & 0x03;<br>
+                                               rgb[pixelPtr++] = temp & 0x03;<br>
+                                       }<br>
+                               }<br>
+                       }<br>
+               }<br>
+<br>
+               rowPtr += _surface->w;<br>
+       }<br>
+}<br>
+<br>
+void QTRLEDecoder::decode8(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+       uint32 pixelPtr = 0;<br>
+       byte *rgb = (byte *)_surface->getPixels();<br>
+<br>
+       while (linesToChange--) {<br>
+               CHECK_STREAM_PTR(2);<br>
+               pixelPtr = rowPtr + 4 * (stream->readByte() - 1);<br>
+<br>
+               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+                       if (rleCode == 0) {<br>
+                               // there's another skip code in the stream<br>
+                               CHECK_STREAM_PTR(1);<br>
+                               pixelPtr += 4 * (stream->readByte() - 1);<br>
+                       } else if (rleCode < 0) {<br>
+                               // decode the run length code<br>
+                               rleCode = -rleCode;<br>
+<br>
+                               // get the next 4 bytes from the stream, treat them as palette indices, and output them rleCode times<br>
+                               CHECK_STREAM_PTR(4);<br>
+<br>
+                               byte pi[4];  // 4 palette indexes<br>
+<br>
+                               for (byte i = 0; i < 4; i++)<br>
+                                       pi[i] = stream->readByte();<br>
+<br>
+                               CHECK_PIXEL_PTR(rleCode * 4);<br>
+<br>
+                               while (rleCode--)<br>
+                                       for (byte i = 0; i < 4; i++)<br>
+                                               rgb[pixelPtr++] = pi[i];<br>
+                       } else {<br>
+                               // copy the same pixel directly to output 4 times<br>
+                               rleCode *= 4;<br>
+                               CHECK_STREAM_PTR(rleCode);<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               while (rleCode--)<br>
+                                       rgb[pixelPtr++] = stream->readByte();<br>
+                       }<br>
+               }<br>
+<br>
+               rowPtr += _surface->w;<br>
+       }<br>
+}<br>
+<br>
+void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+       uint32 pixelPtr = 0;<br>
+       uint16 *rgb = (uint16 *)_surface->getPixels();<br>
+<br>
+       while (linesToChange--) {<br>
+               CHECK_STREAM_PTR(2);<br>
+               pixelPtr = rowPtr + stream->readByte() - 1;<br>
+<br>
+               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+                       if (rleCode == 0) {<br>
+                               // there's another skip code in the stream<br>
+                               CHECK_STREAM_PTR(1);<br>
+                               pixelPtr += stream->readByte() - 1;<br>
+                       } else if (rleCode < 0) {<br>
+                               // decode the run length code<br>
+                               rleCode = -rleCode;<br>
+                               CHECK_STREAM_PTR(2);<br>
+<br>
+                               uint16 rgb16 = stream->readUint16BE();<br>
+<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               while (rleCode--)<br>
+                                       rgb[pixelPtr++] = rgb16;<br>
+                       } else {<br>
+                               CHECK_STREAM_PTR(rleCode * 2);<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               // copy pixels directly to output<br>
+                               while (rleCode--)<br>
+                                       rgb[pixelPtr++] = stream->readUint16BE();<br>
+                       }<br>
+               }<br>
+<br>
+               rowPtr += _surface->w;<br>
+       }<br>
+}<br>
+<br>
+void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+       uint32 pixelPtr = 0;<br>
+       uint32 *rgb = (uint32 *)_surface->getPixels();<br>
+<br>
+       while (linesToChange--) {<br>
+               CHECK_STREAM_PTR(2);<br>
+               pixelPtr = rowPtr + stream->readByte() - 1;<br>
+<br>
+               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+                       if (rleCode == 0) {<br>
+                               // there's another skip code in the stream<br>
+                               CHECK_STREAM_PTR(1);<br>
+                               pixelPtr += stream->readByte() - 1;<br>
+                       } else if (rleCode < 0) {<br>
+                               // decode the run length code<br>
+                               rleCode = -rleCode;<br>
+<br>
+                               CHECK_STREAM_PTR(3);<br>
+<br>
+                               byte r = stream->readByte();<br>
+                               byte g = stream->readByte();<br>
+                               byte b = stream->readByte();<br>
+                               uint32 color = _surface->format.RGBToColor(r, g, b);<br>
+<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               while (rleCode--)<br>
+                                       rgb[pixelPtr++] = color;<br>
+                       } else {<br>
+                               CHECK_STREAM_PTR(rleCode * 3);<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               // copy pixels directly to output<br>
+                               while (rleCode--) {<br>
+                                       byte r = stream->readByte();<br>
+                                       byte g = stream->readByte();<br>
+                                       byte b = stream->readByte();<br>
+                                       rgb[pixelPtr++] = _surface->format.RGBToColor(r, g, b);<br>
+                               }<br>
+                       }<br>
+               }<br>
+<br>
+               rowPtr += _surface->w;<br>
+       }<br>
+}<br>
+<br>
+void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+       uint32 pixelPtr = 0;<br>
+       uint32 *rgb = (uint32 *)_surface->getPixels();<br>
+<br>
+       while (linesToChange--) {<br>
+               CHECK_STREAM_PTR(2);<br>
+               pixelPtr = rowPtr + stream->readByte() - 1;<br>
+<br>
+               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+                       if (rleCode == 0) {<br>
+                               // there's another skip code in the stream<br>
+                               CHECK_STREAM_PTR(1);<br>
+                               pixelPtr += stream->readByte() - 1;<br>
+                       } else if (rleCode < 0) {<br>
+                               // decode the run length code<br>
+                               rleCode = -rleCode;<br>
+<br>
+                               CHECK_STREAM_PTR(4);<br>
+<br>
+                               byte a = stream->readByte();<br>
+                               byte r = stream->readByte();<br>
+                               byte g = stream->readByte();<br>
+                               byte b = stream->readByte();<br>
+                               uint32 color = _surface->format.ARGBToColor(a, r, g, b);<br>
+<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               while (rleCode--)<br>
+                                       rgb[pixelPtr++] = color;<br>
+                       } else {<br>
+                               CHECK_STREAM_PTR(rleCode * 4);<br>
+                               CHECK_PIXEL_PTR(rleCode);<br>
+<br>
+                               // copy pixels directly to output<br>
+                               while (rleCode--) {<br>
+                                       byte a = stream->readByte();<br>
+                                       byte r = stream->readByte();<br>
+                                       byte g = stream->readByte();<br>
+                                       byte b = stream->readByte();<br>
+                                       rgb[pixelPtr++] = _surface->format.ARGBToColor(a, r, g, b);<br>
+                               }<br>
+                       }<br>
+               }<br>
+<br>
+               rowPtr += _surface->w;<br>
+       }<br>
+}<br>
+<br>
+const Graphics::Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       uint16 startLine = 0;<br>
+       uint16 height = _surface->h;<br>
+<br>
+       // check if this frame is even supposed to change<br>
+       if (stream->size() < 8)<br>
+               return _surface;<br>
+<br>
+       // start after the chunk size<br>
+       stream->readUint32BE();<br>
+<br>
+       // fetch the header<br>
+       uint16 header = stream->readUint16BE();<br>
+<br>
+       // if a header is present, fetch additional decoding parameters<br>
+       if (header & 8) {<br>
+               if (stream->size() < 14)<br>
+                       return _surface;<br>
+<br>
+               startLine = stream->readUint16BE();<br>
+               stream->readUint16BE(); // Unknown<br>
+               height = stream->readUint16BE();<br>
+               stream->readUint16BE(); // Unknown<br>
+       }<br>
+<br>
+       uint32 rowPtr = _surface->w * startLine;<br>
+<br>
+       switch (_bitsPerPixel) {<br>
+       case 1:<br>
+       case 33:<br>
+               decode1(stream, rowPtr, height);<br>
+               break;<br>
+       case 2:<br>
+       case 34:<br>
+               decode2_4(stream, rowPtr, height, 2);<br>
+               break;<br>
+       case 4:<br>
+       case 36:<br>
+               decode2_4(stream, rowPtr, height, 4);<br>
+               break;<br>
+       case 8:<br>
+       case 40:<br>
+               decode8(stream, rowPtr, height);<br>
+               break;<br>
+       case 16:<br>
+               decode16(stream, rowPtr, height);<br>
+               break;<br>
+       case 24:<br>
+               decode24(stream, rowPtr, height);<br>
+               break;<br>
+       case 32:<br>
+               decode32(stream, rowPtr, height);<br>
+               break;<br>
+       default:<br>
+               error("Unsupported QTRLE bits per pixel %d", _bitsPerPixel);<br>
+       }<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+QTRLEDecoder::~QTRLEDecoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+}<br>
+<br>
+Graphics::PixelFormat QTRLEDecoder::getPixelFormat() const {<br>
+       switch (_bitsPerPixel) {<br>
+       case 1:<br>
+       case 33:<br>
+       case 2:<br>
+       case 34:<br>
+       case 4:<br>
+       case 36:<br>
+       case 8:<br>
+       case 40:<br>
+               return Graphics::PixelFormat::createFormatCLUT8();<br>
+       case 16:<br>
+               return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);<br>
+       case 24:<br>
+       case 32:<br>
+               return Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);<br>
+       default:<br>
+               error("Unsupported QTRLE bits per pixel %d", _bitsPerPixel);<br>
+       }<br>
+<br>
+       return Graphics::PixelFormat();<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/qtrle.h b/image/codecs/qtrle.h<br>
new file mode 100644<br>
index 0000000..c16daa0<br>
--- /dev/null<br>
+++ b/image/codecs/qtrle.h<br>
@@ -0,0 +1,60 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_QTRLE_H<br>
+#define IMAGE_CODECS_QTRLE_H<br>
+<br>
+#include "graphics/pixelformat.h"<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * QuickTime Run-Length Encoding decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class QTRLEDecoder : public Codec {<br>
+public:<br>
+       QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);<br>
+       ~QTRLEDecoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const;<br>
+<br>
+private:<br>
+       byte _bitsPerPixel;<br>
+<br>
+       Graphics::Surface *_surface;<br>
+<br>
+       void decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp);<br>
+       void decode8(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode16(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode24(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/rpza.cpp b/image/codecs/rpza.cpp<br>
new file mode 100644<br>
index 0000000..ecd930f<br>
--- /dev/null<br>
+++ b/image/codecs/rpza.cpp<br>
@@ -0,0 +1,201 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+ // Based off ffmpeg's RPZA decoder<br>
+<br>
+#include "image/codecs/rpza.h"<br>
+<br>
+#include "common/debug.h"<br>
+#include "common/system.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+<br>
+namespace Image {<br>
+<br>
+RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() {<br>
+       // We need to increase the surface size to a multiple of 4<br>
+       uint16 wMod = width % 4;<br>
+       if (wMod != 0)<br>
+               width += 4 - wMod;<br>
+<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(width, height, getPixelFormat());<br>
+}<br>
+<br>
+RPZADecoder::~RPZADecoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+}<br>
+<br>
+#define ADVANCE_BLOCK() \<br>
+       pixelPtr += 4; \<br>
+       if (pixelPtr >= _surface->w) { \<br>
+               pixelPtr = 0; \<br>
+               rowPtr += _surface->w * 4; \<br>
+       } \<br>
+       totalBlocks--; \<br>
+       if (totalBlocks < 0) \<br>
+               error("rpza block counter just went negative (this should not happen)") \<br>
+<br>
+#define PUT_PIXEL(color) \<br>
+       if ((int32)blockPtr < _surface->w * _surface->h) \<br>
+               WRITE_UINT16((uint16 *)_surface->getPixels() + blockPtr, color); \<br>
+       blockPtr++<br>
+<br>
+const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       uint16 colorA = 0, colorB = 0;<br>
+       uint16 color4[4];<br>
+<br>
+       uint32 rowPtr = 0;<br>
+       uint32 pixelPtr = 0;<br>
+       uint32 blockPtr = 0;<br>
+       uint32 rowInc = _surface->w - 4;<br>
+       uint16 ta;<br>
+       uint16 tb;<br>
+<br>
+       // First byte is always 0xe1. Warn if it's different<br>
+       byte firstByte = stream->readByte();<br>
+       if (firstByte != 0xe1)<br>
+               warning("First RPZA chunk byte is 0x%02x instead of 0xe1", firstByte);<br>
+<br>
+       // Get chunk size, ingnoring first byte<br>
+       uint32 chunkSize = stream->readUint16BE() << 8;<br>
+       chunkSize += stream->readByte();<br>
+<br>
+       // If length mismatch use size from MOV file and try to decode anyway<br>
+       if (chunkSize != (uint32)stream->size()) {<br>
+               warning("MOV chunk size != encoded chunk size; using MOV chunk size");<br>
+               chunkSize = stream->size();<br>
+       }<br>
+<br>
+       // Number of 4x4 blocks in frame<br>
+       int32 totalBlocks = ((_surface->w + 3) / 4) * ((_surface->h + 3) / 4);<br>
+<br>
+       // Process chunk data<br>
+       while ((uint32)stream->pos() < chunkSize) {<br>
+               byte opcode = stream->readByte(); // Get opcode<br>
+               byte numBlocks = (opcode & 0x1f) + 1; // Extract block counter from opcode<br>
+<br>
+               // If opcode MSbit is 0, we need more data to decide what to do<br>
+               if ((opcode & 0x80) == 0) {<br>
+                       colorA = (opcode << 8) | stream->readByte();<br>
+                       opcode = 0;<br>
+                       if (stream->readByte() & 0x80) {<br>
+                               // Must behave as opcode 110xxxxx, using colorA computed<br>
+                               // above. Use fake opcode 0x20 to enter switch block at<br>
+                               // the right place<br>
+                               opcode = 0x20;<br>
+                               numBlocks = 1;<br>
+                       }<br>
+                       stream->seek(-1, SEEK_CUR);<br>
+               }<br>
+<br>
+               switch (opcode & 0xe0) {<br>
+               case 0x80: // Skip blocks<br>
+                       while (numBlocks--) {<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+               case 0xa0: // Fill blocks with one color<br>
+                       colorA = stream->readUint16BE();<br>
+                       while (numBlocks--) {<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
+                                       for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {<br>
+                                               PUT_PIXEL(colorA);<br>
+                                       }<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // Fill blocks with 4 colors<br>
+               case 0xc0:<br>
+                       colorA = stream->readUint16BE();<br>
+               case 0x20:<br>
+                       colorB = stream->readUint16BE();<br>
+<br>
+                       // Sort out the colors<br>
+                       color4[0] = colorB;<br>
+                       color4[1] = 0;<br>
+                       color4[2] = 0;<br>
+                       color4[3] = colorA;<br>
+<br>
+                       // Red components<br>
+                       ta = (colorA >> 10) & 0x1F;<br>
+                       tb = (colorB >> 10) & 0x1F;<br>
+                       color4[1] |= ((11 * ta + 21 * tb) >> 5) << 10;<br>
+                       color4[2] |= ((21 * ta + 11 * tb) >> 5) << 10;<br>
+<br>
+                       // Green components<br>
+                       ta = (colorA >> 5) & 0x1F;<br>
+                       tb = (colorB >> 5) & 0x1F;<br>
+                       color4[1] |= ((11 * ta + 21 * tb) >> 5) << 5;<br>
+                       color4[2] |= ((21 * ta + 11 * tb) >> 5) << 5;<br>
+<br>
+                       // Blue components<br>
+                       ta = colorA & 0x1F;<br>
+                       tb = colorB & 0x1F;<br>
+                       color4[1] |= ((11 * ta + 21 * tb) >> 5);<br>
+                       color4[2] |= ((21 * ta + 11 * tb) >> 5);<br>
+<br>
+                       while (numBlocks--) {<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
+                                       byte index = stream->readByte();<br>
+                                       for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {<br>
+                                               byte idx = (index >> (2 * (3 - pixel_x))) & 0x03;<br>
+                                               PUT_PIXEL(color4[idx]);<br>
+                                       }<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // Fill block with 16 colors<br>
+               case 0x00:<br>
+                       blockPtr = rowPtr + pixelPtr;<br>
+                       for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
+                               for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {<br>
+                                       // We already have color of upper left pixel<br>
+                                       if (pixel_y != 0 || pixel_x != 0)<br>
+                                               colorA = stream->readUint16BE();<br>
+<br>
+                                       PUT_PIXEL(colorA);<br>
+                               }<br>
+                               blockPtr += rowInc;<br>
+                       }<br>
+                       ADVANCE_BLOCK();<br>
+                       break;<br>
+<br>
+               // Unknown opcode<br>
+               default:<br>
+                       error("Unknown opcode %02x in rpza chunk", opcode);<br>
+               }<br>
+       }<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/rpza.h b/image/codecs/rpza.h<br>
new file mode 100644<br>
index 0000000..f87ee11<br>
--- /dev/null<br>
+++ b/image/codecs/rpza.h<br>
@@ -0,0 +1,51 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_RPZA_H<br>
+#define IMAGE_CODECS_RPZA_H<br>
+<br>
+#include "graphics/pixelformat.h"<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Apple RPZA decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class RPZADecoder : public Codec {<br>
+public:<br>
+       RPZADecoder(uint16 width, uint16 height);<br>
+       ~RPZADecoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); }<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/smc.cpp b/image/codecs/smc.cpp<br>
new file mode 100644<br>
index 0000000..434a105<br>
--- /dev/null<br>
+++ b/image/codecs/smc.cpp<br>
@@ -0,0 +1,389 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// Based off ffmpeg's SMC decoder<br>
+<br>
+#include "image/codecs/smc.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+<br>
+namespace Image {<br>
+<br>
+#define GET_BLOCK_COUNT() \<br>
+  (opcode & 0x10) ? (1 + stream->readByte()) : 1 + (opcode & 0x0F);<br>
+<br>
+#define ADVANCE_BLOCK() \<br>
+{ \<br>
+       pixelPtr += 4; \<br>
+       if (pixelPtr >= _surface->w) { \<br>
+               pixelPtr = 0; \<br>
+               rowPtr += _surface->w * 4; \<br>
+       } \<br>
+       totalBlocks--; \<br>
+       if (totalBlocks < 0) { \<br>
+               warning("block counter just went negative (this should not happen)"); \<br>
+               return _surface; \<br>
+       } \<br>
+}<br>
+<br>
+SMCDecoder::SMCDecoder(uint16 width, uint16 height) {<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());<br>
+}<br>
+<br>
+SMCDecoder::~SMCDecoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+}<br>
+<br>
+const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       byte *pixels = (byte *)_surface->getPixels();<br>
+<br>
+       uint32 numBlocks = 0;<br>
+       uint32 colorFlags = 0;<br>
+       uint32 colorFlagsA = 0;<br>
+       uint32 colorFlagsB = 0;<br>
+<br>
+       const uint16 rowInc = _surface->w - 4;<br>
+       int32 rowPtr = 0;<br>
+       int32 pixelPtr = 0;<br>
+       uint32 blockPtr = 0;<br>
+       uint32 prevBlockPtr = 0;<br>
+       uint32 prevBlockPtr1 = 0, prevBlockPtr2 = 0;<br>
+       byte prevBlockFlag = false;<br>
+       uint32 pixel = 0;<br>
+<br>
+       uint32 colorPairIndex = 0;<br>
+       uint32 colorQuadIndex = 0;<br>
+       uint32 colorOctetIndex = 0;<br>
+       uint32 colorTableIndex = 0;  // indices to color pair, quad, or octet tables<br>
+<br>
+       int32 chunkSize = stream->readUint32BE() & 0x00FFFFFF;<br>
+       if (chunkSize != stream->size())<br>
+               warning("MOV chunk size != SMC chunk size (%d != %d); ignoring SMC chunk size", chunkSize, stream->size());<br>
+<br>
+       int32 totalBlocks = ((_surface->w + 3) / 4) * ((_surface->h + 3) / 4);<br>
+<br>
+       // traverse through the blocks<br>
+       while (totalBlocks != 0) {<br>
+               // sanity checks<br>
+<br>
+               // make sure stream ptr hasn't gone out of bounds<br>
+               if (stream->pos() > stream->size()) {<br>
+                       warning("SMC decoder just went out of bounds (stream ptr = %d, chunk size = %d)", stream->pos(), stream->size());<br>
+                       return _surface;<br>
+               }<br>
+<br>
+               // make sure the row pointer hasn't gone wild<br>
+               if (rowPtr >= _surface->w * _surface->h) {<br>
+                       warning("SMC decoder just went out of bounds (row ptr = %d, size = %d)", rowPtr, _surface->w * _surface->h);<br>
+                       return _surface;<br>
+               }<br>
+<br>
+               byte opcode = stream->readByte();<br>
+<br>
+               switch (opcode & 0xF0) {<br>
+               // skip n blocks<br>
+               case 0x00:<br>
+               case 0x10:<br>
+                       numBlocks = GET_BLOCK_COUNT();<br>
+                       while (numBlocks--) {<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // repeat last block n times<br>
+               case 0x20:<br>
+               case 0x30:<br>
+                       numBlocks = GET_BLOCK_COUNT();<br>
+<br>
+                       // sanity check<br>
+                       if (rowPtr == 0 && pixelPtr == 0) {<br>
+                               warning("encountered repeat block opcode (%02X) but no blocks rendered yet", opcode & 0xF0);<br>
+                               break;<br>
+                       }<br>
+<br>
+                       // figure out where the previous block started<br>
+                       if (pixelPtr == 0)<br>
+                               prevBlockPtr1 = (rowPtr - _surface->w * 4) + _surface->w - 4;<br>
+                       else<br>
+                               prevBlockPtr1 = rowPtr + pixelPtr - 4;<br>
+<br>
+                       while (numBlocks--) {<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               prevBlockPtr = prevBlockPtr1;<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       for (byte x = 0; x < 4; x++)<br>
+                                               pixels[blockPtr++] = pixels[prevBlockPtr++];<br>
+                                       blockPtr += rowInc;<br>
+                                       prevBlockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // repeat previous pair of blocks n times<br>
+               case 0x40:<br>
+               case 0x50:<br>
+                       numBlocks = GET_BLOCK_COUNT();<br>
+                       numBlocks *= 2;<br>
+<br>
+                       // sanity check<br>
+                       if (rowPtr == 0 && pixelPtr < 2 * 4) {<br>
+                               warning("encountered repeat block opcode (%02X) but not enough blocks rendered yet", opcode & 0xF0);<br>
+                               break;<br>
+                       }<br>
+<br>
+                       // figure out where the previous 2 blocks started<br>
+                       if (pixelPtr == 0)<br>
+                               prevBlockPtr1 = (rowPtr - _surface->w * 4) + _surface->w - 4 * 2;<br>
+                       else if (pixelPtr == 4)<br>
+                               prevBlockPtr1 = (rowPtr - _surface->w * 4) + rowInc;<br>
+                       else<br>
+                               prevBlockPtr1 = rowPtr + pixelPtr - 4 * 2;<br>
+<br>
+                       if (pixelPtr == 0)<br>
+                               prevBlockPtr2 = (rowPtr - _surface->w * 4) + rowInc;<br>
+                       else<br>
+                               prevBlockPtr2 = rowPtr + pixelPtr - 4;<br>
+<br>
+                       prevBlockFlag = 0;<br>
+                       while (numBlocks--) {<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+<br>
+                               if (prevBlockFlag)<br>
+                                       prevBlockPtr = prevBlockPtr2;<br>
+                               else<br>
+                                       prevBlockPtr = prevBlockPtr1;<br>
+<br>
+                               prevBlockFlag = !prevBlockFlag;<br>
+<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       for (byte x = 0; x < 4; x++)<br>
+                                               pixels[blockPtr++] = pixels[prevBlockPtr++];<br>
+<br>
+                                       blockPtr += rowInc;<br>
+                                       prevBlockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // 1-color block encoding<br>
+               case 0x60:<br>
+               case 0x70:<br>
+                       numBlocks = GET_BLOCK_COUNT();<br>
+                       pixel = stream->readByte();<br>
+<br>
+                       while (numBlocks--) {<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       for (byte x = 0; x < 4; x++)<br>
+                                               pixels[blockPtr++] = pixel;<br>
+<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // 2-color block encoding<br>
+               case 0x80:<br>
+               case 0x90:<br>
+                       numBlocks = (opcode & 0x0F) + 1;<br>
+<br>
+                       // figure out which color pair to use to paint the 2-color block<br>
+                       if ((opcode & 0xF0) == 0x80) {<br>
+                               // fetch the next 2 colors from bytestream and store in next<br>
+                               // available entry in the color pair table<br>
+                               for (byte i = 0; i < CPAIR; i++) {<br>
+                                       pixel = stream->readByte();<br>
+                                       colorTableIndex = CPAIR * colorPairIndex + i;<br>
+                                       _colorPairs[colorTableIndex] = pixel;<br>
+                               }<br>
+<br>
+                               // this is the base index to use for this block<br>
+                               colorTableIndex = CPAIR * colorPairIndex;<br>
+                               colorPairIndex++;<br>
+<br>
+                               // wraparound<br>
+                               if (colorPairIndex == COLORS_PER_TABLE)<br>
+                                       colorPairIndex = 0;<br>
+                       } else<br>
+                               colorTableIndex = CPAIR * stream->readByte();<br>
+<br>
+                       while (numBlocks--) {<br>
+                               colorFlags = stream->readUint16BE();<br>
+                               uint16 flagMask = 0x8000;<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       for (byte x = 0; x < 4; x++) {<br>
+                                               if (colorFlags & flagMask)<br>
+                                                       pixel = colorTableIndex + 1;<br>
+                                               else<br>
+                                                       pixel = colorTableIndex;<br>
+<br>
+                                               flagMask >>= 1;<br>
+                                               pixels[blockPtr++] = _colorPairs[pixel];<br>
+                                       }<br>
+<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // 4-color block encoding<br>
+               case 0xA0:<br>
+               case 0xB0:<br>
+                       numBlocks = (opcode & 0x0F) + 1;<br>
+<br>
+                       // figure out which color quad to use to paint the 4-color block<br>
+                       if ((opcode & 0xF0) == 0xA0) {<br>
+                               // fetch the next 4 colors from bytestream and store in next<br>
+                               // available entry in the color quad table<br>
+                               for (byte i = 0; i < CQUAD; i++) {<br>
+                                       pixel = stream->readByte();<br>
+                                       colorTableIndex = CQUAD * colorQuadIndex + i;<br>
+                                       _colorQuads[colorTableIndex] = pixel;<br>
+                               }<br>
+<br>
+                               // this is the base index to use for this block<br>
+                               colorTableIndex = CQUAD * colorQuadIndex;<br>
+                               colorQuadIndex++;<br>
+<br>
+                               // wraparound<br>
+                               if (colorQuadIndex == COLORS_PER_TABLE)<br>
+                                       colorQuadIndex = 0;<br>
+                       } else<br>
+                               colorTableIndex = CQUAD * stream->readByte();<br>
+<br>
+                       while (numBlocks--) {<br>
+                               colorFlags = stream->readUint32BE();<br>
+<br>
+                               // flag mask actually acts as a bit shift count here<br>
+                               byte flagMask = 30;<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       for (byte x = 0; x < 4; x++) {<br>
+                                               pixel = colorTableIndex + ((colorFlags >> flagMask) & 0x03);<br>
+                                               flagMask -= 2;<br>
+                                               pixels[blockPtr++] = _colorQuads[pixel];<br>
+                                       }<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // 8-color block encoding<br>
+               case 0xC0:<br>
+               case 0xD0:<br>
+                       numBlocks = (opcode & 0x0F) + 1;<br>
+<br>
+                       // figure out which color octet to use to paint the 8-color block<br>
+                       if ((opcode & 0xF0) == 0xC0) {<br>
+                               // fetch the next 8 colors from bytestream and store in next<br>
+                               // available entry in the color octet table<br>
+                               for (byte i = 0; i < COCTET; i++) {<br>
+                                       pixel = stream->readByte();<br>
+                                       colorTableIndex = COCTET * colorOctetIndex + i;<br>
+                                       _colorOctets[colorTableIndex] = pixel;<br>
+                               }<br>
+<br>
+                               // this is the base index to use for this block<br>
+                               colorTableIndex = COCTET * colorOctetIndex;<br>
+                               colorOctetIndex++;<br>
+<br>
+                               // wraparound<br>
+                               if (colorOctetIndex == COLORS_PER_TABLE)<br>
+                                       colorOctetIndex = 0;<br>
+                       } else<br>
+                               colorTableIndex = COCTET * stream->readByte();<br>
+<br>
+                       while (numBlocks--) {<br>
+                               /*<br>
+                                 For this input of 6 hex bytes:<br>
+                                   01 23 45 67 89 AB<br>
+                                 Mangle it to this output:<br>
+                                   flags_a = xx012456, flags_b = xx89A37B<br>
+                               */<br>
+<br>
+                               // build the color flags<br>
+                               byte flagData[6];<br>
+                               stream->read(flagData, 6);<br>
+<br>
+                               colorFlagsA = ((READ_BE_UINT16(flagData) & 0xFFF0) << 8) | (READ_BE_UINT16(flagData + 2) >> 4);<br>
+                               colorFlagsB = ((READ_BE_UINT16(flagData + 4) & 0xFFF0) << 8) | ((flagData[1] & 0xF) << 8) |<br>
+                                                               ((flagData[3] & 0xF) << 4) | (flagData[5] & 0xf);<br>
+<br>
+                               colorFlags = colorFlagsA;<br>
+<br>
+                               // flag mask actually acts as a bit shift count here<br>
+                               byte flagMask = 21;<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       // reload flags at third row (iteration y == 2)<br>
+                                       if (y == 2) {<br>
+                                               colorFlags = colorFlagsB;<br>
+                                               flagMask = 21;<br>
+                                       }<br>
+<br>
+                                       for (byte x = 0; x < 4; x++) {<br>
+                                               pixel = colorTableIndex + ((colorFlags >> flagMask) & 0x07);<br>
+                                               flagMask -= 3;<br>
+                                               pixels[blockPtr++] = _colorOctets[pixel];<br>
+                                       }<br>
+<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               // 16-color block encoding (every pixel is a different color)<br>
+               case 0xE0:<br>
+                       numBlocks = (opcode & 0x0F) + 1;<br>
+<br>
+                       while (numBlocks--) {<br>
+                               blockPtr = rowPtr + pixelPtr;<br>
+                               for (byte y = 0; y < 4; y++) {<br>
+                                       for (byte x = 0; x < 4; x++)<br>
+                                               pixels[blockPtr++] = stream->readByte();<br>
+<br>
+                                       blockPtr += rowInc;<br>
+                               }<br>
+                               ADVANCE_BLOCK();<br>
+                       }<br>
+                       break;<br>
+<br>
+               case 0xF0:<br>
+                       warning("0xF0 opcode seen in SMC chunk (contact the developers)");<br>
+                       break;<br>
+               }<br>
+       }<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/smc.h b/image/codecs/smc.h<br>
new file mode 100644<br>
index 0000000..2de1f69<br>
--- /dev/null<br>
+++ b/image/codecs/smc.h<br>
@@ -0,0 +1,62 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_SMC_H<br>
+#define IMAGE_CODECS_SMC_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+enum {<br>
+       CPAIR = 2,<br>
+       CQUAD = 4,<br>
+       COCTET = 8,<br>
+       COLORS_PER_TABLE = 256<br>
+};<br>
+<br>
+/**<br>
+ * Apple SMC decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class SMCDecoder : public Codec {<br>
+public:<br>
+       SMCDecoder(uint16 width, uint16 height);<br>
+       ~SMCDecoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+<br>
+       // SMC color tables<br>
+       byte _colorPairs[COLORS_PER_TABLE * CPAIR];<br>
+       byte _colorQuads[COLORS_PER_TABLE * CQUAD];<br>
+       byte _colorOctets[COLORS_PER_TABLE * COCTET];<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/svq1.cpp b/image/codecs/svq1.cpp<br>
new file mode 100644<br>
index 0000000..550445b<br>
--- /dev/null<br>
+++ b/image/codecs/svq1.cpp<br>
@@ -0,0 +1,797 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// Sorenson Video 1 Codec<br>
+// Based off FFmpeg's SVQ1 decoder (written by Arpi and Nick Kurshev)<br>
+<br>
+#include "image/codecs/svq1.h"<br>
+#include "image/codecs/svq1_cb.h"<br>
+#include "image/codecs/svq1_vlc.h"<br>
+<br>
+#include "common/stream.h"<br>
+#include "common/bitstream.h"<br>
+#include "common/rect.h"<br>
+#include "common/system.h"<br>
+#include "common/debug.h"<br>
+#include "common/textconsole.h"<br>
+#include "common/huffman.h"<br>
+<br>
+#include "graphics/yuv_to_rgb.h"<br>
+<br>
+namespace Image {<br>
+<br>
+#define SVQ1_BLOCK_SKIP     0<br>
+#define SVQ1_BLOCK_INTER    1<br>
+#define SVQ1_BLOCK_INTER_4V 2<br>
+#define SVQ1_BLOCK_INTRA    3<br>
+<br>
+SVQ1Decoder::SVQ1Decoder(uint16 width, uint16 height) {<br>
+       debug(1, "SVQ1Decoder::SVQ1Decoder(width:%d, height:%d)", width, height);<br>
+       _width = width;<br>
+       _height = height;<br>
+       _frameWidth = _frameHeight = 0;<br>
+       _surface = 0;<br>
+<br>
+       _last[0] = 0;<br>
+       _last[1] = 0;<br>
+       _last[2] = 0;<br>
+<br>
+       // Setup Variable Length Code Tables<br>
+       _blockType = new Common::Huffman(0, 4, s_svq1BlockTypeCodes, s_svq1BlockTypeLengths);<br>
+<br>
+       for (int i = 0; i < 6; i++) {<br>
+               _intraMultistage[i] = new Common::Huffman(0, 8, s_svq1IntraMultistageCodes[i], s_svq1IntraMultistageLengths[i]);<br>
+               _interMultistage[i] = new Common::Huffman(0, 8, s_svq1InterMultistageCodes[i], s_svq1InterMultistageLengths[i]);<br>
+       }<br>
+<br>
+       _intraMean = new Common::Huffman(0, 256, s_svq1IntraMeanCodes, s_svq1IntraMeanLengths);<br>
+       _interMean = new Common::Huffman(0, 512, s_svq1InterMeanCodes, s_svq1InterMeanLengths);<br>
+       _motionComponent = new Common::Huffman(0, 33, s_svq1MotionComponentCodes, s_svq1MotionComponentLengths);<br>
+}<br>
+<br>
+SVQ1Decoder::~SVQ1Decoder() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+<br>
+       delete[] _last[0];<br>
+       delete[] _last[1];<br>
+       delete[] _last[2];<br>
+<br>
+       delete _blockType;<br>
+       delete _intraMean;<br>
+       delete _interMean;<br>
+       delete _motionComponent;<br>
+<br>
+       for (int i = 0; i < 6; i++) {<br>
+               delete _intraMultistage[i];<br>
+               delete _interMultistage[i];<br>
+       }<br>
+}<br>
+<br>
+#define ALIGN(x, a) (((x)+(a)-1)&~((a)-1))<br>
+<br>
+const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       debug(1, "SVQ1Decoder::decodeImage()");<br>
+<br>
+       Common::BitStream32BEMSB frameData(*stream);<br>
+<br>
+       uint32 frameCode = frameData.getBits(22);<br>
+       debug(1, " frameCode: %d", frameCode);<br>
+<br>
+       if ((frameCode & ~0x70) || !(frameCode & 0x60)) { // Invalid<br>
+               warning("Invalid Image at frameCode");<br>
+               return _surface;<br>
+       }<br>
+<br>
+       byte temporalReference = frameData.getBits(8);<br>
+       debug(1, " temporalReference: %d", temporalReference);<br>
+       static const char *const types[4] = { "I (Key)", "P (Delta from Previous)", "B (Delta from Next)", "Invalid" };<br>
+       byte frameType = frameData.getBits(2);<br>
+       debug(1, " frameType: %d = %s Frame", frameType, types[frameType]);<br>
+<br>
+       if (frameType == 0) { // I Frame<br>
+               // TODO: Validate checksum if present<br>
+               if (frameCode == 0x50 || frameCode == 0x60) {<br>
+                       uint32 checksum = frameData.getBits(16);<br>
+                       debug(1, " checksum:0x%02x", checksum);<br>
+                       // We're currently just ignoring the checksum<br>
+               }<br>
+<br>
+               if ((frameCode ^ 0x10) >= 0x50) {<br>
+                       // Skip embedded string<br>
+                       byte stringLen = frameData.getBits(8);<br>
+                       for (uint16 i = 0; i < stringLen-1; i++)<br>
+                               frameData.skip(8);<br>
+               }<br>
+<br>
+               frameData.skip(5); // Unknown<br>
+<br>
+               static const struct { uint w, h; } standardFrameSizes[7] = {<br>
+                       { 160, 120 }, // 0<br>
+                       { 128,  96 }, // 1<br>
+                       { 176, 144 }, // 2<br>
+                       { 352, 288 }, // 3<br>
+                       { 704, 576 }, // 4<br>
+                       { 240, 180 }, // 5<br>
+                       { 320, 240 }  // 6<br>
+               };<br>
+<br>
+               byte frameSizeCode = frameData.getBits(3);<br>
+               debug(1, " frameSizeCode: %d", frameSizeCode);<br>
+<br>
+               if (frameSizeCode == 7) {<br>
+                       _frameWidth = frameData.getBits(12);<br>
+                       _frameHeight = frameData.getBits(12);<br>
+               } else {<br>
+                       _frameWidth = standardFrameSizes[frameSizeCode].w;<br>
+                       _frameHeight = standardFrameSizes[frameSizeCode].h;<br>
+               }<br>
+<br>
+               debug(1, " frameWidth: %d", _frameWidth);<br>
+               debug(1, " frameHeight: %d", _frameHeight);<br>
+       } else if (frameType == 2) { // B Frame<br>
+               warning("B Frames not supported by SVQ1 decoder (yet)");<br>
+               return _surface;<br>
+       } else if (frameType == 3) { // Invalid<br>
+               warning("Invalid Frame Type");<br>
+               return _surface;<br>
+       }<br>
+<br>
+       bool checksumPresent = frameData.getBit() != 0;<br>
+       debug(1, " checksumPresent: %d", checksumPresent);<br>
+       if (checksumPresent) {<br>
+               bool usePacketChecksum = frameData.getBit() != 0;<br>
+               debug(1, " usePacketChecksum: %d", usePacketChecksum);<br>
+               bool componentChecksumsAfterImageData = frameData.getBit() != 0;<br>
+               debug(1, " componentChecksumsAfterImageData: %d", componentChecksumsAfterImageData);<br>
+               byte unk4 = frameData.getBits(2);<br>
+               debug(1, " unk4: %d", unk4);<br>
+               if (unk4 != 0)<br>
+                       warning("Invalid Frame Header in SVQ1 Frame Decode");<br>
+       }<br>
+<br>
+       // Some more unknown data<br>
+       bool unk5 = frameData.getBit() != 0;<br>
+       if (unk5) {<br>
+               frameData.skip(8);<br>
+<br>
+               while (frameData.getBit() != 0)<br>
+                       frameData.skip(8);<br>
+       }<br>
+<br>
+       uint yWidth = ALIGN(_frameWidth, 16);<br>
+       uint yHeight = ALIGN(_frameHeight, 16);<br>
+       uint uvWidth = ALIGN(yWidth / 4, 16);<br>
+       uint uvHeight = ALIGN(yHeight / 4, 16);<br>
+       uint uvPitch = uvWidth + 4; // we need at least one extra column and pitch must be divisible by 4<br>
+<br>
+       byte *current[3];<br>
+<br>
+       // Decode Y, U and V component planes<br>
+       for (int i = 0; i < 3; i++) {<br>
+               uint width, height, pitch;<br>
+               if (i == 0) {<br>
+                       width = yWidth;<br>
+                       height = yHeight;<br>
+                       pitch = width;<br>
+                       current[i] = new byte[width * height];<br>
+               } else {<br>
+                       width = uvWidth;<br>
+                       height = uvHeight;<br>
+                       pitch = uvPitch;<br>
+<br>
+                       // Add an extra row here. See below for more information.<br>
+                       current[i] = new byte[pitch * (height + 1)];<br>
+               }<br>
+<br>
+               if (frameType == 0) { // I Frame<br>
+                       // Keyframe (I)<br>
+                       byte *currentP = current[i];<br>
+                       for (uint16 y = 0; y < height; y += 16) {<br>
+                               for (uint16 x = 0; x < width; x += 16) {<br>
+                                       if (!svq1DecodeBlockIntra(&frameData, &currentP[x], pitch)) {<br>
+                                               warning("svq1DecodeBlockIntra decode failure");<br>
+                                               return _surface;<br>
+                                       }<br>
+                               }<br>
+                               currentP += 16 * pitch;<br>
+                       }<br>
+               } else {<br>
+                       // Delta frame (P or B)<br>
+<br>
+                       // Prediction Motion Vector<br>
+                       Common::Point *pmv = new Common::Point[(width / 8) + 3];<br>
+<br>
+                       byte *previous = 0;<br>
+                       if (frameType == 2) { // B Frame<br>
+                               error("SVQ1 Video: B Frames not supported");<br>
+                               //previous = _next[i];<br>
+                       } else {<br>
+                               previous = _last[i];<br>
+                       }<br>
+<br>
+                       byte *currentP = current[i];<br>
+                       for (uint16 y = 0; y < height; y += 16) {<br>
+                               for (uint16 x = 0; x < width; x += 16) {<br>
+                                       if (!svq1DecodeDeltaBlock(&frameData, &currentP[x], previous, pitch, pmv, x, y)) {<br>
+                                               warning("svq1DecodeDeltaBlock decode failure");<br>
+                                               return _surface;<br>
+                                       }<br>
+                               }<br>
+<br>
+                               pmv[0].x = pmv[0].y = 0;<br>
+<br>
+                               currentP += 16 * pitch;<br>
+                       }<br>
+<br>
+                       delete[] pmv;<br>
+               }<br>
+       }<br>
+<br>
+       // Now we'll create the surface<br>
+       if (!_surface) {<br>
+               _surface = new Graphics::Surface();<br>
+               _surface->create(yWidth, yHeight, g_system->getScreenFormat());<br>
+               _surface->w = _width;<br>
+               _surface->h = _height;<br>
+       }<br>
+<br>
+       // We need to massage the chrominance data a bit to be able to be used by the converter<br>
+       // Since the thing peeks at values one column and one row beyond the data, we need to fill it in<br>
+<br>
+       // First, fill in the column-after-last with the last column's value<br>
+       for (uint i = 0; i < uvHeight; i++) {<br>
+               current[1][i * uvPitch + uvWidth] = current[1][i * uvPitch + uvWidth - 1];<br>
+               current[2][i * uvPitch + uvWidth] = current[2][i * uvPitch + uvWidth - 1];<br>
+       }<br>
+<br>
+       // Then, copy the last row to the one after the last row<br>
+       memcpy(current[1] + uvHeight * uvPitch, current[1] + (uvHeight - 1) * uvPitch, uvWidth + 1);<br>
+       memcpy(current[2] + uvHeight * uvPitch, current[2] + (uvHeight - 1) * uvPitch, uvWidth + 1);<br>
+<br>
+       // Finally, actually do the conversion ;)<br>
+       YUVToRGBMan.convert410(_surface, Graphics::YUVToRGBManager::kScaleFull, current[0], current[1], current[2], yWidth, yHeight, yWidth, uvPitch);<br>
+<br>
+       // Store the current surfaces for later and free the old ones<br>
+       for (int i = 0; i < 3; i++) {<br>
+               delete[] _last[i];<br>
+               _last[i] = current[i];<br>
+       }<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+bool SVQ1Decoder::svq1DecodeBlockIntra(Common::BitStream *s, byte *pixels, int pitch) {<br>
+       // initialize list for breadth first processing of vectors<br>
+       byte *list[63];<br>
+       list[0] = pixels;<br>
+<br>
+       // recursively process vector<br>
+       for (int i = 0, m = 1, n = 1, level = 5; i < n; i++) {<br>
+               for (; level > 0; i++) {<br>
+                       // process next depth<br>
+                       if (i == m) {<br>
+                               m = n;<br>
+                               if (--level == 0)<br>
+                                       break;<br>
+                       }<br>
+<br>
+                       // divide block if next bit set<br>
+                       if (s->getBit() == 0)<br>
+                               break;<br>
+<br>
+                       // add child nodes<br>
+                       list[n++] = list[i];<br>
+                       list[n++] = list[i] + (((level & 1) ? pitch : 1) << ((level / 2) + 1));<br>
+               }<br>
+<br>
+               // destination address and vector size<br>
+               uint32 *dst = (uint32 *)list[i];<br>
+               uint width = 1 << ((level + 4) / 2);<br>
+               uint height = 1 << ((level + 3) / 2);<br>
+<br>
+               // get number of stages (-1 skips vector, 0 for mean only)<br>
+               int stages = _intraMultistage[level]->getSymbol(*s) - 1;<br>
+<br>
+               if (stages == -1) {<br>
+                       for (uint y = 0; y < height; y++)<br>
+                               memset(&dst[y * (pitch / 4)], 0, width);<br>
+<br>
+                       continue; // skip vector<br>
+               }<br>
+<br>
+               if (stages > 0 && level >= 4) {<br>
+                       warning("Error (svq1_decode_block_intra): invalid vector: stages = %d, level = %d", stages, level);<br>
+                       return false; // error - invalid vector<br>
+               }<br>
+<br>
+               int mean = _intraMean->getSymbol(*s);<br>
+<br>
+               if (stages == 0) {<br>
+                       for (uint y = 0; y < height; y++)<br>
+                               memset(&dst[y * (pitch / 4)], mean, width);<br>
+               } else {<br>
+                       const uint32 *codebook = (const uint32 *)s_svq1IntraCodebooks[level];<br>
+                       uint32 bitCache = s->getBits(stages * 4);<br>
+<br>
+                       // calculate codebook entries for this vector<br>
+                       int entries[6];<br>
+                       for (int j = 0; j < stages; j++)<br>
+                               entries[j] = (((bitCache >> ((stages - j - 1) * 4)) & 0xF) + j * 16) << (level + 1);<br>
+<br>
+                       mean -= stages * 128;<br>
+                       uint32 n4 = ((mean + (mean >> 31)) << 16) | (mean & 0xFFFF);<br>
+<br>
+                       for (uint y = 0; y < height; y++) {<br>
+                               for (uint x = 0; x < (width / 4); x++, codebook++) {<br>
+                                       uint32 n1 = n4;<br>
+                                       uint32 n2 = n4;<br>
+                                       uint32 n3;<br>
+<br>
+                                       // add codebook entries to vector<br>
+                                       for (int j = 0; j < stages; j++) {<br>
+                                               n3 = READ_UINT32(&codebook[entries[j]]) ^ 0x80808080;<br>
+                                               n1 += (n3 & 0xFF00FF00) >> 8;<br>
+                                               n2 += n3 & 0x00FF00FF;<br>
+                                       }<br>
+<br>
+                                       // clip to [0..255]<br>
+                                       if (n1 & 0xFF00FF00) {<br>
+                                               n3 = (((n1 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                               n1 += 0x7F007F00;<br>
+                                               n1 |= (((~n1 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                               n1 &= n3 & 0x00FF00FF;<br>
+                                       }<br>
+<br>
+                                       if (n2 & 0xFF00FF00) {<br>
+                                               n3 = (((n2 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                               n2 += 0x7F007F00;<br>
+                                               n2 |= (((~n2 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                               n2 &= n3 & 0x00FF00FF;<br>
+                                       }<br>
+<br>
+                                       // store result<br>
+                                       dst[x] = (n1 << 8) | n2;<br>
+                               }<br>
+<br>
+                               dst += pitch / 4;<br>
+                       }<br>
+               }<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+bool SVQ1Decoder::svq1DecodeBlockNonIntra(Common::BitStream *s, byte *pixels, int pitch) {<br>
+       // initialize list for breadth first processing of vectors<br>
+       byte *list[63];<br>
+       list[0] = pixels;<br>
+<br>
+       // recursively process vector<br>
+       for (int i = 0, m = 1, n = 1, level = 5; i < n; i++) {<br>
+               for (; level > 0; i++) {<br>
+                       // process next depth<br>
+                       if (i == m) {<br>
+                               m = n;<br>
+                               if (--level == 0)<br>
+                                       break;<br>
+                       }<br>
+<br>
+                       // divide block if next bit set<br>
+                       if (s->getBit() == 0)<br>
+                               break;<br>
+<br>
+                       // add child nodes<br>
+                       list[n++] = list[i];<br>
+                       list[n++] = list[i] + (((level & 1) ? pitch : 1) << ((level / 2) + 1));<br>
+               }<br>
+<br>
+               // destination address and vector size<br>
+               uint32 *dst = (uint32 *)list[i];<br>
+               int width = 1 << ((level + 4) / 2);<br>
+               int height = 1 << ((level + 3) /  2);<br>
+<br>
+               // get number of stages (-1 skips vector, 0 for mean only)<br>
+               int stages = _interMultistage[level]->getSymbol(*s) - 1;<br>
+<br>
+               if (stages == -1)<br>
+                       continue; // skip vector<br>
+<br>
+               if (stages > 0 && level >= 4) {<br>
+                       warning("Error (svq1_decode_block_non_intra): invalid vector: stages = %d, level = %d", stages, level);<br>
+                       return false; // error - invalid vector<br>
+               }<br>
+<br>
+               int mean = _interMean->getSymbol(*s) - 256;<br>
+               const uint32 *codebook = (const uint32 *)s_svq1InterCodebooks[level];<br>
+               uint32 bitCache = s->getBits(stages * 4);<br>
+<br>
+               // calculate codebook entries for this vector<br>
+               int entries[6];<br>
+               for (int j = 0; j < stages; j++)<br>
+                       entries[j] = (((bitCache >> ((stages - j - 1) * 4)) & 0xF) + j * 16) << (level + 1);<br>
+<br>
+               mean -= stages * 128;<br>
+               uint32 n4 = ((mean + (mean >> 31)) << 16) | (mean & 0xFFFF);<br>
+<br>
+               for (int y = 0; y < height; y++) {<br>
+                       for (int x = 0; x < (width / 4); x++, codebook++) {<br>
+                               uint32 n3 = dst[x];<br>
+<br>
+                               // add mean value to vector<br>
+                               uint32 n1 = ((n3 & 0xFF00FF00) >> 8) + n4;<br>
+                               uint32 n2 = (n3 & 0x00FF00FF) + n4;<br>
+<br>
+                               // add codebook entries to vector<br>
+                               for (int j = 0; j < stages; j++) {<br>
+                                       n3 = READ_UINT32(&codebook[entries[j]]) ^ 0x80808080;<br>
+                                       n1 += (n3 & 0xFF00FF00) >> 8;<br>
+                                       n2 += n3 & 0x00FF00FF;<br>
+                               }<br>
+<br>
+                               // clip to [0..255]<br>
+                               if (n1 & 0xFF00FF00) {<br>
+                                       n3 = ((( n1 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                       n1 += 0x7F007F00;<br>
+                                       n1 |= (((~n1 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                       n1 &= n3 & 0x00FF00FF;<br>
+                               }<br>
+<br>
+                               if (n2 & 0xFF00FF00) {<br>
+                                       n3  = ((( n2 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                       n2 += 0x7F007F00;<br>
+                                       n2 |= (((~n2 >> 15) & 0x00010001) | 0x01000100) - 0x00010001;<br>
+                                       n2 &= n3 & 0x00FF00FF;<br>
+                               }<br>
+<br>
+                               // store result<br>
+                               dst[x] = (n1 << 8) | n2;<br>
+                       }<br>
+<br>
+                       dst += pitch / 4;<br>
+               }<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+// median of 3<br>
+static inline int midPred(int a, int b, int c) {<br>
+       if (a > b) {<br>
+               if (c > b) {<br>
+                       if (c > a)<br>
+                               b = a;<br>
+                       else<br>
+                               b = c;<br>
+               }<br>
+       } else {<br>
+               if (b > c) {<br>
+                       if (c > a)<br>
+                               b = c;<br>
+                       else<br>
+                               b = a;<br>
+               }<br>
+       }<br>
+<br>
+       return b;<br>
+}<br>
+<br>
+bool SVQ1Decoder::svq1DecodeMotionVector(Common::BitStream *s, Common::Point *mv, Common::Point **pmv) {<br>
+       for (int i = 0; i < 2; i++) {<br>
+               // get motion code<br>
+               int diff = _motionComponent->getSymbol(*s);<br>
+               if (diff < 0)<br>
+                       return false; // error - invalid motion code<br>
+               else if (diff && s->getBit() != 0)<br>
+                       diff = -diff;<br>
+<br>
+               // add median of motion vector predictors and clip result<br>
+               if (i == 1)<br>
+                       mv->y = ((diff + midPred(pmv[0]->y, pmv[1]->y, pmv[2]->y)) << 26) >> 26;<br>
+               else<br>
+                       mv->x = ((diff + midPred(pmv[0]->x, pmv[1]->x, pmv[2]->x)) << 26) >> 26;<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+void SVQ1Decoder::svq1SkipBlock(byte *current, byte *previous, int pitch, int x, int y) {<br>
+       const byte *src = &previous[x + y * pitch];<br>
+       byte *dst = current;<br>
+<br>
+       for (int i = 0; i < 16; i++) {<br>
+               memcpy(dst, src, 16);<br>
+               src += pitch;<br>
+               dst += pitch;<br>
+       }<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels8C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       for (int i = 0; i < h; i++) {<br>
+               *((uint32 *)block) = READ_UINT32(pixels);<br>
+               *((uint32 *)(block + 4)) = READ_UINT32(pixels + 4);<br>
+               pixels += lineSize;<br>
+               block += lineSize;<br>
+       }<br>
+}<br>
+<br>
+static inline uint32 rndAvg32(uint32 a, uint32 b) {<br>
+       return (a | b) - (((a ^ b) & ~0x01010101) >> 1);<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels8L2(byte *dst, const byte *src1, const byte *src2,<br>
+               int dstStride, int srcStride1, int srcStride2, int h) {<br>
+       for (int i = 0; i < h; i++) {<br>
+               uint32 a = READ_UINT32(&src1[srcStride1 * i]);<br>
+               uint32 b = READ_UINT32(&src2[srcStride2 * i]);<br>
+               *((uint32 *)&dst[dstStride * i]) = rndAvg32(a, b);<br>
+               a = READ_UINT32(&src1[srcStride1 * i + 4]);<br>
+               b = READ_UINT32(&src2[srcStride2 * i + 4]);<br>
+               *((uint32 *)&dst[dstStride * i + 4]) = rndAvg32(a, b);<br>
+       }<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels8X2C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       putPixels8L2(block, pixels, pixels + 1, lineSize, lineSize, lineSize, h);<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels8Y2C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       putPixels8L2(block, pixels, pixels + lineSize, lineSize, lineSize, lineSize, h);<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels8XY2C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       for (int j = 0; j < 2; j++) {<br>
+               uint32 a = READ_UINT32(pixels);<br>
+               uint32 b = READ_UINT32(pixels + 1);<br>
+               uint32 l0 = (a & 0x03030303UL) + (b & 0x03030303UL) + 0x02020202UL;<br>
+               uint32 h0 = ((a & 0xFCFCFCFCUL) >> 2) + ((b & 0xFCFCFCFCUL) >> 2);<br>
+<br>
+               pixels += lineSize;<br>
+<br>
+               for (int i = 0; i < h; i += 2) {<br>
+                       a = READ_UINT32(pixels);<br>
+                       b = READ_UINT32(pixels + 1);<br>
+                       uint32 l1 = (a & 0x03030303UL) + (b & 0x03030303UL);<br>
+                       uint32 h1 = ((a & 0xFCFCFCFCUL) >> 2) + ((b & 0xFCFCFCFCUL) >> 2);<br>
+                       *((uint32 *)block) = h0 + h1 + (((l0 + l1) >> 2) & 0x0F0F0F0FUL);<br>
+                       pixels += lineSize;<br>
+                       block += lineSize;<br>
+                       a = READ_UINT32(pixels);<br>
+                       b = READ_UINT32(pixels + 1);<br>
+                       l0 = (a & 0x03030303UL) + (b & 0x03030303UL) + 0x02020202UL;<br>
+                       h0 = ((a & 0xFCFCFCFCUL) >> 2) + ((b & 0xFCFCFCFCUL) >> 2);<br>
+                       *((uint32 *)block) = h0 + h1 + (((l0 + l1) >> 2) & 0x0F0F0F0FUL);<br>
+                       pixels += lineSize;<br>
+                       block += lineSize;<br>
+               }<br>
+<br>
+               pixels += 4 - lineSize * (h + 1);<br>
+               block += 4 - lineSize * h;<br>
+       }<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels16C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       putPixels8C(block, pixels, lineSize, h);<br>
+       putPixels8C(block + 8, pixels + 8, lineSize, h);<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels16X2C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       putPixels8X2C(block, pixels, lineSize, h);<br>
+       putPixels8X2C(block + 8, pixels + 8, lineSize, h);<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels16Y2C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       putPixels8Y2C(block, pixels, lineSize, h);<br>
+       putPixels8Y2C(block + 8, pixels + 8, lineSize, h);<br>
+}<br>
+<br>
+void SVQ1Decoder::putPixels16XY2C(byte *block, const byte *pixels, int lineSize, int h) {<br>
+       putPixels8XY2C(block, pixels, lineSize, h);<br>
+       putPixels8XY2C(block + 8, pixels + 8, lineSize, h);<br>
+}<br>
+<br>
+bool SVQ1Decoder::svq1MotionInterBlock(Common::BitStream *ss, byte *current, byte *previous, int pitch,<br>
+               Common::Point *motion, int x, int y) {<br>
+<br>
+       // predict and decode motion vector<br>
+       Common::Point *pmv[3];<br>
+       pmv[0] = &motion[0];<br>
+       if (y == 0) {<br>
+               pmv[1] = pmv[2] = pmv[0];<br>
+       } else {<br>
+               pmv[1] = &motion[(x / 8) + 2];<br>
+               pmv[2] = &motion[(x / 8) + 4];<br>
+       }<br>
+<br>
+       Common::Point mv;<br>
+       bool resultValid = svq1DecodeMotionVector(ss, &mv, pmv);<br>
+       if (!resultValid)<br>
+               return false;<br>
+<br>
+       motion[0].x = motion[(x / 8) + 2].x = motion[(x / 8) + 3].x = mv.x;<br>
+       motion[0].y = motion[(x / 8) + 2].y = motion[(x / 8) + 3].y = mv.y;<br>
+<br>
+       if (y + (mv.y >> 1) < 0)<br>
+               mv.y = 0;<br>
+<br>
+       if (x + (mv.x >> 1) < 0)<br>
+               mv.x = 0;<br>
+<br>
+       const byte *src = &previous[(x + (mv.x >> 1)) + (y + (mv.y >> 1)) * pitch];<br>
+       byte *dst = current;<br>
+<br>
+       // Halfpel motion compensation with rounding (a + b + 1) >> 1.<br>
+       // 4 motion compensation functions for the 4 halfpel positions<br>
+       // for 16x16 blocks<br>
+       switch(((mv.y & 1) << 1) + (mv.x & 1)) {<br>
+       case 0:<br>
+               putPixels16C(dst, src, pitch, 16);<br>
+               break;<br>
+       case 1:<br>
+               putPixels16X2C(dst, src, pitch, 16);<br>
+               break;<br>
+       case 2:<br>
+               putPixels16Y2C(dst, src, pitch, 16);<br>
+               break;<br>
+       case 3:<br>
+               putPixels16XY2C(dst, src, pitch, 16);<br>
+               break;<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+bool SVQ1Decoder::svq1MotionInter4vBlock(Common::BitStream *ss, byte *current, byte *previous, int pitch,<br>
+               Common::Point *motion, int x, int y) {<br>
+       // predict and decode motion vector (0)<br>
+       Common::Point *pmv[4];<br>
+       pmv[0] = &motion[0];<br>
+       if (y == 0) {<br>
+               pmv[1] = pmv[2] = pmv[0];<br>
+       } else {<br>
+               pmv[1] = &motion[(x / 8) + 2];<br>
+               pmv[2] = &motion[(x / 8) + 4];<br>
+       }<br>
+<br>
+       Common::Point mv;<br>
+       bool resultValid = svq1DecodeMotionVector(ss, &mv, pmv);<br>
+       if (!resultValid)<br>
+               return false;<br>
+<br>
+       // predict and decode motion vector (1)<br>
+       pmv[0] = &mv;<br>
+       if (y == 0)<br>
+               pmv[1] = pmv[2] = pmv[0];<br>
+       else<br>
+               pmv[1] = &motion[(x / 8) + 3];<br>
+<br>
+       resultValid = svq1DecodeMotionVector(ss, &motion[0], pmv);<br>
+       if (!resultValid)<br>
+               return false;<br>
+<br>
+       // predict and decode motion vector (2)<br>
+       pmv[1] = &motion[0];<br>
+       pmv[2] = &motion[(x / 8) + 1];<br>
+<br>
+       resultValid = svq1DecodeMotionVector(ss, &motion[(x / 8) + 2], pmv);<br>
+       if (!resultValid)<br>
+               return false;<br>
+<br>
+       // predict and decode motion vector (3)<br>
+       pmv[2] = &motion[(x / 8) + 2];<br>
+       pmv[3] = &motion[(x / 8) + 3];<br>
+<br>
+       resultValid = svq1DecodeMotionVector(ss, pmv[3], pmv);<br>
+       if (!resultValid)<br>
+               return false;<br>
+<br>
+       // form predictions<br>
+       for (int i = 0; i < 4; i++) {<br>
+               int mvx = pmv[i]->x + (i & 1) * 16;<br>
+               int mvy = pmv[i]->y + (i >> 1) * 16;<br>
+<br>
+               // FIXME: clipping or padding?<br>
+               if (y + (mvy >> 1) < 0)<br>
+                       mvy = 0;<br>
+<br>
+               if (x + (mvx >> 1) < 0)<br>
+                       mvx = 0;<br>
+<br>
+               const byte *src = &previous[(x + (mvx >> 1)) + (y + (mvy >> 1)) * pitch];<br>
+               byte *dst = current;<br>
+<br>
+               // Halfpel motion compensation with rounding (a + b + 1) >> 1.<br>
+               // 4 motion compensation functions for the 4 halfpel positions<br>
+               // for 8x8 blocks<br>
+               switch(((mvy & 1) << 1) + (mvx & 1)) {<br>
+               case 0:<br>
+                       putPixels8C(dst, src, pitch, 8);<br>
+                       break;<br>
+               case 1:<br>
+                       putPixels8X2C(dst, src, pitch, 8);<br>
+                       break;<br>
+               case 2:<br>
+                       putPixels8Y2C(dst, src, pitch, 8);<br>
+                       break;<br>
+               case 3:<br>
+                       putPixels8XY2C(dst, src, pitch, 8);<br>
+                       break;<br>
+               }<br>
+<br>
+               // select next block<br>
+               if (i & 1)<br>
+                       current += (pitch - 1) * 8;<br>
+               else<br>
+                       current += 8;<br>
+       }<br>
+<br>
+       return true;<br>
+}<br>
+<br>
+bool SVQ1Decoder::svq1DecodeDeltaBlock(Common::BitStream *ss, byte *current, byte *previous, int pitch,<br>
+               Common::Point *motion, int x, int y) {<br>
+       // get block type<br>
+       uint32 blockType = _blockType->getSymbol(*ss);<br>
+<br>
+       // reset motion vectors<br>
+       if (blockType == SVQ1_BLOCK_SKIP || blockType == SVQ1_BLOCK_INTRA) {<br>
+               motion[0].x =<br>
+               motion[0].y =<br>
+               motion[(x / 8) + 2].x =<br>
+               motion[(x / 8) + 2].y =<br>
+               motion[(x / 8) + 3].x =<br>
+               motion[(x / 8) + 3].y = 0;<br>
+       }<br>
+<br>
+       bool resultValid = true;<br>
+<br>
+       switch (blockType) {<br>
+       case SVQ1_BLOCK_SKIP:<br>
+               svq1SkipBlock(current, previous, pitch, x, y);<br>
+               break;<br>
+       case SVQ1_BLOCK_INTER:<br>
+               resultValid = svq1MotionInterBlock(ss, current, previous, pitch, motion, x, y);<br>
+               if (!resultValid) {<br>
+                       warning("svq1MotionInterBlock decode failure");<br>
+                       break;<br>
+               }<br>
+               resultValid = svq1DecodeBlockNonIntra(ss, current, pitch);<br>
+               break;<br>
+       case SVQ1_BLOCK_INTER_4V:<br>
+               resultValid = svq1MotionInter4vBlock(ss, current, previous, pitch, motion, x, y);<br>
+               if (!resultValid) {<br>
+                       warning("svq1MotionInter4vBlock decode failure");<br>
+                       break;<br>
+               }<br>
+               resultValid = svq1DecodeBlockNonIntra(ss, current, pitch);<br>
+               break;<br>
+       case SVQ1_BLOCK_INTRA:<br>
+               resultValid = svq1DecodeBlockIntra(ss, current, pitch);<br>
+               break;<br>
+       }<br>
+<br>
+       return resultValid;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/svq1.h b/image/codecs/svq1.h<br>
new file mode 100644<br>
index 0000000..56310a1<br>
--- /dev/null<br>
+++ b/image/codecs/svq1.h<br>
@@ -0,0 +1,88 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_SVQ1_H<br>
+#define IMAGE_CODECS_SVQ1_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Common {<br>
+class BitStream;<br>
+class Huffman;<br>
+struct Point;<br>
+}<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Sorenson Vector Quantizer 1 decoder.<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
+ */<br>
+class SVQ1Decoder : public Codec {<br>
+public:<br>
+       SVQ1Decoder(uint16 width, uint16 height);<br>
+       ~SVQ1Decoder();<br>
+<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const { return _surface->format; }<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+       uint16 _width, _height;<br>
+       uint16 _frameWidth, _frameHeight;<br>
+<br>
+       byte *_last[3];<br>
+<br>
+       Common::Huffman *_blockType;<br>
+       Common::Huffman *_intraMultistage[6];<br>
+       Common::Huffman *_interMultistage[6];<br>
+       Common::Huffman *_intraMean;<br>
+       Common::Huffman *_interMean;<br>
+       Common::Huffman *_motionComponent;<br>
+<br>
+       bool svq1DecodeBlockIntra(Common::BitStream *s, byte *pixels, int pitch);<br>
+       bool svq1DecodeBlockNonIntra(Common::BitStream *s, byte *pixels, int pitch);<br>
+       bool svq1DecodeMotionVector(Common::BitStream *s, Common::Point *mv, Common::Point **pmv);<br>
+       void svq1SkipBlock(byte *current, byte *previous, int pitch, int x, int y);<br>
+       bool svq1MotionInterBlock(Common::BitStream *ss, byte *current, byte *previous, int pitch,<br>
+                       Common::Point *motion, int x, int y);<br>
+       bool svq1MotionInter4vBlock(Common::BitStream *ss, byte *current, byte *previous, int pitch,<br>
+                       Common::Point *motion, int x, int y);<br>
+       bool svq1DecodeDeltaBlock(Common::BitStream *ss, byte *current, byte *previous, int pitch,<br>
+                       Common::Point *motion, int x, int y);<br>
+<br>
+       void putPixels8C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels8L2(byte *dst, const byte *src1, const byte *src2, int dstStride, int srcStride1, int srcStride2, int h);<br>
+       void putPixels8X2C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels8Y2C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels8XY2C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels16C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels16X2C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels16Y2C(byte *block, const byte *pixels, int lineSize, int h);<br>
+       void putPixels16XY2C(byte *block, const byte *pixels, int lineSize, int h);<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/svq1_cb.h b/image/codecs/svq1_cb.h<br>
new file mode 100644<br>
index 0000000..27408a7<br>
--- /dev/null<br>
+++ b/image/codecs/svq1_cb.h<br>
@@ -0,0 +1,1511 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// These tables are modified from their FFmpeg counterparts so that<br>
+// they work on both little and big endian systems.<br>
+<br>
+#ifndef IMAGE_CODECS_SVQ1_CB_H<br>
+#define IMAGE_CODECS_SVQ1_CB_H<br>
+<br>
+#include "common/scummsys.h"<br>
+<br>
+namespace Image {<br>
+<br>
+static const int8 s_svq1InterCodebook4x2[768] = {<br>
+    7,  2, -6, -7,  7,  3, -3, -4, -7, -2,  7,  8, -8, -4,  3,  4,<br>
+   19, 17,  9,  3,-14,-16,-12, -8,-18,-16, -8, -3, 11, 14, 12,  8,<br>
+    7,-16,-10, 20,  7,-17,-10, 20, -6, 18,  8,-21, -7, 18,  9,-20,<br>
+   25,  3,-20,-14, 29,  7,-18,-13,-29, -4, 21, 14,-31, -6, 20, 14,<br>
+  -19,-26,-28,-24, 31, 32, 22, 10, 15, 24, 31, 28,-32,-32,-22,-13,<br>
+    2, -8,-23,-26, -9,  3, 27, 35,  3, 11, 21, 21,  8, -4,-27,-34,<br>
+  -30,-31, 12, 47,-29,-30, 13, 47, 38, 30,-17,-46, 34, 26,-19,-46,<br>
+  -42,-50,-51,-43, 34, 48, 55, 48, 48, 54, 51, 42,-44,-52,-53,-47,<br>
+    4,  5,  0, -6, -2, -2,  0,  1,-11, -6, -1, -2,  1,  8,  9,  1,<br>
+    0,  1, -6,  5,  8,  1,-12,  2,  7,-14, -7,  8,  5, -8,  0,  8,<br>
+    1,  4, 11,  8,-12, -8,  0, -5, -1,  1,  0,  4,-15, -8,  3, 16,<br>
+   17,  8, -4, -6,  9, -4,-13, -8,  2,  6,  1,-18, -1, 11, 11,-12,<br>
+    6,  0,  2,  0, 14,  6, -7,-21,  1, -1,-13,-20,  1,  1, 10, 21,<br>
+  -22, -5,  7, 13,-11, -1,  4, 12, -7,  0, 14, 19, -4,  3, -5,-19,<br>
+  -26,-14, 10, 15, 18,  4, -6, -2, 25, 19, -5,-18,-20, -7,  4,  2,<br>
+  -13, -6, -1, -4, 25, 37, -2,-35,  5,  4,  1,  1,-21,-36,  2, 43,<br>
+    2, -2, -1,  3,  8, -2, -6, -1, -2, -3,  2, 12, -5, -2, -2, -1,<br>
+   -3, -1, -1, -5, -1,  7,  8, -2,  2,  7,  5, -3,  1,  1, -3, -8,<br>
+   -3, -1, -3, -2, -2, -3,  2, 13, 15,  0,-11, -6,  3,  0,  0,  0,<br>
+   -6, -9, -5, -4, 18,  4,  1,  3, 12,  3,  0,  4,-16, -3,  3, -3,<br>
+  -17,  3, 18,  2, -1, -3, -1, -1, -6, 16, -8,  0, -9, 14, -7,  0,<br>
+    3,-13, 14, -5,  3,-13, 14, -4, -7, 20, 14,-23,  8, -7, -8,  4,<br>
+    8,-15,-19, 16,-10, 13, 11, -3,  9, -1,  1, 26,  5,-15,-27,  2,<br>
+  -20,  7, 16, -4,-40,  9, 31,  1, 26,-12,-30, -7, 40, -2,-19,  4,<br>
+    6,  0,  0,  0, -6, -2,  1,  2,  0, -1,  0, -6,  9,  0, -2, -1,<br>
+   -7,  8,  2, -3, -1,  2, -3,  2,  7, -4, -2,  4,  2,  0,  0, -6,<br>
+   -3, -2,  9,  2, -2, -1,  0, -4, -3, -3,  0, -3, -6,  2, 10,  4,<br>
+    3,  0,-10,  8,  0,  0, -4,  4, -1,  1,  4,  2,  3, -7, -9,  7,<br>
+    2,  1, -9, -4, -1, 12,  0,  0,  3, -1,  7, -4,  3,-14,  4,  2,<br>
+  -12, -9,  1, 11,  2,  5,  1,  0,  3,  1,  0,  2,  0,  8,  6,-19,<br>
+   -6,-10, -7, -4,  9,  7,  5,  7,  6, 21,  3, -3,-11, -9, -5, -2,<br>
+   -4, -9,-16, -1, -2, -5,  1, 36,  8, 11, 19,  0,  2,  5, -4,-41,<br>
+   -1, -1, -2, -1, -2, -2,  1,  6,  0,  4,  1, -8,  1,  1,  1,  0,<br>
+   -2, -3,  4,  0,  2, -1,  3, -3,  1,  3, -4,  1, -1,  3,  0, -5,<br>
+    3,  4,  2,  3, -2, -3, -6, -1, -2, -3, -2,  2, -4,  8,  1,  0,<br>
+   -7,  4,  2,  6, -7, -1,  1,  0, -2,  2, -4,  1,  8, -6,  2, -1,<br>
+   -6,  2,  0,  2,  5,  4, -8, -1, -1,-11,  0,  9,  0, -2,  2,  2,<br>
+   17, -5, -4, -1, -1, -4, -2, -2,  0,-13,  9, -3, -1, 12, -7,  2,<br>
+    0, -2, -5,  2, -7, -5, 20, -3,  7,  7, -1,-30,  3,  5,  8,  1,<br>
+   -6,  3, -1, -4,  2, -2,-11, 18,  0, -7,  3, 14, 20, -3,-18, -9,<br>
+    7, -2,  0, -1, -2,  0,  0, -1, -4, -1,  1,  0, -2,  2,  0,  4,<br>
+    1, -3,  2,  1,  3,  1, -5,  1, -3,  0, -1, -2,  7,  1,  0, -3,<br>
+    2,  5,  0, -2,  2, -5, -1,  1, -1, -2,  4, -1,  0, -3,  5,  0,<br>
+    0,  3, -1, -2, -4,  1,  5, -1, -1,  0, -1,  9, -1, -2, -1, -1,<br>
+   -2,  5,  5, -1, -2,  2, -3, -2,  1,  2,-11,  1,  2,  1,  3,  2,<br>
+    2,-10, -1, -2,  4,  2,  4,  1,  4,  5, -5,  1,  0,  6,-11,  1,<br>
+    1,  0,  6,  6,  0,  2,  1,-15,  7,  3,  5,  9,-30,  2,  2,  2,<br>
+  -34,  1,  9,  2,  5,  8,  8,  2,  7,  2,  6,  6,  2,-27,  1,  4<br>
+};<br>
+<br>
+static const int8 s_svq1InterCodebook4x4[1536] = {<br>
+    4,  0, -6, -7, -4, -8,-13, -9, -8, -8, -1,  6, -2,  5, 22, 27,<br>
+  -16, -7, 11, 10,-18, -7, 13, 10,-15, -4, 12,  8, -9, -1,  9,  5,<br>
+   -2,  2, 15,-16, -3,  2, 19,-19, -3,  2, 19,-19, -2,  3, 15,-14,<br>
+   17, 22, 22, 16, -6, -7, -5, -2,-12,-16,-16,-12,  1,  1, -1, -3,<br>
+   11,-17,  0,  8, 14,-21, -1,  9, 14,-21, -2,  8, 11,-16, -2,  6,<br>
+    7, -2,-16, 11,  9, -2,-21, 14, 10, -1,-22, 14,  8, -1,-18, 10,<br>
+  -10, 16,  3, -9,-13, 20,  4,-11,-14, 21,  4,-10,-11, 16,  3, -8,<br>
+   11,  4, -9, -9, 15,  6,-12,-14, 17,  8,-12,-14, 16, 10, -7,-11,<br>
+    4, 10, 14, 13, -1,  7, 15, 16,-12, -7,  3,  8,-20,-23,-18,-10,<br>
+  -10,-18,-26,-25,  4,  1, -6,-11, 13, 15, 11,  3, 12, 15, 13,  8,<br>
+  -16,-19,-16,-11,  7, 12, 15, 11, 11, 16, 16, 11, -6, -9,-11,-10,<br>
+   18, 19, 12,  5, 18, 16,  5, -4,  6,  0,-10,-15, -9,-17,-23,-22,<br>
+  -10,-14, -1, 21,-11,-17,  0, 29,-11,-16,  1, 30,-10,-14,  0, 23,<br>
+  -16,-17,-12, -6,-19,-19,-14, -7, -3, -1,  1,  2, 27, 35, 29, 19,<br>
+  -37, -8, 23, 23,-42, -9, 28, 29,-43,-10, 26, 28,-38,-11, 19, 22,<br>
+   32, 16,-16,-33, 39, 20,-18,-37, 38, 19,-19,-38, 32, 15,-17,-34,<br>
+   24,  9, -6, -4, -1,-10, -6,  3, -8, -9, -1,  3,  3,  7,  2, -6,<br>
+   -1, -3, -1,  0, -1,  4,  2, -7, -3, 11,  3,-16,  1, 20,  9,-18,<br>
+   -3, -8,  6, 12, -5,-10,  7, 13, -6, -9,  5,  7, -5, -5,  2, -1,<br>
+   -8, 12, -3, -1,-10, 15, -3,  1,-11, 13, -4,  1,-11,  8, -3,  2,<br>
+    9,  6, -5,-12,  3,  0, -8,-13, -4, -4, -1, -1, -4,  1, 15, 18,<br>
+    9, 13, 14, 12,  4,  3, -1, -2, -2, -5, -8, -5, -7,-11, -9, -4,<br>
+    7, -5, -7, -4, 14, -2, -7, -4, 17,  0, -8, -5, 15,  1, -7, -5,<br>
+  -10, -1,  6,  4,-15, -9,  2,  4,  2, -1, -3,  0, 25, 13, -8,-10,<br>
+    7, 11, -3,-16,  7, 11, -3,-15,  6,  7, -2, -9,  4,  2, -3, -5,<br>
+   -7, -1, -1,  0, -9, -2,  2,  6,-12, -4,  6, 14,-13, -6,  8, 19,<br>
+  -18,-18,-11, -5, -3,  0,  3,  4,  6,  8,  6,  6,  6,  6,  6,  6,<br>
+   -5,  3, 13,-10, -6,  1, 15, -9, -6, -3, 15, -6, -6, -6, 10, -3,<br>
+    9,  1, -9, -9, 11,  9,  6,  5,  0,  3,  8,  7,-15,-14, -6, -5,<br>
+  -11, -6, 11, 19, -2, -5, -9, -8,  6,  2, -9,-10,  6,  5,  4,  5,<br>
+   -7, -3,  8, 15, -1,  3, 10, 15,  5,  5, -1, -2,  4, -2,-21,-25,<br>
+    6, -6, -6,  5,  8, -9, -7,  9,  8,-12, -7, 13,  4,-14, -7, 14,<br>
+   -4, -3,  1,  1, -3, -5, -2, -3,  7,  0, -2, -4, 20,  7, -4, -4,<br>
+   -3,-20, -6, 10,  6,  0,  0,  1,  5,  8,  5, -1, -3,  0,  0, -2,<br>
+   13,  6, -1,  2,  5,  3,  2,  3, -3,  0,  3,  0,-16, -8, -2, -5,<br>
+   -2, -7, -6,  0, -3, -6, -3,  1, -5, -1,  2, -1, -1, 12, 16,  5,<br>
+   -7,  1,  9,  8,-10, -2,  5,  3, -6,  2,  7,  3, -4,  0, -1, -7,<br>
+    3,  4, -9,-24,  0,  2,  6,  3, -1, -1,  4,  7,  5,  3, -1, -2,<br>
+    3,  6, -9,  2,  1,  6,-13,  1,  1,  8,-10,  2,  1,  8, -7,  1,<br>
+   -3, -3,  2, 22, -2, -3, -5, 12, -2, -3,-10,  2, -3, -1, -4,  2,<br>
+   11, 12,  8,  2, -5, -5, -5, -8, -6, -4,  0, -3, -2, -1,  3,  3,<br>
+   12, -6, -2, -1, 12, -8, -2, -2,  9, -7,  0, -3,  4, -6,  2, -2,<br>
+  -19,  1, 12, -3, -4,  4,  5, -4,  6,  1, -2, -1,  4, -4, -2,  7,<br>
+   -3, -4, -7, -8, -4, -4, -2,  0, -1,  2, 14, 16, -4, -2,  4,  4,<br>
+   -1,  7,  2, -5, -2,  0, -1,  1,  4, -3, -1, 13,  6,-12,-14,  8,<br>
+   -1,  5,  4, -5, -2,  5,  3, -9, -2,  7,  4,-12, -1,  7,  4, -9,<br>
+   -6, -3,  1,  1, 11, 11,  0, -6,  6,  4, -2, -7,-12,-10,  3, 10,<br>
+   -2, -3, -3, -2,  6, 11, 14, 10, -9,-11,-10,-10,  2,  2,  3,  2,<br>
+   -7, -5, -7, -1, -1,  2,  0,  7, -1,  1,  0,  9,  3,  4, -5, -1,<br>
+   10, -1,-15, -1,  4,  1, -5,  2, -3,  1, -1,  1, -3,  1,  4,  4,<br>
+    2, -1,  4, 10,  6,  2, -1,  0,  2,  2, -7,-12, -4,  2,  0, -3,<br>
+   -1, -4, -1, -8,  3, -1,  2, -9,  4,  0,  5, -5,  2,  0,  8,  3,<br>
+    3,  2,  1,  1,  4, -2,  0,  3,  2, -1,  4,  1,  0,  6, -1,-25,<br>
+   -1, -2, -2, -4, -3,  0, -1, -4, -1, -1, -4,  2,  0, -6,  2, 25,<br>
+  -11, -1,  5,  0,  7,  0, -2,  2, 10, -1, -3,  4, -5, -5, -2, -1,<br>
+    0,  6,  3, -1, -2, -1, -1,  1, -1, -7,-12, -5,  8,  6,  2,  4,<br>
+    2,  6, -1, -6,  9, 10, -1, -4,  1,  0, -4,  0,  3, -2, -9, -5,<br>
+   -4,  3,  4,  0, -4,  3,  3,  0,-11,  0,  3,  2,-11,  3,  7,  2,<br>
+    2, -4,  7,  3,  1, -8,  7,  1, -1,-12,  4,  1,  3, -9,  2,  2,<br>
+    2, -2, -2,  9,-17, -3,  3,  1, -4,  7,  1, -6,  5,  4, -1,  3,<br>
+   -1,  2,  0, -4, -7,  8, 12, -1, -2,  5,  4, -5,  3, -5, -8, -2,<br>
+    0,  0, -5, -2, -2, -8,  3, 27, -1, -4, -3,  6, -3,  1, -2, -7,<br>
+    4,  4,  1, -1, -7,-10, -7, -3, 10, 10,  5,  3, -2, -2, -4, -3,<br>
+    0,  1,  5,  7,  4, -2,-16,-20,  0,  4,  7,  8,  2,  0, -2, -1,<br>
+   -2,  1,  3, 17, -3,  1, -2, -1, -1, -2, -1, -2, -1, -5, -1,  0,<br>
+    5, -3,  1,  0,  6, -2,  0,  0, -1, -2,  0, -3,-11,  1,  8, -1,<br>
+    3,  0,  0,  0,  0,  2,  4,  1,  2,  0,  6,  1, -2,-18, -3,  2,<br>
+  -14,  0,  6,  1, -5, -2, -1,  1, -1,  1,  0,  1,  1,  7,  4,  0,<br>
+   -1,  0,  1, -4,  1,  8,  3, -4, -3,  4,  1,  3, -6,  1, -4,  1,<br>
+    1,-12,  3,  3, -1,-10,  0, -1,  2,  0,  2,  1,  3,  2,  2,  4,<br>
+    3,  0,  0,  3,  2,  0, -2,  1,  5,  2, -5,  0,  6, -1,-14, -1,<br>
+   -2, -6, -3, -3,  2, -1,  4,  5,  6, -1, -2,  0,  4,  4, -1, -5,<br>
+   -4,  1,-11,  0, -1,  2, -4,  1,  2, -3,  3, -1,  1, -2, 15,  0,<br>
+    1, -1,  0, -2,  1, -4, -7,  1, -2, -6, -1, 21, -2,  2, -1,  1,<br>
+   21, -1, -2,  0, -1, -3,  1, -2, -9, -2,  2, -1,  2,  1, -4, -1,<br>
+    1,  8,  2, -6,-10, -1,  4,  0, -4, -3,  3,  3,  5,  0, -1, -1,<br>
+    3,  2,  1, -2, -2, -2,  4,  3,  5,  2, -4,-17,  0, -2,  4,  3,<br>
+   -7, -4,  0,  3,  9,  9,  2, -1,-11, -6,  0, -1,  5,  1,  0,  1,<br>
+    0, 17,  5,-11,  3, -2, -6,  0,  2, -2, -4,  1, -4,  1,  2, -1,<br>
+   -5, -1, -5, -3, -3,  5, -3, -2,  4, 16,  2, -5, -2,  5, -1, -1,<br>
+    0,  0, -4,  1, -1,  2,  5, 11, -1, -1, -2,  1, -4, -2, -3, -1,<br>
+   -5, -1, 10,  0,  6,  1,  0, -3,  0, -4,  1,  0, -2, -4,  3, -1,<br>
+    6,  9,  3,  0, -2,  1, -2,  0, -2, -3, -2, -2,  1,  0,  1, -6,<br>
+    1,  0,  2,  1, -1,  3, -2,  1,  0, -1,-15,  0, -1,  5,  2,  6,<br>
+    2,  0,  2,  2,  0,-12, -4,  6,  0,  1,  4, -1,  1,  2,  1, -4,<br>
+    1, -2, -7,  0,  0,  0,  0, -1, -5,  2, 11,  3,  1,  3,  0, -6,<br>
+    0, -3, -9, -4,  1,  3, -1,  0,  4,  1, -2,  0,  7, -3, -1,  6,<br>
+    1, -2,  6,  2,  0, -1,  3, -2, -2,  4,  0,  2, -1,  2,-14,  2,<br>
+    2,  2,  0, -1, -2,  3, -3,-14,  0,  2,  3, -3,  5,  1,  3,  2,<br>
+    1, -3,  4,-14,  1, -2, 11, -1,  0, -1,  3,  0, -1,  1,  0,  2,<br>
+   -2,  3, -3,  2, -4, -1, -4,  3, -1,  2,  1,  3, -6, -2,  2,  7,<br>
+   -2,  1,  2,  0, -2,  0,  0, -1, 12,  5, -1,  2, -8, -1,  1, -7,<br>
+    2, -2, -4,  2, 11,  0,-11, -2,  3,  1, -3, -1,  0,  3,  1, -1,<br>
+    0,  3,  0, -2,  0, -6, -1, -3, 12, -7, -2,  0,  7, -2,  1,  1,<br>
+    1,  2,  2,  2, -1,  2,  0,  2,-23,  0,  4,  0,  3,  2,  1,  3,<br>
+   -4, -5, -1,  5, -3,  5, 10, -1,  0,  0,  3, -4,  1, -1,  2, -5<br>
+};<br>
+<br>
+static const int8 s_svq1InterCodebook8x4[3072] = {<br>
+    9,  8,  4,  0, -3, -4, -4, -3,  9,  8,  4, -1, -4, -5, -5, -3,<br>
+    8,  7,  3, -2, -5, -5, -5, -4,  6,  4,  1, -2, -4, -5, -4, -3,<br>
+  -12,-14,-11, -4,  1,  5,  6,  6, -8,-10, -7, -5, -2,  1,  1,  1,<br>
+    5,  4,  3,  1,  0,  0, -1, -1, 13, 13,  9,  6,  3,  0, -1, -2,<br>
+   -4, -4, -3, -1,  1,  4,  8, 11, -5, -6, -4, -2,  0,  3,  8, 12,<br>
+   -7, -7, -6, -4, -2,  2,  7, 10, -7, -7, -5, -4, -2,  1,  5,  8,<br>
+   -3, -2, -1,  1,  3,  6,  7,  6,  2,  3,  5,  7,  8,  8,  6,  4,<br>
+    4,  5,  4,  3,  1, -2, -6, -7,  1,  0, -2, -7,-10,-14,-17,-16,<br>
+   -5, -4,  1,  8,  9,  3, -3, -7, -7, -6,  1, 11, 12,  5, -3, -8,<br>
+   -8, -7,  0,  9, 11,  5, -3, -7, -8, -6, -1,  5,  8,  4, -2, -6,<br>
+   -4, -5, -7, -8, -9, -9, -8, -6, -4, -5, -6, -7, -7, -6, -4, -2,<br>
+    0,  1,  2,  3,  5,  8, 10,  9,  1,  2,  3,  6,  9, 12, 14, 13,<br>
+    5,  6,  6,  5,  4,  3,  2,  1,  5,  6,  7,  7,  6,  6,  6,  4,<br>
+   -1,  0,  1,  1,  3,  5,  5,  5,-13,-16,-17,-17,-14,-10, -6, -4,<br>
+    9, 11, 13, 16, 15, 13, 12, 10, -4, -5, -6, -7, -7, -7, -6, -5,<br>
+   -6, -6, -7, -7, -7, -7, -6, -5, -2, -1,  0,  0,  0,  0,  0, -1,<br>
+  -11,-13,-15,-16,-16,-14,-12,-10,  2,  3,  4,  5,  4,  3,  3,  3,<br>
+    6,  7,  8,  8,  8,  7,  6,  5,  3,  4,  3,  3,  3,  3,  3,  3,<br>
+    3,  4,  4,  1, -2, -7,-13,-17,  5,  7,  7,  5,  1, -5,-13,-19,<br>
+    6,  8,  9,  8,  5, -1, -9,-16,  6,  8, 10, 10,  7,  2, -4,-11,<br>
+   18,  9, -1,-10,-13, -9, -4,  0, 22, 12, -1,-12,-15,-10, -4,  2,<br>
+   23, 13,  0,-10,-13, -9, -3,  2, 20, 12,  2, -6, -9, -6, -2,  2,<br>
+   -6, -6, -6, -7, -7, -7, -7, -6, -6, -7, -8, -8, -9, -9, -9, -8,<br>
+   -3, -3, -3, -3, -3, -3, -3, -3, 12, 15, 18, 21, 21, 19, 17, 14,<br>
+   14, 16, 18, 18, 18, 16, 15, 13,  5,  6,  6,  5,  5,  4,  4,  3,<br>
+   -6, -7, -9,-10,-10,-10, -9, -7,-10,-11,-13,-14,-14,-13,-12,-10,<br>
+  -27,-17, -4,  5,  9, 10, 10,  7,-32,-19, -3,  7, 11, 12, 11,  8,<br>
+  -30,-16, -2,  8, 12, 12, 10,  7,-23,-12,  0,  7, 10, 11,  9,  6,<br>
+   16, 17, 16, 12,  6, -1, -8,-12, 17, 18, 15, 10,  1, -8,-15,-18,<br>
+   15, 14, 10,  4, -5,-14,-20,-23, 10,  8,  4, -1, -9,-16,-21,-22,<br>
+  -10,-12,-12,-11, -5,  4, 14, 20,-11,-13,-15,-12, -4,  7, 19, 27,<br>
+  -11,-13,-14,-11, -3,  8, 21, 28,-10,-11,-12, -9, -2,  8, 18, 25,<br>
+   -1, -1, -1,  1,  4,  6,  6,  5,  0,  0,  0,  2,  4,  3,  1, -2,<br>
+    0,  0,  2,  4,  4, -1, -7,-10,  0,  0,  3,  5,  3, -3,-11,-15,<br>
+  -14,-13, -8, -1,  3,  3, -1, -4, -5, -4, -1,  4,  8,  8,  3,  0,<br>
+    3,  2,  2,  3,  4,  5,  3,  1,  5,  3,  0, -2, -2, -1, -1, -1,<br>
+    9,  1, -6, -6, -5, -3, -2, -1, 12,  1, -6, -6, -4, -2, -1,  0,<br>
+   14,  4, -4, -4, -2, -2, -1, -1, 14,  6, -1, -1, -1, -1, -1, -1,<br>
+    4,  6,  8, 10, 11,  9,  7,  5, -1, -1, -1,  0,  0, -1, -1, -2,<br>
+   -2, -4, -4, -5, -5, -5, -5, -4, -2, -3, -3, -4, -4, -3, -2, -1,<br>
+    2,  3,  4,  4,  3,  1,  0,  0, -1,  1,  4,  5,  6,  5,  4,  3,<br>
+   -8, -6, -2,  2,  3,  4,  4,  3,-14,-13, -9, -5, -2, -1,  0,  0,<br>
+   -3, -4, -5, -4,  0,  7, 12, 13, -3, -4, -5, -5, -2,  4,  9, 10,<br>
+   -2, -3, -4, -5, -4, -1,  3,  4, -1, -1, -2, -3, -3, -2,  0,  1,<br>
+    9,  5, -2, -8,-11,-10, -7, -4, 12, 10,  6,  2,  0, -1,  0,  0,<br>
+    2,  2,  3,  4,  3,  1,  1,  1, -9, -8, -4,  0,  1,  2,  1,  0,<br>
+    6,  8,  8,  5,  1, -5,-11,-13,  0,  1,  2,  2, -1, -4, -8,-11,<br>
+   -3, -2,  1,  3,  3,  1, -1, -4, -2, -1,  2,  5,  6,  6,  4,  1,<br>
+    3,  4,  5,  5,  4,  1, -3, -6,  5,  6,  4,  2,  2,  2,  0, -3,<br>
+    6,  5,  0, -5, -5, -2, -1, -2,  7,  4, -3,-11,-12, -7, -3, -2,<br>
+    1,  0, -1, -1, -1,  0,  0,  0,  2,  3,  4,  4,  5,  5,  4,  3,<br>
+   -7, -9, -9,-10,-10, -9, -7, -6,  3,  4,  5,  6,  5,  5,  5,  5,<br>
+   -7, -7, -7, -7, -6, -6, -5, -4, -5, -4, -3, -1, -1, -1,  0,  0,<br>
+   -3, -2,  1,  4,  5,  5,  5,  5, -2, -1,  3,  6,  9, 10, 10,  9,<br>
+  -14,  1, 10,  3, -2,  0,  1,  1,-16,  2, 13,  3, -3, -1,  1,  0,<br>
+  -15,  2, 12,  3, -4, -2,  1,  1,-10,  3, 10,  2, -3, -1,  1,  1,<br>
+    0,  1,  4,  2, -5,-10, -3, 11, -1,  1,  4,  2, -6,-13, -2, 15,<br>
+   -1,  0,  3,  1, -6,-12, -1, 15, -1,  1,  2,  1, -4, -8,  0, 11,<br>
+   10,  5, -2, -2,  2,  5,  1, -4,  7,  0, -8, -6,  1,  5,  2, -4,<br>
+    2, -5,-12, -7,  2,  7,  4, -1, -1, -7,-10, -4,  4,  9,  7,  2,<br>
+   -5, -5, -4, -6, -6, -5, -5, -3, -1, -2, -2, -4, -5, -6, -5, -4,<br>
+    6,  7,  7,  4,  0, -2, -3, -3, 13, 14, 13, 10,  5,  1, -1, -2,<br>
+    1,  1,  2,  2,  2,  2,  2,  2, -5, -6, -8, -9, -9, -8, -7, -6,<br>
+    7,  9, 10, 11, 11,  9,  7,  5, -1, -2, -3, -3, -4, -4, -4, -3,<br>
+   -1, -1,  0,  0,  0,  0, -1, -1, -3, -3, -4, -5, -4, -3, -3, -2,<br>
+    2,  1, -1, -3, -3, -2, -1,  0, 12, 12,  8,  3,  1,  0,  0,  1,<br>
+   -6, -8, -8, -6, -2,  2,  6,  8,  1,  1, -1, -2,  0,  3,  5,  7,<br>
+    3,  3,  1, -1, -1,  0,  0,  2,  0,  1,  0, -1, -1, -1, -2, -1,<br>
+    1,  0,  0,  0,  0,  0,  2,  4,  2,  1,  3,  4,  3,  1,  0,  2,<br>
+    2,  1,  0,  0, -1, -1,  0,  3,  5,  1, -6,-12,-13, -8, -1,  4,<br>
+   -2,  0, -1, -2, -1,  0,  2,  3, -6, -3, -2,  0,  1,  1,  1,  1,<br>
+   -9, -5,  0,  4,  5,  3,  1,  0, -8, -3,  3,  7,  8,  4,  1,  0,<br>
+    1,  2,  2,  3,  3,  1, -1, -3,  4,  5,  5,  6,  6,  5,  2,  0,<br>
+    0,  0,  0,  0,  1,  0, -2, -4, -3, -3, -4, -3, -3, -4, -7, -8,<br>
+   14, 12,  6, -1, -3, -3,  0,  0,  7,  5,  1, -3, -5, -4, -2, -1,<br>
+   -2, -2, -2, -2, -2, -2, -1, -1, -6, -4, -1,  1,  1,  1,  0, -1,<br>
+    2,  2,  1, -3, -6, -7, -6, -3,  1,  0, -1, -3, -2,  1,  4,  6,<br>
+    0,  0,  1,  2,  4,  7,  8,  7,  0,  0,  0,  0, -1, -4, -7, -8,<br>
+    0,  2,  1, -2, -3, -3, -2, -1, -1,  1,  0, -3, -5, -2,  0,  2,<br>
+   -2, -1, -2, -5, -4,  1,  6,  9, -3, -2, -3, -4, -2,  5, 11, 13,<br>
+   -4, -2,  2,  6,  4, -3,-10,-14, -2, -1,  1,  4,  4,  1, -1, -2,<br>
+    0,  0, -1, -2, -2,  0,  4,  6,  2,  2,  0, -3, -3,  0,  5,  9,<br>
+   -4, -4, -2,  1,  6,  9,  3, -7, -2, -2, -2, -1,  4,  8,  0,-11,<br>
+    1,  1,  0,  0,  2,  6, -1,-10,  2,  2,  1,  0,  2,  4,  0, -7,<br>
+   -1, -2, -3, -6, -7, -8, -8, -8,  2,  3,  3,  1, -1, -2, -3, -4,<br>
+    5,  5,  5,  4,  3,  2,  0, -1,  3,  3,  3,  3,  2,  2,  1,  1,<br>
+    3,  3,  2, -2, -3,  0,  7, 10,  1,  2,  2, -2, -5, -4,  0,  3,<br>
+    0,  3,  4,  2, -3, -5, -6, -4,  0,  2,  4,  4,  1, -4, -7, -7,<br>
+    2,  4,  5,  5,  5,  5,  6,  6, -4, -4, -3, -5, -5, -3, -3, -2,<br>
+   -3, -4, -4, -5, -4, -2, -2, -2,  1,  1,  0,  0,  2,  4,  5,  4,<br>
+   -2,  0,  3,  4,  4,  3,  2,  2, -9, -7, -4,  0,  3,  6,  6,  6,<br>
+   -5, -5, -3, -2,  0,  1,  3,  4,  5,  5,  2, -2, -4, -6, -5, -3,<br>
+    1, -6, -4,  7,  5, -2, -2,  1,  5, -5, -4,  6,  4, -5, -4,  1,<br>
+    5, -5, -4,  6,  4, -5, -3,  1,  1, -7, -3,  8,  7, -1, -3,  1,<br>
+   -8, -7, -4,  0,  2,  4,  5,  5,  5,  6,  5,  2, -1, -5, -7, -7,<br>
+    5,  6,  4,  1, -3, -5, -6, -5, -7, -7, -5, -2,  1,  6,  9, 10,<br>
+    6,  3,  0,  1,  3,  0, -8,-14,  3,  0, -1,  1,  4,  3,  0, -4,<br>
+    1,  0,  0,  1,  2,  1,  1,  1, -1, -1,  1,  2,  1, -1, -1,  0,<br>
+    1,  1,  1,  1,  0, -2, -3,  0,  1,  2,  1,  0, -2, -8, -9, -4,<br>
+    1,  3,  3,  2,  1, -3, -3,  1,  0,  1,  1,  1,  1,  1,  4,  8,<br>
+    2,  5,  9,  7,  2, -1, -1,  1, -4, -1,  1,  0, -3, -4, -1,  2,<br>
+   -3,  0,  3,  3,  0, -1,  0,  2, -4, -1,  1,  1, -2, -4, -5, -4,<br>
+    1, -1, -2, -2, -1,  2,  4,  5,  2,  1,  1,  0, -1, -1,  0,  0,<br>
+    2,  3,  4,  5,  4,  2,  1,  0, -9, -9, -6, -3, -1, -1, -1, -1,<br>
+   -6, -6,  4,  7,  0, -2, -1, -2, -1, -2,  5,  6, -1, -2,  0, -1,<br>
+    4, -1,  1,  0, -4, -2,  0, -2,  7,  1, -1, -2, -3,  1,  3,  1,<br>
+    4,  2,  1,  3,  3,  1,  1,  2,  2, -2, -4,  0,  3,  1,  0,  0,<br>
+    1, -4, -8, -4,  1,  2,  1,  0,  2, -3, -9, -6,  0,  3,  3,  2,<br>
+   -1, -1,  0, -1, -1,  0,  1,  2,  3,  1, -4, -8, -7, -3,  1,  2,<br>
+    2, -1, -3, -2, -1,  0,  1,  0, -1,  0,  5, 11,  9,  3, -1, -3,<br>
+   -1, -2, -2, -1,  1,  1,  1,  1,  0, -1,  0,  3,  6,  6,  5,  5,<br>
+    2,  1, -1, -1, -2, -5, -6, -4,  2,  2,  2,  1, -1, -4, -5, -5,<br>
+   -1, -3, -6, -7, -6, -4, -1,  1,  5,  5,  3,  4,  4,  3,  4,  5,<br>
+   -1, -2, -3, -2, -2, -2,  0,  1,  0,  0,  0,  0,  0,  1,  2,  3,<br>
+   -6, -6, -4, -1,  2,  2,  2,  2, -6, -7, -5, -2,  0, -1, -1,  0,<br>
+    2,  2,  2,  4,  4,  3,  3,  4,  2,  1,  0, -1,  0,  0,  2,  4,<br>
+   12,  5, -5, -8, -5,  0,  2,  2,  2, -3, -6, -3,  0,  0, -1, -2,<br>
+   -2, -3, -1,  3,  4,  1, -2, -3,  2,  2,  3,  4,  3,  1, -1, -1,<br>
+    3,  2,  1,  0,  1,  4,  3,  0,  4,  3,  0, -5, -6,  0,  3,  3,<br>
+    2,  3,  1, -7,-12, -6,  1,  3,  1,  3,  4, -1, -6, -4,  0,  1,<br>
+   -9, -4,  2,  6,  7,  4,  1,  0, -7, -1,  4,  6,  4,  0, -3, -3,<br>
+   -6,  0,  4,  4,  1, -2, -3, -2, -4,  1,  3,  2,  0, -2, -1,  0,<br>
+    0,  5,  2, -5, -3,  3,  1, -4, -2,  4,  2, -6, -3,  6,  4, -3,<br>
+   -1,  5,  3, -5, -1,  7,  3, -4, -1,  2,  0, -6, -3,  5,  3, -3,<br>
+   -8, -3,  3,  5,  3,  1, -2, -2,  2,  4,  4, -2, -4, -3,  1,  3,<br>
+    2,  1, -3, -5, -3,  3,  4,  3, -5, -6, -5,  3, 10,  8, -1, -5,<br>
+    0,  3,  2, -4, -9, -7,  0,  6, -5, -1,  5,  7,  4, -1, -3, -3,<br>
+   -5, -5, -2,  3,  6,  5, -1, -4,  9,  6,  0, -4, -2,  1,  1, -1,<br>
+   -1, -1, -1,  1,  1,  0, -1,  0, -1,  0,  0,  0,  0, -1, -1,  0,<br>
+    2,  1, -2, -1,  1,  1,  0,  0, 12,  8,  2, -1, -1, -4, -7, -7,<br>
+    2,  1,  3,  6,  7,  4,  2,  0,  1,  0, -1,  0, -1, -4, -7, -8,<br>
+    0,  0, -1,  0,  0,  0, -1, -3,  0,  0,  0,  0,  1,  1,  0, -2,<br>
+   -1,  0,  1,  1,  0,  0, -1, -2,  0,  0, -1, -3, -4, -3, -1,  1,<br>
+   -1,  0,  0,  0,  1,  4, 10, 12, -1,  0, -2, -2, -3, -3, -1,  1,<br>
+   -3, -1, -2, -4,  2,  9,  9,  7, -3,  0, -1, -3,  0,  2, -1,  1,<br>
+   -1,  1, -2, -3,  0, -1, -3,  0,  0,  0, -3, -2,  0, -1, -1,  1,<br>
+   -1, -2, -1, -1, -2, -1, -1, -2,  2, -1, -2, -1,  0,  1,  0, -2,<br>
+    3, -1, -2,  2,  5,  3, -1, -3,  1, -5, -5,  1,  6,  6,  2,  0,<br>
+    1,  2,  0, -1,  0,  1,  0, -2, -5, -3, -1,  0,  1,  2,  1, -2,<br>
+   -7, -5, -2, -2, -2, -2,  0,  1, -1,  0,  1,  1,  0,  3,  9, 12,<br>
+    0,  6,  5,  1, -2, -3,  0,  3,  0,  6,  5,  1,  1,  1,  2,  3,<br>
+   -5, -2, -2, -3,  0,  0,  0,  0, -6, -3, -3, -2,  0,  0, -1, -2,<br>
+    4,  4,  2,  1,  0, -1, -1,  0, -2, -2,  0,  1,  2,  1,  1,  0,<br>
+    2,  2,  1, -1, -3, -5, -9,-10,  2,  1, -1, -1,  1,  4,  4,  1,<br>
+    4,  0, -2, -2, -2, -2, -1,  0,  7,  1, -4, -3, -2,  0,  1,  1,<br>
+   10,  5, -1, -2,  0,  1,  1,  0,  5,  1, -3, -4, -3, -1, -1, -2,<br>
+    2,  1, -1, -3, -3,  1,  1, -1, -2, -1,  3,  0, -1,  1,  1,  0,<br>
+   -3,  1,  7,  2, -3, -2, -1,  0, -2,  4,  8, -1, -8, -5,  0,  2,<br>
+   -4, -1,  1,  2,  1, -3, -4, -2, -5, -3, -2,  1,  4,  4,  4,  6,<br>
+   -3, -2, -4, -3,  0,  1,  1,  2,  2,  2,  2,  1,  2,  1, -1, -1,<br>
+   -4, -1,  0, -1, -3, -3, -1, -1,  1,  4,  4,  2,  0, -1, -2, -3,<br>
+    4,  6,  5,  3,  2,  1, -2, -4,  0,  1,  1,  1,  1, -1, -4, -6,<br>
+    1,  2,  2, -1, -6, -5, -1,  2, -3, -2,  1,  1, -4, -3,  2,  5,<br>
+   -2, -1,  2,  2, -3, -4,  0,  3, -2, -2,  2,  6,  5,  2,  1,  2,<br>
+    2, -3, -3,  0,  0,  2,  3,  1,  3, -1,  1,  3,  1,  2, -1, -5,<br>
+   -5, -7, -4, -2,  1,  8,  8,  1, -1,  0,  2,  0, -3,  0,  1, -3,<br>
+   -2, -5, -5, -2, -3, -1,  0, -2, -1, -4,  0,  4,  0,  2,  4,  0,<br>
+    0,  0,  8, 10,  2,  1,  3, -1, -4, -3,  2,  3, -3, -3,  1, -1,<br>
+    1, -2, -4,  2,  7,  3, -2, -1,  6,  4, -2, -1,  2,  0, -1,  3,<br>
+    1,  1, -2, -2, -2, -5, -3,  4, -6, -2,  1,  1, -1, -4, -2,  4,<br>
+   -2, -1, -2, -2,  0,  1,  0, -2, -1,  1,  0, -1,  0,  0, -1, -3,<br>
+    0,  1, -2, -4, -3, -1,  0,  0,  6,  8,  5,  0,  0,  1,  2,  3,<br>
+   -2, -2,  2,  5,  2,  0,  0,  1,  2, -2, -2, -1, -1,  1,  2,  4,<br>
+    2, -1,  0,  1,  0,  0,  0,  1, -8, -7, -1,  1, -1, -1,  1,  3,<br>
+    0,  3,  6,  2, -2,  1,  2,  0,-10, -7, -1,  0, -3, -1,  2,  1,<br>
+    0,  0,  2,  2,  1,  1,  1, -1,  3,  0, -2, -2,  0,  2,  1,  0,<br>
+    8,  1,  0,  0, -2, -3, -1,  0,  2, -2,  2,  5,  1, -2, -1,  1,<br>
+   -3, -6, -3, -1, -3, -3, -1,  2,  2,  0,  1,  2,  2,  1,  0,  0,<br>
+    1, -1, -1, -2, -1,  0,  1,  0, 15,  9,  2, -1, -2, -3, -3, -3,<br>
+    0, -3, -2,  0,  0, -1, -1, -1,  1,  0,  1,  0,  0, -1, -1, -1,<br>
+    0,  2,  2, -2, -3, -3, -7, -8,  0,  2,  2,  0,  1,  2,  1,  1,<br>
+    1,  2,  2,  2,  3,  1,  0,  3,  1,  0, -1, -2, -1, -2,  0,  5,<br>
+  -11, -6, -1,  1,  2,  3,  1, -3,  1,  4,  3, -1, -2,  1,  2, -1,<br>
+    2,  2,  1, -1, -2,  0,  1, -1,  0,  0, -1, -1,  0,  2,  3,  2,<br>
+    1,  1,  2,  1, -1,  1,  0, -4,  0,  0,  0, -2, -2,  2,  4, -2,<br>
+   -2, -3,  0,  0, -1,  2,  1, -6,  0,  2,  5,  5,  3,  2, -1, -7,<br>
+    4,  2,  0,  0,  3,  3,  1, -1,  0, -1, -1,  3,  6,  4,  1, -1,<br>
+   -2, -2,  0,  2,  2,  0, -2, -2, -1,  0, -1, -5, -7, -5, -1,  1,<br>
+    5, -1, -2,  0,  2,  4,  2, -5,  0, -5, -2,  2,  1,  2,  0, -6,<br>
+    6,  1,  0,  1, -2, -1,  4,  2,  2, -3, -3,  0, -1, -2,  0,  0,<br>
+    1, -1,  0,  2,  0,  0,  6, 11,  2, -1, -1,  0, -3, -2,  3,  5,<br>
+    0, -2, -1,  0, -1,  0,  0, -3,  1, -1, -1, -1, -2, -1, -3, -7,<br>
+    1,  1, -2, -2,  1,  3,  1, -2, -1,  2,  0, -1, -1,  1,  0,  0,<br>
+   -4,  2,  3, -1, -2, -2,  0,  1,-11, -2,  4,  5,  6,  2, -1, -2,<br>
+   -6, -2,  1, -1, -3, -4,  1,  9, -3,  0,  3,  3,  2, -3, -3,  3,<br>
+    1,  1,  0,  0,  1, -1, -2,  3,  2,  0, -3, -3,  0, -1, -1,  3,<br>
+    1, -1, -3,  1,  2, -6, -4,  6,  0, -2, -5, -2,  0, -3, -2,  3,<br>
+    2,  2,  1, -2, -2,  1,  2, -1, -1,  1,  1, -2, -1,  6,  7, -1,<br>
+    1,  0, -4, -2,  1, -2, -3,  1, -4,  0, -3, -2,  2,  0, -3,  0,<br>
+   -3,  4,  3,  1,  8,  7,  0, -1, -3,  4,  1, -4,  2,  3, -2, -3,<br>
+   -3,  6,  1, -4,  1,  1, -1, -1, -2,  4, -3, -3,  3,  0, -1, -1,<br>
+    1,  2, -4,  2,  4, -3, -1,  2,  3, -1, -4,  5,  4, -6, -3,  2<br>
+};<br>
+<br>
+static const int8 s_svq1InterCodebook8x8[6144] = {<br>
+   -4, -3,  4,  5,  2,  1,  1,  0, -5, -3,  5,  5,  2,  1,  0,  0,<br>
+   -6, -4,  5,  5,  2,  1,  0,  0, -7, -4,  4,  5,  2,  1,  0,  0,<br>
+   -8, -5,  3,  4,  2,  1,  0,  0, -8, -6,  3,  4,  1,  1,  1,  0,<br>
+   -8, -6,  2,  4,  2,  1,  1,  0, -8, -6,  2,  4,  1,  1,  1,  1,<br>
+   -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2,<br>
+   -2, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3, -3, -3, -4, -3,<br>
+   -2, -2, -2, -2, -2, -3, -3, -2,  1,  1,  1,  1,  1,  0, -1, -1,<br>
+    4,  5,  5,  5,  4,  3,  3,  2,  7,  7,  8,  8,  8,  7,  6,  5,<br>
+    2,  1,  2,  4,  4,  0, -4, -6,  1,  1,  2,  5,  5,  1, -5, -7,<br>
+    1,  2,  1,  4,  5,  1, -5, -8,  1,  1,  1,  5,  5,  0, -6, -8,<br>
+    0,  1,  1,  5,  6,  1, -6, -9,  0,  0,  1,  4,  5,  0, -5, -8,<br>
+    0,  0,  1,  4,  5,  0, -5, -7,  0,  0,  1,  4,  4,  1, -4, -7,<br>
+    1,  2,  3,  0, -3, -4, -3, -1,  1,  3,  4,  0, -3, -4, -3, -1,<br>
+    2,  4,  5,  1, -3, -4, -3, -2,  2,  5,  6,  1, -3, -5, -4, -2,<br>
+    3,  6,  6,  1, -3, -5, -4, -2,  3,  6,  6,  1, -3, -5, -4, -2,<br>
+    3,  6,  6,  1, -3, -5, -4, -2,  3,  5,  5,  1, -3, -4, -4, -2,<br>
+    2,  2,  2,  2,  1,  0,  0, -1,  4,  4,  4,  3,  2,  1,  1,  0,<br>
+    4,  5,  4,  4,  3,  3,  2,  1,  4,  4,  4,  4,  4,  3,  2,  2,<br>
+    2,  3,  3,  3,  3,  3,  2,  1, -1, -1, -1, -1,  0,  0,  0,  0,<br>
+   -5, -6, -6, -5, -5, -4, -3, -3, -7, -9, -9, -8, -7, -6, -6, -5,<br>
+    6,  6,  6,  6,  6,  5,  5,  4,  4,  4,  4,  3,  3,  3,  3,  2,<br>
+    0, -1, -1, -1, -2, -2, -1, -1, -3, -5, -6, -6, -6, -6, -5, -4,<br>
+   -3, -5, -6, -7, -6, -6, -5, -4, -1, -2, -2, -2, -2, -2, -1, -1,<br>
+    0,  1,  1,  1,  1,  1,  1,  1,  3,  3,  3,  3,  3,  3,  3,  3,<br>
+    2,  1, -2, -5, -4,  0,  2,  5,  2,  1, -2, -6, -5,  0,  3,  5,<br>
+    2,  1, -2, -6, -6, -1,  3,  6,  3,  2, -2, -7, -6,  0,  4,  7,<br>
+    2,  1, -2, -7, -5,  0,  5,  7,  2,  1, -2, -6, -5,  0,  4,  7,<br>
+    2,  1, -2, -6, -4,  0,  4,  6,  1,  1, -2, -5, -4,  0,  3,  6,<br>
+  -10, -9, -6, -4, -1,  2,  3,  2,-10, -9, -5, -3,  0,  4,  4,  3,<br>
+   -9, -7, -3, -1,  2,  5,  5,  3, -7, -5, -2,  0,  3,  5,  5,  3,<br>
+   -6, -3,  0,  1,  4,  6,  5,  3, -4, -2,  1,  2,  3,  5,  4,  2,<br>
+   -2,  0,  1,  2,  2,  4,  3,  1, -1,  1,  2,  2,  2,  3,  3,  1,<br>
+   -4, -5, -5, -6, -6, -6, -6, -5, -3, -3, -4, -4, -4, -4, -4, -4,<br>
+    0,  0,  0,  0, -1, -1, -1, -1,  5,  5,  6,  5,  5,  4,  3,  2,<br>
+    5,  6,  7,  7,  7,  6,  5,  4,  3,  3,  4,  4,  4,  4,  3,  2,<br>
+    0, -1,  0,  0, -1, -1,  0, -1, -3, -3, -4, -4, -4, -4, -3, -3,<br>
+    1, -2, -5,  1,  5,  4,  2,  0,  1, -3, -6,  1,  6,  5,  2,  0,<br>
+    0, -4, -7,  0,  6,  6,  2,  1, -1, -5, -9, -1,  6,  6,  3,  1,<br>
+   -1, -6,-10, -2,  6,  6,  3,  1, -1, -6, -9, -2,  5,  6,  3,  1,<br>
+   -2, -6, -9, -2,  5,  5,  3,  1, -2, -6, -7, -2,  4,  4,  2,  1,<br>
+   -5, -7, -8, -9, -9, -8, -7, -6, -5, -6, -6, -7, -7, -6, -6, -5,<br>
+   -3, -3, -3, -4, -5, -5, -4, -4, -1,  0,  0, -1, -1, -1, -1, -1,<br>
+    0,  1,  2,  2,  2,  2,  2,  1,  2,  3,  4,  5,  5,  5,  5,  4,<br>
+    3,  4,  5,  6,  8,  8,  8,  7,  3,  4,  5,  6,  7,  7,  7,  6,<br>
+    5,  6,  7,  8,  9, 10, 10,  9,  3,  4,  6,  7,  8,  9,  9,  8,<br>
+    0,  1,  2,  3,  4,  5,  5,  5, -1, -2, -1, -1,  0,  1,  2,  2,<br>
+   -2, -3, -3, -3, -3, -2, -1,  0, -3, -4, -5, -5, -5, -5, -5, -4,<br>
+   -4, -5, -5, -6, -7, -7, -6, -5, -3, -4, -5, -6, -7, -7, -6, -6,<br>
+   13,  7,  0, -3, -3, -4, -4, -5, 14,  7,  0, -3, -3, -4, -4, -4,<br>
+   15,  8, -1, -4, -4, -4, -5, -4, 15,  8, -1, -4, -4, -5, -4, -3,<br>
+   15,  7, -1, -4, -5, -5, -5, -4, 14,  7, -1, -4, -4, -4, -4, -3,<br>
+   12,  6, -1, -4, -4, -4, -4, -3, 11,  5, -1, -4, -4, -4, -4, -3,<br>
+  -17, -4,  5,  4,  4,  4,  3,  3,-18, -5,  5,  4,  4,  4,  3,  3,<br>
+  -19, -5,  6,  4,  4,  4,  3,  2,-20, -5,  6,  4,  4,  4,  3,  3,<br>
+  -20, -4,  6,  4,  4,  5,  3,  3,-19, -5,  6,  4,  4,  5,  3,  3,<br>
+  -18, -4,  5,  4,  4,  4,  3,  2,-17, -5,  4,  3,  4,  4,  3,  3,<br>
+   -6, -6, -6, -4, -2,  1,  6, 11, -6, -7, -7, -4, -2,  2,  8, 13,<br>
+   -8, -8, -7, -4, -2,  3,  9, 14, -8, -8, -7, -5, -1,  4, 10, 16,<br>
+   -8, -8, -7, -5, -1,  4, 10, 17, -8, -8, -7, -4,  0,  5, 10, 16,<br>
+   -8, -8, -6, -3,  0,  4,  9, 15, -7, -7, -5, -3,  0,  4,  8, 12,<br>
+    8,  7,  7,  5,  2, -2, -8,-14,  8,  8,  7,  5,  2, -2, -8,-15,<br>
+    8,  8,  7,  5,  1, -3, -9,-16,  8,  8,  7,  5,  1, -3,-10,-17,<br>
+    8,  9,  8,  5,  1, -3,-10,-17,  8,  8,  7,  4,  1, -4,-10,-16,<br>
+    7,  7,  7,  4,  1, -3, -9,-14,  6,  7,  6,  3,  0, -3, -9,-13,<br>
+    5,  1, -4, -4, -3, -1,  0,  0,  7,  2, -3, -3, -2, -1,  1,  0,<br>
+    7,  1, -3, -3, -1,  0,  1,  1,  6,  1, -3, -2, -1,  1,  1,  0,<br>
+    6,  0, -4, -2, -1,  0,  1,  0,  5,  0, -4, -3, -1,  0,  0, -1,<br>
+    5,  0, -3, -1,  0,  0,  0, -2,  4,  1, -2, -1,  0,  1,  0, -1,<br>
+    2,  2,  1,  1, -2, -6, -8, -8,  1,  1,  1,  1, -2, -5, -8, -8,<br>
+    1,  1,  1,  0, -1, -3, -5, -5,  0,  0,  0,  0, -1, -1, -1, -2,<br>
+    0, -1,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  1,  2,  3,  2,<br>
+    2,  1,  1,  1,  2,  3,  4,  3,  3,  3,  3,  3,  4,  4,  5,  4,<br>
+   -4, -4, -3, -2,  0,  0,  1,  1, -4, -4, -3, -2, -1,  0,  0,  1,<br>
+   -2, -2, -2, -1, -1, -1,  0,  0,  0,  1,  0,  0,  0,  0,  0, -1,<br>
+    2,  2,  2,  2,  2,  2,  1,  1,  3,  4,  4,  4,  4,  4,  4,  3,<br>
+    1,  1,  1,  3,  3,  4,  3,  3, -5, -6, -5, -4, -3, -3, -2, -2,<br>
+   -4, -2, -1, -1, -1, -1,  0,  1, -4, -2, -1, -1, -1, -1,  0,  1,<br>
+   -3, -2, -1, -1, -1,  0,  1,  2, -4, -3, -2, -1, -1,  1,  3,  3,<br>
+   -4, -3, -3, -1, -1,  1,  4,  5, -4, -3, -2, -2, -1,  1,  4,  7,<br>
+   -2, -2, -1, -1,  0,  2,  6,  8, -1,  0,  0,  1,  1,  4,  7,  8,<br>
+   -3, -3, -3, -2, -2, -1, -1,  0, -1, -1,  0,  1,  2,  2,  3,  3,<br>
+    0,  1,  2,  4,  5,  6,  6,  5, -1,  0,  2,  3,  5,  6,  5,  3,<br>
+   -1, -1,  0,  2,  3,  3,  2,  1, -2, -2, -1,  0, -1, -3, -4, -4,<br>
+    0,  0, -1, -1, -2, -4, -8, -7,  1,  2,  1,  0, -1, -4, -6, -7,<br>
+   -2,  4,  1, -6,  0,  3,  0,  0, -2,  5,  1, -7,  0,  3,  0,  0,<br>
+   -3,  5,  1, -8,  0,  3, -1, -1, -2,  6,  1, -9,  0,  3,  0, -1,<br>
+   -2,  6,  2, -8,  0,  4,  0, -1, -3,  5,  1, -7,  1,  4,  0,  0,<br>
+   -2,  4,  1, -7,  0,  4,  1,  0, -1,  4,  1, -6,  0,  3,  1,  0,<br>
+    0,  0,  0,  3,  4,  5,  4,  1,  1,  1,  1,  2,  3,  3,  2,  0,<br>
+    2,  2,  1,  2,  2,  1, -1, -2,  4,  3,  1,  1,  0, -1, -3, -5,<br>
+    5,  3,  1, -1, -2, -3, -4, -6,  5,  3,  0, -2, -3, -5, -6, -7,<br>
+    4,  3,  0, -2, -3, -4, -5, -5,  4,  3,  0, -1, -2, -2, -3, -3,<br>
+    0,  0,  0,  0, -1, -5, -2,  6,  0,  0,  0,  1, -1, -6, -2,  8,<br>
+    0,  0,  0,  2,  0, -6, -3,  9,  0, -1,  0,  2,  0, -7, -2, 10,<br>
+    0, -1,  0,  2, -1, -8, -3, 10,  0, -1, -1,  2, -1, -7, -3,  9,<br>
+    0, -1,  0,  1, -1, -6, -3,  8,  0,  0,  0,  1,  0, -5, -2,  7,<br>
+    2,  3,  3,  2,  1,  0, -1, -1,  3,  4,  3,  2,  1,  0, -1, -2,<br>
+    3,  4,  4,  2,  1, -1, -2, -3,  2,  3,  3,  2,  0, -1, -2, -3,<br>
+   -1,  0,  1,  1,  0, -1, -2, -2, -5, -4, -3, -1,  0,  1,  1,  1,<br>
+   -8, -8, -5, -1,  1,  3,  4,  3,-10, -9, -5,  0,  3,  5,  6,  5,<br>
+   -5, -1,  4,  5,  3,  1,  0,  0, -6, -1,  4,  5,  2,  0, -1, -2,<br>
+   -6, -1,  5,  4,  2, -1, -2, -2, -7, -1,  4,  4,  1, -2, -3, -3,<br>
+   -6, -1,  5,  4,  1, -2, -3, -3, -5,  0,  4,  4,  1, -1, -2, -2,<br>
+   -4,  0,  5,  4,  1, -1, -1, -2, -3,  1,  4,  3,  1, -1, -1, -2,<br>
+   -2, -3, -2,  1,  4,  6,  5,  3, -3, -4, -4,  0,  3,  5,  4,  2,<br>
+   -3, -5, -5, -1,  2,  4,  3,  1, -4, -6, -4, -1,  2,  4,  2, -1,<br>
+   -2, -4, -3,  1,  2,  4,  2, -1, -2, -4, -2,  1,  3,  3,  1, -2,<br>
+   -2, -3, -2,  1,  3,  3,  1, -2, -2, -2, -1,  1,  3,  3,  0, -2,<br>
+   -4, -4, -3, -2, -1,  2,  5,  7, -4, -4, -3, -3, -2,  1,  5,  7,<br>
+   -2, -3, -2, -3, -3, -1,  3,  5, -1, -1,  0, -2, -3, -2,  2,  4,<br>
+    1,  1,  1, -1, -4, -3,  1,  3,  4,  3,  2, -1, -4, -3, -1,  1,<br>
+    6,  4,  3,  0, -3, -3, -2,  0,  6,  5,  3,  1, -2, -3, -2, -1,<br>
+   12, 11,  8,  4,  0, -2, -2, -1, 10,  9,  6,  2, -1, -2, -1,  0,<br>
+    4,  3,  2,  0, -1, -1,  0,  1, -1, -1, -1, -1, -2,  0,  1,  2,<br>
+   -3, -5, -4, -2, -2,  0,  2,  3, -5, -5, -4, -2, -1,  0,  1,  2,<br>
+   -5, -5, -4, -2, -1,  0,  1,  1, -4, -4, -3, -2, -2, -1,  0,  0,<br>
+    3,  3,  2, -1, -3, -4, -3, -2,  3,  2,  0, -2, -4, -4, -3, -2,<br>
+    2,  2,  1, -1, -3, -5, -4, -3,  3,  3,  3,  1, -2, -3, -3, -3,<br>
+    4,  4,  4,  3,  0, -2, -2, -2,  5,  5,  5,  3,  0, -1, -2, -2,<br>
+    5,  5,  4,  2, -1, -2, -3, -2,  3,  3,  3,  0, -2, -4, -4, -4,<br>
+   -1, -1,  4, -2, -2,  6,  2, -5, -1,  0,  4, -2, -3,  6,  2, -6,<br>
+   -1,  0,  4, -2, -3,  7,  3, -7, -1, -1,  4, -3, -4,  8,  3, -7,<br>
+    0, -1,  4, -3, -4,  7,  3, -6, -1, -1,  4, -3, -4,  7,  3, -6,<br>
+   -1, -1,  3, -3, -4,  6,  3, -6, -1,  0,  3, -2, -3,  6,  3, -5,<br>
+    1, -2, -7,  2,  5, -2, -1,  1,  1, -2, -8,  3,  6, -3, -1,  2,<br>
+    2, -2, -9,  4,  7, -4, -2,  2,  3, -1, -9,  5,  7, -4, -1,  3,<br>
+    3, -1, -9,  4,  7, -4, -2,  2,  3, -1, -7,  4,  6, -4, -2,  1,<br>
+    2,  0, -6,  4,  6, -4, -1,  1,  2,  0, -5,  3,  4, -3, -1,  1,<br>
+   -2,  2,  2,  0,  0, -1, -3, -4, -2,  2,  2,  1,  1,  0, -2, -4,<br>
+   -2,  2,  2,  2,  2,  1, -1, -2, -3,  2,  3,  3,  4,  2,  0, -2,<br>
+   -3,  2,  3,  2,  4,  2,  0, -3, -4,  1,  2,  1,  2,  1, -1, -3,<br>
+   -5,  0,  1,  0,  1,  1, -2, -3, -4,  0,  0,  0,  1,  0, -2, -3,<br>
+    0,  0, -1, -2, -2,  2,  7,  8,  0,  0, -1, -3, -2,  1,  6,  7,<br>
+    0,  1, -1, -3, -3,  0,  4,  5,  0,  1,  0, -1, -1,  0,  1,  3,<br>
+    0,  2,  1,  1,  0, -1,  0,  1, -2,  0,  1,  2,  1,  0, -1, -1,<br>
+   -5, -2,  0,  1,  1,  0, -3, -3, -6, -4, -1,  1,  1, -1, -3, -4,<br>
+   -4, -2,  2,  5,  6,  4,  3,  2, -5, -3,  1,  4,  4,  2,  0,  0,<br>
+   -4, -2,  0,  2,  1, -1, -2, -2, -2, -1,  0,  1,  0, -2, -3, -2,<br>
+   -2,  0,  0,  0, -1, -1, -2, -1, -2, -1, -1,  0,  0,  0,  1,  2,<br>
+   -2, -2, -1, -1,  0,  1,  3,  4, -2, -3, -2, -1,  0,  2,  4,  5,<br>
+    2,  1, -2, -2, -1,  0,  1,  0,  1,  0, -3, -3, -1,  0,  1,  0,<br>
+    0, -1, -3, -3, -1,  1,  1,  1,  0,  0, -3, -1,  1,  2,  3,  3,<br>
+    0, -1, -3, -1,  1,  3,  3,  3, -2, -2, -4, -2,  1,  3,  4,  4,<br>
+   -3, -3, -4, -2,  1,  3,  3,  4, -2, -3, -5, -2,  1,  2,  3,  3,<br>
+    4,  5,  3,  4,  4,  4,  4,  5,  3,  3,  1,  0,  0,  0,  0,  1,<br>
+    1,  1, -1, -2, -3, -4, -3, -2,  2,  2,  0, -2, -2, -4, -3, -2,<br>
+    2,  3,  1, -1, -1, -3, -3, -2,  1,  2,  0,  0, -1, -2, -2, -1,<br>
+    0,  1,  0, -1, -1, -3, -2, -1,  1,  1,  0, -1, -1, -2, -2, -2,<br>
+   -2, -1, -1,  0,  1,  2,  1,  0,  1,  2,  3,  5,  6,  5,  5,  3,<br>
+    1,  2,  3,  4,  5,  5,  4,  3, -2, -2, -3, -3, -2, -1,  0,  0,<br>
+   -3, -3, -4, -5, -4, -3, -2, -1, -1, -1, -2, -2, -2, -1,  0,  0,<br>
+    0,  1,  0, -1, -1,  0,  0,  1, -1,  0, -1, -2, -3, -2, -2, -1,<br>
+    7,  7,  6,  5,  4,  2, -1, -2,  3,  3,  2,  2,  1,  0, -2, -3,<br>
+    0, -1, -1, -1,  0, -1, -2, -2, -1, -3, -2, -1,  0,  0,  0,  1,<br>
+    0, -2, -2, -1, -1,  1,  2,  2,  3,  1, -1, -1, -1,  1,  2,  2,<br>
+    3,  1, -2, -3, -2, -1,  1,  2,  1, -2, -5, -6, -5, -3, -2,  0,<br>
+    0, -1, -2, -3, -1,  0, -2, -2,  0,  0, -1, -1,  0,  1, -1, -2,<br>
+    0,  0, -2, -1,  0,  0,  0, -2, -1, -2, -3, -3, -2, -1, -3, -3,<br>
+   -1, -2, -3, -3, -2, -2, -3, -4,  2,  2,  0,  0,  0,  0, -1, -2,<br>
+    5,  5,  3,  2,  2,  2,  0, -1,  8,  8,  6,  5,  4,  4,  2,  1,<br>
+   -7, -8, -6, -3, -1, -1, -2, -1, -5, -5, -3,  0,  2,  1,  0,  0,<br>
+   -1, -1,  0,  3,  4,  3,  1,  1,  2,  1,  1,  3,  4,  3,  2,  2,<br>
+    3,  2,  0,  2,  3,  2,  1,  2,  4,  2, -1, -1,  0,  1,  1,  1,<br>
+    3,  2, -2, -3, -2, -1,  0,  1,  3,  1, -3, -4, -3, -2,  0,  1,<br>
+   -4, -2, -1,  2,  3,  3,  1,  0, -7, -5, -4, -2,  0,  0, -1, -2,<br>
+   -6, -5, -5, -4, -2, -2, -2, -3, -1,  0, -1, -1,  0,  0,  0, -1,<br>
+    2,  3,  2,  2,  2,  2,  1,  0,  3,  5,  4,  3,  1,  0,  1,  0,<br>
+    3,  4,  3,  2,  0, -1, -1, -1,  5,  5,  3,  1,  0, -1, -1, -1,<br>
+    1,  1,  0, -1, -3, -5, -6, -4,  1,  1,  0,  0,  0, -3, -3, -1,<br>
+    0, -1, -1,  0,  1,  0,  1,  3, -2, -2, -3, -1,  2,  2,  4,  7,<br>
+   -2, -2, -2,  0,  2,  2,  3,  6, -1,  0,  0,  1,  1,  0,  0,  3,<br>
+    0,  3,  3,  3,  1, -2, -3, -1,  1,  3,  4,  3,  0, -3, -5, -4,<br>
+    0,  2,  0, -1, -3, -4, -2, -2,  1,  4,  2,  0, -2, -3, -2, -1,<br>
+    3,  6,  3,  1, -2, -2,  0, -1,  4,  7,  4,  1, -2, -3, -1,  0,<br>
+    3,  6,  3,  0, -3, -3, -1,  0,  1,  3,  0, -1, -3, -2,  1,  1,<br>
+    0,  1, -1, -2, -3, -1,  2,  2, -2, -1, -3, -3, -3, -1,  1,  2,<br>
+    3,  1, -1,  0,  1,  0,  0,  0,  2, -1, -2, -1,  1,  0, -1, -1,<br>
+    1, -1, -2,  0,  1,  0, -2, -3,  0, -2, -1,  1,  3,  1, -3, -5,<br>
+    0, -2, -1,  2,  5,  2, -3, -5,  0, -2, -1,  4,  6,  3, -2, -5,<br>
+    0, -2,  0,  4,  7,  4, -2, -4,  0, -2,  0,  4,  6,  4, -2, -4,<br>
+   -2, -2, -3, -4, -3, -2, -1,  0,  1,  1,  0, -1, -1, -1,  0,  1,<br>
+    3,  3,  2,  2,  1,  1,  1,  1,  2,  2,  2,  2,  1,  0,  0,  1,<br>
+    0,  0,  0,  0, -1, -1, -1, -1, -4, -4, -4, -4, -4, -4, -4, -3,<br>
+   -3, -3, -2, -3, -2, -1, -1,  0,  3,  4,  4,  5,  5,  6,  6,  7,<br>
+   -1, -2,  7, -2, -4, -1, -1,  0, -1, -2,  9, -1, -4, -1, -1,  0,<br>
+   -1, -3, 10, -1, -4, -1, -1,  1, -1, -3, 10, -2, -3, -1, -1,  2,<br>
+   -1, -2, 10, -2, -4, -1, -1,  2, -1, -2,  9, -2, -4, -1, -1,  2,<br>
+   -1, -2,  8, -2, -4,  0, -1,  1,  0, -2,  7, -2, -3, -1,  0,  2,<br>
+    3, -4,  1,  3, -3, -2,  1,  0,  3, -5,  1,  4, -3, -2,  1,  0,<br>
+    3, -6,  2,  5, -3, -1,  3,  0,  3, -6,  2,  5, -3, -1,  2,  0,<br>
+    3, -6,  1,  5, -4, -2,  3,  0,  3, -6,  1,  5, -3, -2,  2,  0,<br>
+    2, -6,  1,  4, -3, -1,  1,  0,  2, -6,  1,  4, -2, -1,  1,  0,<br>
+    0,  0,  1,  1,  1,  0,  0,  2,  0, -1,  1,  1,  1,  0,  0,  2,<br>
+    0, -1,  0,  0,  0,  0,  0,  2,  0, -1,  0,  0,  0,  0, -1,  0,<br>
+    1,  0,  1,  0,  0, -1, -2, -1,  3,  1,  1,  0,  0, -2, -4, -3,<br>
+    5,  3,  2,  1,  0, -3, -5, -4,  5,  4,  2,  0, -1, -4, -5, -5,<br>
+    1,  0, -1, -2, -2, -3, -6, -9,  2,  0, -1, -1,  0,  0, -3, -6,<br>
+    1,  0,  0, -1,  0,  0, -2, -5,  2,  1,  1,  1,  1,  2, -1, -3,<br>
+    1,  1,  2,  1,  2,  2,  1, -1,  1,  1,  2,  1,  1,  1,  1,  1,<br>
+    0,  0,  2,  1,  0,  0,  2,  2,  0,  1,  2,  2,  0,  0,  2,  2,<br>
+   -4, -3,  0,  1,  4,  6,  4,  3, -3, -2,  0,  0,  2,  4,  1,  0,<br>
+   -1, -1,  0,  0,  1,  1, -2, -3,  1,  1,  1,  0,  1,  1, -3, -5,<br>
+    1,  1,  1,  0,  1,  1, -3, -5, -1,  0,  0, -1,  1,  1, -2, -4,<br>
+   -1,  0,  0, -1,  1,  2,  0, -2, -1,  0,  0,  0,  2,  3,  1,  0,<br>
+   -1,  0,  3,  4,  0, -4, -5, -5,  0,  0,  4,  5,  2, -2, -3, -2,<br>
+    0, -1,  2,  4,  2, -1, -1,  0,  0, -2, -1,  1,  0, -2,  0,  1,<br>
+    1, -2, -2,  0,  0, -1, -1,  1,  1, -2, -3,  0,  1,  0, -1,  0,<br>
+    1, -2, -2,  1,  3,  1,  0,  0,  1, -2, -1,  2,  4,  2,  0,  0,<br>
+    1,  2,  3,  2,  0,  2,  2,  1, -1,  0,  1,  0, -3,  1,  1,  1,<br>
+   -1,  0,  0, -2, -4,  0,  2,  1, -1,  2,  2, -1, -5,  0,  2,  1,<br>
+   -1,  3,  4, -1, -5,  0,  2,  1, -2,  2,  4,  0, -4, -1,  0,  0,<br>
+   -4,  0,  2,  0, -4, -2,  0,  0, -5, -1,  2,  1, -2,  1,  3,  2,<br>
+    1,  0,  1,  0,  1,  2, -1, -2,  2,  0, -1, -2,  1,  3,  0, -1,<br>
+    3,  0, -2, -4,  0,  3,  1,  0,  5,  1, -3, -5, -2,  2,  1,  1,<br>
+    6,  1, -2, -5, -2,  1,  0,  1,  5,  1, -1, -5, -2,  0, -1,  0,<br>
+    3,  0, -2, -4, -2,  0, -1,  0,  1, -1,  0, -2,  0,  1,  0,  1,<br>
+    1,  1,  2,  3,  2,  1,  1,  2, -1, -1,  0,  1,  1,  0,  1,  1,<br>
+   -4, -3,  0,  0,  1,  1,  1,  2, -4, -3,  0,  2,  2,  2,  3,  2,<br>
+   -5, -4,  0,  1,  1,  1,  1,  2, -5, -4, -1, -1, -2, -2, -1,  0,<br>
+   -3, -2,  0,  0, -2, -3, -2, -1,  2,  3,  4,  4,  2,  0,  0,  0,<br>
+   -4, -2,  0,  1,  0,  0,  0,  0, -3, -1,  1,  1,  0,  0,  0,  0,<br>
+   -2,  0,  2,  2,  0,  0,  0,  2, -1,  1,  2,  1, -1,  0,  3,  5,<br>
+    0,  2,  1, -1, -2,  0,  5,  6,  0,  1,  0, -3, -3,  0,  4,  6,<br>
+    1,  1, -2, -4, -4, -3,  1,  2,  1,  0, -2, -4, -5, -4, -2,  0,<br>
+   -1, -3, -3, -3, -3, -2, -1, -1,  3,  2,  1,  0,  0,  1,  1,  1,<br>
+    5,  4,  3,  2,  1,  1,  2,  2,  2,  1,  0, -2, -2, -2, -1, -1,<br>
+    0,  0,  0, -1, -2, -2, -2, -2,  0,  1,  3,  3,  2,  1, -1, -1,<br>
+    0,  1,  3,  4,  3,  2,  1, -1, -4, -3, -1,  1,  0, -2, -3, -3,<br>
+   -3, -4, -7, -8, -7, -4, -1,  2,  0, -1, -3, -4, -4, -2,  0,  2,<br>
+    1,  0,  0, -1, -3, -2,  0,  2,  2,  1,  1,  0, -1, -1,  0,  2,<br>
+    1,  1,  1,  1,  0,  0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,<br>
+    0,  0,  1,  2,  3,  3,  2,  2,  0,  0,  1,  3,  4,  4,  3,  2,<br>
+    3,  3,  3,  0, -1,  0,  1,  2,  1,  1,  1, -1, -2, -1, -1,  1,<br>
+   -2, -2, -1, -3, -3, -2, -2,  0, -4, -4, -2, -2, -2, -2, -3,  0,<br>
+   -4, -4, -1,  1,  1,  0, -1,  2, -3, -1,  2,  3,  4,  3,  3,  5,<br>
+   -2,  0,  2,  3,  3,  3,  3,  3, -2, -2,  0,  0,  0,  0,  0,  1,<br>
+    0,  2,  1, -1, -3, -1,  3, -2, -1,  0, -1, -1, -3,  0,  4, -2,<br>
+   -2, -2, -2, -2, -2,  1,  5, -2, -3, -2, -3, -1, -2,  1,  4, -3,<br>
+   -2,  0, -1,  0, -1,  0,  3, -5,  1,  2,  1,  2,  0,  0,  2, -5,<br>
+    2,  4,  2,  3,  1,  1,  3, -3,  1,  2,  1,  1,  0,  1,  4, -2,<br>
+    4, -3, -4, -1,  3,  3,  1,  3,  4, -4, -4, -1,  3,  2,  0,  2,<br>
+    4, -3, -4,  0,  2,  2, -1,  1,  4, -3, -2,  1,  2,  1, -2,  0,<br>
+    2, -4, -2,  1,  2,  0, -3,  0,  2, -3, -2,  0,  1,  0, -2,  2,<br>
+    3, -1, -1,  0,  0,  0,  0,  3,  2, -2, -2, -2, -1, -1, -1,  2,<br>
+    2,  2,  3,  4,  3,  1,  0, -1,  1,  0,  1,  2,  1, -1, -2, -2,<br>
+    2,  1,  2,  1,  1,  0, -1, -1,  4,  3,  4,  3,  2,  1,  1,  1,<br>
+    3,  2,  2,  2,  1,  1,  1,  1, -1, -2, -1,  0, -1, -1, -1, -1,<br>
+   -3, -3, -2, -1, -2, -2, -2, -2, -4, -4, -3, -3, -4, -4, -3, -3,<br>
+    2,  1, -1, -3, -4, -2,  3,  4,  2,  2,  1, -1, -3, -2,  1,  2,<br>
+    1,  2,  3,  3,  0, -2, -1, -2, -1,  0,  2,  4,  2,  0, -1, -3,<br>
+   -2, -2,  0,  3,  3,  2,  0, -3,  0, -2, -3, -1,  1,  2,  2, -1,<br>
+    3, -1, -4, -5, -3,  0,  2,  0,  6,  3, -2, -6, -5,  0,  3,  1,<br>
+   -2,  3, -2,  0,  3, -2, -2,  1, -3,  4, -3,  0,  3, -2, -1,  2,<br>
+   -3,  5, -3,  0,  4, -2, -1,  2, -2,  4, -4, -1,  3, -3, -2,  2,<br>
+   -3,  4, -3,  0,  3, -3, -1,  2, -2,  5, -2,  0,  3, -3, -1,  2,<br>
+   -2,  4, -3,  1,  3, -2, -1,  2, -2,  3, -2,  1,  3, -2,  0,  2,<br>
+    1,  0,  0, -1,  1,  2, -4, -1,  2,  0,  0, -1,  1,  2, -4, -2,<br>
+    1,  1,  1, -1,  2,  4, -2,  0,  0, -1,  1, -1,  2,  5, -1,  1,<br>
+    0, -1,  0, -2,  1,  5, -1,  1,  0, -1, -1, -2,  0,  3, -3, -1,<br>
+    1,  1,  0, -2,  0,  3, -3, -1,  1,  1,  0, -3,  0,  3, -2,  0,<br>
+    1,  0, -1,  1,  1,  2,  4,  5,  1,  0, -1,  1,  1,  1,  5,  7,<br>
+    0,  0, -2, -1, -1,  0,  3,  5,  0, -1, -2, -1, -1, -1,  2,  3,<br>
+    0, -1, -3, -1, -1, -1,  1,  2, -1, -2, -4, -2, -2, -2,  0,  0,<br>
+   -1, -2, -2, -1, -2, -2,  0,  0,  0, -1, -1,  0, -1, -1,  0,  0,<br>
+    3,  3,  0, -1, -1,  1,  4,  4,  2,  3,  0, -2, -2,  0,  1,  1,<br>
+    2,  3,  1, -1, -1,  0,  1,  0,  1,  2,  0, -1, -1, -1,  0, -2,<br>
+    0,  1,  0, -1, -2, -1,  0, -2,  0,  1,  0, -1, -2, -1,  1,  0,<br>
+    1,  1, -1, -3, -4, -3,  1,  3,  1,  2, -1, -3, -5, -4,  1,  3,<br>
+   -3, -2,  0,  1,  1,  1,  0, -2,  0,  1,  1,  1,  0,  0, -1, -3,<br>
+    1,  2,  1,  1,  0, -1, -1, -2,  0, -1, -3, -1, -1, -1,  0, -1,<br>
+    0, -3, -6, -3, -2, -1,  1,  1,  2, -1, -4, -3, -2,  0,  2,  2,<br>
+    5,  4,  1,  1,  0,  1,  3,  2,  5,  4,  2,  1,  0, -1,  0,  1,<br>
+   -2,  0, -2, -5, -6, -3,  0,  0, -2,  0,  1,  0, -1,  1,  2,  2,<br>
+   -2,  0,  1,  3,  2,  2,  2,  1, -2,  0,  2,  4,  3,  2,  1,  1,<br>
+   -2,  0,  2,  3,  2,  0, -1,  0, -3, -1,  1,  1,  0, -1, -1,  1,<br>
+   -4, -1,  1,  0, -1, -2,  0,  2, -4, -1,  0, -1, -1, -2,  1,  4,<br>
+   -3,  0,  0, -1,  1,  1,  1,  0, -3,  1,  0, -1,  0,  0, -1, -1,<br>
+   -1,  3,  3,  0,  1,  0,  0,  1, -3,  2,  2, -2, -1,  0,  0,  1,<br>
+   -5,  0,  0, -2, -1,  1,  0,  2, -7, -2,  1,  0,  1,  2,  2,  2,<br>
+   -5,  0,  3,  2,  3,  3,  2,  2, -3,  2,  4,  1,  0,  0, -2, -3,<br>
+    5,  2, -2, -2,  0, -1, -1, -1,  2, -1, -4, -3, -1, -2, -1, -1,<br>
+    0, -2, -2,  1,  2, -1,  0,  1, -1, -2, -1,  3,  3, -1,  0,  2,<br>
+    1,  0,  0,  3,  3, -2, -1,  2,  2,  1,  1,  3,  2, -2, -2,  0,<br>
+    1,  0, -1,  1,  1, -3, -3, -2,  1,  0,  1,  2,  3,  0,  0,  0,<br>
+   -4, -5, -3,  0,  1, -1, -2, -1, -2, -3, -1,  1,  2,  0,  0,  0,<br>
+    1,  1,  2,  1,  2,  1,  1,  1,  3,  4,  3,  1,  0, -2, -1, -1,<br>
+    3,  3,  2,  0, -2, -3, -3, -2,  1,  1,  0, -1, -2, -4, -2, -2,<br>
+    2,  1,  0,  0,  0, -1,  0,  1,  2,  1,  1,  1,  1,  1,  1,  3,<br>
+    0,  0,  0, -1, -2, -1,  1,  0, -2, -1, -1, -2, -3, -2,  0,  0,<br>
+   -1,  0,  0, -1, -2,  0,  1,  1,  1,  1,  0, -1, -1,  1,  3,  1,<br>
+    2,  2,  0, -2, -1,  2,  3,  0,  3,  1, -1, -1,  1,  4,  2, -2,<br>
+    2,  0, -3, -1,  3,  5,  0, -5,  1, -1, -2,  0,  3,  3, -1, -6,<br>
+   -1,  0,  3,  4,  2,  0,  1,  2, -2, -1,  0,  1, -1, -2,  0,  1,<br>
+   -2, -3, -2, -3, -6, -7, -6, -3,  2,  2,  3,  1, -1, -2, -3, -2,<br>
+    2,  2,  3,  1,  0,  0,  0,  0,  2,  1,  1,  0,  1,  1,  0,  1,<br>
+    1,  0,  0,  0,  0,  1,  1,  2,  1,  0, -1,  0,  0,  2,  2,  1,<br>
+    1,  1,  3,  1, -1, -1, -1,  1, -2, -1,  0,  0, -2, -2, -1,  2,<br>
+   -2, -2,  1,  1,  1,  0,  1,  3, -2, -2,  0, -1,  0, -1,  0,  2,<br>
+    0,  0,  1,  0, -1, -1, -2,  1,  3,  2,  2,  1,  0, -2, -2,  1,<br>
+    5,  3,  3,  2,  1,  1,  1,  4,  0, -3, -4, -5, -4, -3, -1,  1,<br>
+   -6, -4, -1,  2,  2,  0,  0, -1, -4, -2,  1,  3,  3,  2,  2,  0,<br>
+   -3, -2, -1,  2,  3,  3,  2,  0, -3, -2, -2,  1,  2,  1,  1, -1,<br>
+   -2, -2, -2,  0,  2,  2,  1, -1, -1, -1, -1,  1,  2,  3,  2,  0,<br>
+   -1, -1, -2,  1,  2,  2,  2, -1,  0, -1, -2,  0,  2,  1,  0, -1,<br>
+    6,  4,  2,  1,  0,  0,  0,  1,  4,  2, -1, -2, -2, -2, -1, -1,<br>
+    2,  1, -1, -2, -2, -2, -2, -1,  2,  2,  0, -2, -2, -2, -1,  0,<br>
+    0,  0, -1, -2, -2, -1,  0,  1, -3, -3, -2, -1, -1, -2, -1,  0,<br>
+   -3, -2,  2,  3,  2,  0, -1, -2, -2,  0,  4,  5,  5,  2,  0, -1,<br>
+    5,  4,  2,  0, -1, -2, -1, -1,  4,  3,  2,  1,  0, -1,  0, -1,<br>
+    1,  1,  0,  1,  1,  0,  1, -1, -2, -1, -1,  0,  0, -2, -2, -3,<br>
+   -1,  0,  0,  0, -1, -3, -3, -5,  0,  1,  1, -1, -1, -2, -2, -3,<br>
+   -1, -1, -1, -2, -1,  1,  3,  1, -1, -2, -2, -1,  2,  5,  6,  5,<br>
+   -3, -3, -2,  1,  1, -2, -1, -1,  1,  2,  3,  4,  1, -3, -1, -3,<br>
+    3,  2,  0,  1, -1, -3, -1, -3,  1,  0, -1,  0, -1, -1,  1,  0,<br>
+    1,  1,  0,  1,  2,  2,  5,  3,  1,  1,  1,  2,  2,  2,  3,  0,<br>
+   -3, -1, -2, -2, -3, -3, -1, -3, -1,  1,  1,  0, -1, -1,  0, -2,<br>
+    2,  0, -2, -2,  2,  4,  1, -2,  1,  0, -2, -1,  3,  5,  2, -1,<br>
+   -1, -2, -3, -2,  1,  3,  1, -2, -1, -2, -1, -1,  0,  2,  1, -1,<br>
+    0,  0,  1,  1,  1,  2,  2,  0,  0,  1,  4,  4,  2,  2,  3,  1,<br>
+   -2, -1,  2,  1, -2, -3, -2, -3, -1,  0,  1,  0, -3, -4, -4, -5,<br>
+    4,  0, -3, -4, -4, -4, -2, -1,  5,  0, -1,  0, -1, -3, -2, -1,<br>
+    4,  0,  0,  1,  1,  0,  0,  0,  0, -3, -2, -1,  0,  0,  1,  0,<br>
+    0, -2,  0,  0,  1,  1,  2,  1,  2,  0,  0,  0,  1,  1,  1,  0,<br>
+    2,  0, -1, -1,  1,  1,  1,  0,  1, -1, -2, -2,  0,  2,  2,  2,<br>
+   -3, -5, -2,  0, -1, -3, -3,  0,  0, -2,  0,  2,  2,  0,  0,  3,<br>
+    2, -1, -2,  0,  0, -1, -1,  2,  5,  2, -1, -1, -1, -1, -1,  2,<br>
+    5,  2,  0, -1, -1,  0, -1,  2,  2,  1,  0,  0,  0,  1,  0,  2,<br>
+   -1, -1,  1,  1,  2,  2,  1,  2, -3, -2,  0,  0,  0,  0, -2, -1,<br>
+    0,  3,  2,  0, -2, -3, -3, -3,  0,  3,  3,  1,  0,  0,  1,  2,<br>
+   -1,  0, -1, -2, -1, -1,  1,  3, -1,  0, -1, -2, -1, -1,  0,  2,<br>
+   -1,  0, -1, -2,  0,  0, -1,  2, -1,  0, -1, -2, -1, -1, -2,  1,<br>
+    0,  1,  0, -3, -1, -1, -1,  2,  5,  5,  2, -1, -1, -1,  1,  3,<br>
+    0,  0,  1, -1, -3, -2,  0,  2,  1,  1,  3,  0, -2, -2,  0,  1,<br>
+    1,  1,  3,  1,  0,  0, -1, -1,  0, -1,  2,  1,  1,  0, -1, -3,<br>
+   -1, -2,  1,  1,  1,  0, -2, -4, -1,  0,  2,  1,  1,  0, -1, -3,<br>
+    1,  1,  3,  2,  1,  0, -2, -3,  2,  2,  4,  2,  1, -1, -2, -4,<br>
+    1,  2,  2,  2,  0, -2,  0,  2, -1, -1, -2, -3, -4, -5, -3,  1,<br>
+    0,  1,  1,  0, -1, -1, -1,  1,  0,  1,  1,  1,  0,  0,  0,  2,<br>
+    0,  1,  1,  2,  1,  1,  1,  2, -1, -1,  0,  2,  2,  2,  2,  3,<br>
+   -2, -4, -4, -1, -2, -2, -2,  0,  1,  0,  0,  1,  0,  0,  0,  1,<br>
+    0, -1, -3, -2,  0,  2,  2,  1,  0, -1, -2, -3,  0,  1,  1,  2,<br>
+    1,  0, -2, -3, -1,  0,  0,  1, -1,  0, -1, -2,  0,  0, -1,  0,<br>
+   -1,  1,  1,  0,  2,  2,  0,  0,  0,  2,  3,  1,  3,  5,  3,  2,<br>
+   -1,  1,  1, -2,  0,  3,  1,  1, -1,  0,  0, -4, -4, -1, -1, -1,<br>
+   -1,  1,  1,  0,  1,  2,  1,  2, -3,  0,  1,  0,  1,  1,  0,  2,<br>
+   -5, -3, -1, -1,  0,  1,  0,  1, -4, -3, -2, -3, -2, -1, -1,  0,<br>
+    0,  0, -1, -2, -2, -2, -2,  0,  3,  4,  2,  0,  0,  0,  0,  1,<br>
+    2,  1,  0,  0,  0,  0, -1,  0,  0,  1,  2,  3,  4,  4,  3,  2,<br>
+   -1,  4,  7,  4,  0,  0,  0,  0, -1,  4,  6,  3,  0,  1,  1,  1,<br>
+    0,  3,  4,  0, -1,  0,  0,  1,  0,  1,  1, -2, -1,  0, -1, -1,<br>
+   -1,  0, -1, -1, -1,  0,  0,  0, -1, -1, -1,  0,  0,  0,  0,  0,<br>
+   -1, -3, -3,  0,  1, -1, -2, -1, -3, -4, -4, -2, -1, -2, -2, -1,<br>
+    2,  2,  1,  0,  1,  1,  0, -3, -2, -1,  0,  0,  1,  1,  0, -3,<br>
+   -2, -1,  0,  1,  2,  1,  1, -2,  1,  2,  2,  2,  3,  3,  2, -1,<br>
+    1,  2,  1,  0,  1,  1,  2, -1,  0,  1, -2, -4, -2,  0,  1, -1,<br>
+    1,  1, -1, -3, -2,  0, -1, -3,  1,  2,  0, -1,  0,  1, -1, -4,<br>
+   -1, -1, -2, -2,  0,  3,  4,  3,  1,  1, -1, -3, -2,  0,  0,  0,<br>
+    2,  2,  2,  2,  2,  1, -1, -1,  1,  1,  1,  3,  3,  0, -2, -2,<br>
+    0, -1, -1, -1,  0, -2, -1, -1, -1, -3, -4, -3, -2, -2,  0,  2,<br>
+   -1, -1,  0,  1,  2,  2,  3,  5, -2, -1, -1,  0,  0,  0,  0,  1,<br>
+   -2, -3,  2,  0,  0,  1,  1, -1, -1, -4,  1, -2, -1,  2,  2,  0,<br>
+    1, -4,  0, -2, -2,  1,  1, -1,  2, -3,  1, -1, -1,  1,  1, -1,<br>
+    3, -2,  3,  1,  0,  1,  1, -1,  1, -3,  2,  1,  0,  1,  0, -1,<br>
+   -1, -5,  1,  0, -1,  0,  1,  1,  0, -3,  3,  3,  1,  2,  3,  3,<br>
+    0, -1, -2,  1,  5,  5,  2, -1,  1, -1, -2, -1,  1,  1, -2, -5,<br>
+    1,  1, -1, -2, -1, -1, -1, -3,  1,  1, -1, -1, -1,  2,  4,  3,<br>
+   -1, -1, -1, -1, -1,  0,  4,  3, -1, -1,  0,  1, -1, -3, -1, -1,<br>
+    0,  0,  0,  2,  2,  0,  0, -1,  0, -2, -3,  0,  1,  1,  3,  2,<br>
+    2,  3,  2,  1,  0,  0, -2, -2,  2,  3,  0,  1,  1,  3,  3,  2,<br>
+    0,  0, -3, -1, -1,  2,  2,  3, -2, -2, -3,  1,  1,  2,  1,  1,<br>
+   -2, -1, -2,  2,  1,  1, -1, -2,  0,  1,  0,  2,  0,  0, -2, -2,<br>
+    0,  1,  0,  2,  0,  0, -2, -2, -3, -2, -2,  0, -1, -2, -2, -3,<br>
+    0,  1, -1,  3, -1,  1,  3, -1,  0,  1, -1,  3, -1, -1,  2, -3,<br>
+    1,  1, -2,  3, -1, -3,  0, -3,  2,  2, -2,  3,  0, -2,  1, -2,<br>
+    1,  1, -3,  3, -1, -2,  1, -3,  1,  1, -3,  3,  0, -1,  1, -2,<br>
+    1,  2, -1,  4,  0, -1,  1, -2,  0,  1, -1,  3, -1, -3,  0, -3,<br>
+   -3, -3, -1,  1,  2,  1, -1, -2, -2, -2,  0,  2,  1,  0, -2, -2,<br>
+   -3, -2,  1,  2,  1, -1, -2, -1, -3, -2,  2,  4,  0, -2, -2,  1,<br>
+   -3, -1,  2,  4,  0, -2, -2,  2, -1,  1,  4,  3, -1, -3, -2,  2,<br>
+    0,  2,  4,  2, -1, -2, -1,  2,  0,  1,  2,  0, -1,  0,  1,  3,<br>
+    3,  0, -5,  1,  4,  0,  0,  1,  1, -2, -5,  2,  5, -1, -2,  1,<br>
+   -1,  0,  0,  3,  3,  1,  0, -1, -2,  3,  4, -2, -3, -1,  0, -2,<br>
+   -3,  3,  5, -3, -3,  0,  0, -2, -1,  3,  2, -2, -2,  2,  2, -1,<br>
+    2,  0,  0, -1,  0,  0,  0,  0,  0, -3, -2,  1,  3,  0, -2, -2<br>
+};<br>
+<br>
+static const int8 *const s_svq1InterCodebooks[6] = {<br>
+    s_svq1InterCodebook4x2, s_svq1InterCodebook4x4,<br>
+    s_svq1InterCodebook8x4, s_svq1InterCodebook8x8,<br>
+    0, 0<br>
+};<br>
+<br>
+static const int8 s_svq1IntraCodebook4x2[768] = {<br>
+   12, 13, 13, 11, -7,-10,-15,-17,-16,-15,-12,-10, 11, 15, 15, 12,<br>
+    2, 17, 20, 15,-45,-24,  2, 13, 21, 20, -6,-36, 12, 16, -1,-27,<br>
+  -18,-21, 10, 45,-11,-20, -7, 21, 43, -8,-28,  0, 33,-16,-28,  3,<br>
+  -12,-18,-18, -6,-20,-10, 28, 55, -5,-18,-21,-18, 56, 30, -6,-20,<br>
+  -34, 27, 29,-22,-30, 29, 26,-25, 30, 34, 33, 26,-25,-31,-35,-33,<br>
+  -31,-35,-36,-32, 29, 36, 37, 31,-71,-12, 38, 34,-63, -1, 42, 33,<br>
+   58, 37,-31,-60, 55, 34,-33,-61,-57,-57, 22, 93,-57,-58, 21, 93,<br>
+   59, 69, 70, 62,-63,-68,-68,-60,-64,-71,-71,-64, 63, 73, 72, 62,<br>
+   -2,  0,  7, 15,-11,-10, -3,  5, -5, -8,-10,-10,  1,  9, 14,  9,<br>
+   15,  8, -4,-11, 12,  2,-11,-12, -8,  0, 19, 28,  4, -1,-15,-26,<br>
+  -15, 27,  2,-14,-14, 22,  1, -9, -4, -6,-13,-10, -6,-14,  6, 47,<br>
+  -35,-20,  6, 23,  6,  9,  6,  4, -6,  2, 23,-22, -7,  4, 28,-21,<br>
+   20,-22, -2,  6, 22,-28, -5,  8,-10,-18,-16,-12, 36, 19,  2, -1,<br>
+   -3,  0,  4,  8,-45,-10, 23, 23, 40, 15,-20,-35, -4, -1,  4,  1,<br>
+    9, -5,-33, 24,  8,  3,-26, 19, -1,  4,  6, -3, 32, 25,-13,-49,<br>
+   24, 24, 15,  7,-17,-27,-19, -7,-47,  0, 39, 24,-21, -6,  7,  4,<br>
+   -1,  0,-10,-13,  1,  1,  5, 16, 20,  5, -3, -9, -1, -4, -2, -6,<br>
+  -17, -7,  1,  4, 12,  7,  0,  0,  3,  0, 12, 11, -3,  1,  0,-23,<br>
+    4, 17, -6,  0,  6,  3,-25,  0,-17, 10,  8,  5,-14,  4,  1,  4,<br>
+   13, 10,  4,  2,-23, -9,  1,  2,  3, -3,  1,  7,  1,-23, -7, 20,<br>
+   -7,-18,  2, 12, -5, -4, 10,  9,  4, 10,  7,-24,  6,  3,  4,-10,<br>
+   22,-14,-22,  6,  0,  5,  5, -1, -4,  3,-11, -4, -7, 31,  7,-14,<br>
+   -5,-16, -1, 42, -4, -2, -9, -5,  5, -8, -6, -3, 42, -4,-21, -5,<br>
+  -18, 12, 20,-12, 13,-13,-10,  7, -8, -9, -2,-18,-16,  6, 40,  8,<br>
+   10, -1,  0,  4, -3,  4, -1,-13, -2,  6,  1,-15,  5,  3,  1,  2,<br>
+   -4, -2,  1,  3, 15,  0, -9, -4, -3, -4, -4, -4, -3,  5, 16, -3,<br>
+    2, 13,  3,  4, -3, -8,-10,  0, -6, -2, -4, -1, -2, -3, -6, 23,<br>
+    6, -6,  7,  1,  4,-18,  5,  1, -1,  1,-15, 14, -5,  6, -4,  4,<br>
+    2,  2,  2,  6,-24,  2,  7,  3,-26,  0,  3,  3,  5,  7,  1,  6,<br>
+   14, -2,-18, -3,  7,  5, -4,  2, -6,  3, 32,  1, -6, -6, -6,-12,<br>
+    5,-36,  7,  6,  9, -1, 11,  0,  4,  4,  5,  3,  4, 15,  3,-38,<br>
+   10, 23, -5,-42,  0,  4,  4,  4, 23, 17, -6,-13,-13,-37,  1, 29,<br>
+    5,-14, -1,  1,  5,  0,  3,  1,  0,  4, -5,  2,  8,  0,  0,-10,<br>
+    4,  7, -2, -3,-10,  3,  1,  1,-12, -1, 13,  3,  0, -1,  1, -3,<br>
+    0, -1,  3,  1, -6, -9,  3,  9, -6,  1, -4, -6,  8, -1,  0,  8,<br>
+   -3, -3,  0, 18, -5, -1, -4, -1, -8, -2,  3, -4,  0, 17, -1, -5,<br>
+    5, -2,  9,-10,  1, -5,  6, -5,  4,  2,  2,  3, 10,-14, -8,  1,<br>
+   -1, -2,-18, -1, -1, 20,  1,  2, -1,  1, -9,  1, -1, -9, 22, -4,<br>
+    6, -4,  8, -3, -1,  7,-19,  5, -7, 31, -4, -4, -6,  0, -5, -5,<br>
+   -7, -8,-19, -4,  1,  1,  4, 32, 38, -1, -8,  4, -7, -8, -6,-12,<br>
+   -1,  0, -7,  1, -1,  9, -1,  0,  9, -1, -1,  0,  2, -6,  1, -3,<br>
+  -12,  0,  2,  1,  1,  1,  8,  0,  9,  1,  0,  2, -2,  1,-11,  0,<br>
+    0,  8,  2,-10, -1,  2, -1,  0, -2, -4,  0, -5, -2, -1, -1, 14,<br>
+   -3,  7, -1,  5,  0,-10,  1,  1, -1, -5, 14, -1, -2,  1, -3, -2,<br>
+   -6,  0,  0,  6,  2,  3, -9,  4,  4, -5, -1, -1, -7,  3,  8, -1,<br>
+    2, -4, -1,-11, 11,  2,  1,  0, -1,  2,  3,  9,  0,  2,  0,-15,<br>
+    3,  5,-20,  3,  3, -1,  3,  3,  1, -1, 16,  1,  2,-29,  9,  2,<br>
+  -13, -6, -1, -3, 36, -1, -8, -3,  2,  5,  4,  2,-37,  9, 11,  3<br>
+};<br>
+<br>
+static const int8 s_svq1IntraCodebook4x4[1536] = {<br>
+  -11, -3,  3,  6,-10, -1,  5,  7, -9, -1,  6,  7, -9, -1,  4,  6,<br>
+    5,  7,  0,-14,  6,  9,  2,-15,  6,  9,  2,-15,  4,  6,  0,-14,<br>
+   16,  3, -5, -6, 16,  1, -8, -8, 14, -1, -9, -9, 12,  0, -8, -8,<br>
+    8, 12, 16, 17, -2,  2,  6,  9,-10, -8, -4,  0,-15,-14,-11, -7,<br>
+   -7,-10, -2, 16, -7,-11, -3, 18, -7,-11, -1, 20, -6, -8,  1, 19,<br>
+   -9,-13,-16,-17,  2, -2, -7, -9, 11,  8,  4, -1, 16, 15, 11,  7,<br>
+  -22, -2, 13, 15,-24, -2, 14, 16,-25, -4, 13, 15,-25, -6, 10, 13,<br>
+   26, 26, 22, 16, 17, 15,  9,  3, -2, -6,-11,-14,-20,-25,-28,-28,<br>
+  -27,-27,-25,-21,-16,-15,-11, -7,  3,  8, 12, 13, 23, 28, 31, 30,<br>
+   20, 16, -7,-33, 22, 19, -6,-35, 22, 19, -6,-34, 20, 17, -6,-32,<br>
+  -20,-20,  2, 38,-21,-22,  2, 40,-21,-22,  2, 40,-20,-20,  3, 38,<br>
+  -47, -4, 24, 26,-50, -3, 26, 27,-50, -3, 26, 27,-47, -4, 24, 26,<br>
+   45,  6,-23,-27, 48,  5,-25,-28, 48,  5,-26,-28, 44,  6,-24,-27,<br>
+  -30,-36,-10, 76,-31,-37,-11, 78,-31,-37,-11, 78,-31,-36,-10, 77,<br>
+  -53,-32, 35, 52,-54,-34, 36, 52,-54,-34, 36, 52,-53,-33, 34, 51,<br>
+  -93,-34, 62, 65,-93,-34, 62, 66,-93,-34, 62, 65,-93,-34, 60, 64,<br>
+   -7,  0,  2,  2, -8, -1,  3,  3, -8,  0,  4,  5, -6,  1,  5,  5,<br>
+    3,  7, 11, 11,  2,  2,  3,  3,  1, -2, -6, -7,  1, -5,-11,-13,<br>
+    3, -2, -4, -3,  7,  0, -5, -5, 12,  4, -5, -7, 14,  6, -4, -7,<br>
+   18, 14,  3, -2,  6,  4,  0, -3, -8, -5, -2,  0,-16,-11, -2,  2,<br>
+   -8, -6,  7, 18, -7, -8,  2, 13, -4, -6, -2,  6,  0, -4, -3,  1,<br>
+    1, -3,-13,-18,  0, -1, -5, -7, -1,  1,  6,  7, -2,  4, 15, 17,<br>
+  -15,-14, -7, -2, -6, -5, -1,  0,  6,  6,  3,  1, 15, 13,  6,  1,<br>
+    2, -2,-11, 10,  2, -1,-12, 11,  3, -1,-12, 11,  2, -2,-11, 11,<br>
+   -9, 14, -1, -5, -9, 15, -2, -5, -8, 16, -2, -5, -7, 15, -1, -4,<br>
+    2,  6,  8,  8, -2,  3,  9, 12,-11, -5,  4, 10,-19,-16, -8,  0,<br>
+   14,  8, -7,-15, 12,  7, -7,-14,  8,  5, -4, -9,  5,  3, -1, -4,<br>
+   12,-14, -2,  2, 13,-15, -1,  3, 14,-15, -1,  3, 13,-14, -1,  3,<br>
+    0,  6, 10,-13,  0,  6, 10,-15,  0,  7,  9,-17,  1,  6,  8,-16,<br>
+   -8, -5, 15, -2, -8, -6, 17, -2, -8, -6, 16, -3, -8, -5, 15, -2,<br>
+   -9,-11,-11,-10,  9, 10,  9,  8,  8, 10, 10,  9, -8, -9, -8, -7,<br>
+    9, 10,  9,  7, -8,-10,-10,-10, -7,-10,-11,-11, 11, 12, 11,  8,<br>
+    0, 10,  7,  0,  0,  7,  0, -6,  0,  2, -5, -6, -2, -1, -4, -1,<br>
+    5,  0, -6, -9,  2,  2,  2,  1, -2,  0,  5,  7, -6, -5,  1,  4,<br>
+    3, -8,  2, -1,  4, -9,  3,  0,  5, -7,  3,  0,  7, -5,  3,  0,<br>
+   -5, -3,  2,  9, -6, -3,  1,  8, -6, -3,  1,  7, -5, -2,  0,  4,<br>
+   13,  8,  3,  1, -3, -5, -4, -1, -8, -7, -3,  0, -1,  1,  3,  2,<br>
+    3,  2, -5,-12,  4,  3, -2, -9,  3,  4,  1, -4,  3,  5,  4, -1,<br>
+   -9, -8, -4,  0,  8,  6,  2,  0, 10,  8,  3,  0, -6, -5, -3, -1,<br>
+   -3, -9,-12, -5,  0, -3, -5,  0,  2,  3,  2,  4,  5,  8,  7,  6,<br>
+   -1, -2,  5, 12, -1, -1,  5,  9,  2,  1, -1, -2,  2, -1,-11,-17,<br>
+   -7,  3,  3, -1, -9,  3,  4, -1,-10,  4,  6, -1, -9,  5,  7,  0,<br>
+  -18, -7,  2,  2, -8,  1,  5,  3,  3,  4,  1,  0,  9,  5, -2, -3,<br>
+   -2,  0,  6,  8, -4, -5, -5, -3,  1, -2, -6, -8, 10,  9,  3, -1,<br>
+    0, -2, -2,  0,  0, -4, -5,  0, -2, -8, -4,  8, -5, -7,  6, 24,<br>
+    9,  1, -7,  1,  9,  1, -8,  1,  8,  0,-10,  1,  8, -1,-11, -1,<br>
+    8,  8,  6,  3,  5,  4,  3,  2, -2, -3, -1,  0,-10,-13, -8, -4,<br>
+    0,  4,  2, -3,  0,  6,  3, -5,  3, 10,  2,-12,  5, 10, -4,-22,<br>
+    0, -4, -1,  3,  1, -4, -1,  5,  1, -5,  0,  8, -1, -6, -2,  7,<br>
+   -1, -1, -2, -4, -1, -2, -4, -6, -1, -1, -1, -2,  1,  5, 10,  9,<br>
+   10,  3,  0, -2,  6, -1, -2, -5,  3, -1, -2, -6,  2,  0,  0, -5,<br>
+    6,  3,  0,  0,  6,  3,  1,  1,  4, -2, -2,  1,  0, -9, -9, -2,<br>
+  -11, -3,  1,  2, -6,  2,  4,  5, -3,  2,  3,  4, -2,  1,  1,  2,<br>
+   -6, -4, -1, -2,  2, -1, -1, -2, 10,  2, -2, -2, 11,  2, -4, -1,<br>
+    6,  0, -2,  2,  3,  3,  0,  0, -6,  3,  3,  0,-17, -1,  5,  0,<br>
+   -1,  4, 10, 11, -3, -2,  0,  1, -3, -4, -5, -3, -1, -2, -2, -1,<br>
+    2, -3, -9,-12,  3,  3,  3,  2,  2,  2,  4,  4,  2,  1, -1, -2,<br>
+   -2,  9,  5,-10, -3,  5,  5, -5, -2,  1,  2,  0, -1, -2, -2,  1,<br>
+   -2, -3,  7, -2, -1, -3,  7, -3, -1, -2,  8, -4, -2, -2,  7, -3,<br>
+    1, -8, -3, 12,  2, -2, -2,  4,  1,  3,  0, -5, -1,  5,  2, -7,<br>
+   -1,  3,  1, -5, -7, -2,  3,  1, -2, -7, -2,  2, 20,  3, -5, -1,<br>
+    5,  0, -3, -2, -7, -7,  0,  6, -6,  0,  7,  6,  2,  6,  0, -7,<br>
+   -2,  6, -7,  1, -2,  7, -8,  3, -2,  7, -7,  3, -1,  7, -6,  2,<br>
+   -5, -2,  5,  7,  4,  1, -4, -8,  6,  3, -2, -5, -7, -5,  3,  7,<br>
+   -1, -1,  6,  5,  0, -1,  1, -4,  2,  1,  0, -7,  1,  0,  0, -4,<br>
+   -8,  0,  3,  1, -2,  1, -1, -1,  1, -1, -3,  1,  1, -2,  1,  9,<br>
+    5,  2, -3, -4, -1,  0, -1, -3, -3,  1,  3,  1, -4,  0,  4,  2,<br>
+    2, -2, -2, 12,  0, -2, -5,  3, -1,  0, -3,  1, -3, -1, -2,  1,<br>
+    1,  5,  3,  0, -6, -4, -2,  1,  0, -2, -2,  2,  6,  1, -4, -1,<br>
+   -3, -5, -5, -1,  3,  5,  5,  4,  0,  3,  1, -1, -2,  1, -2, -3,<br>
+    2, -4, -5, -3,  4, -2, -3, -2,  6,  0, -1, -1,  7,  1,  0,  0,<br>
+   -3, -2, -2,  0, -2, -3, -5, -1, -2,  2,  0, -1, -1, 11,  9, -1,<br>
+    0,  1, -1,-10, -1,  1,  0, -6,  1,  0,  1,  4,  2, -5, -1, 13,<br>
+   -2,  4,  5,  0, -5,  1,  6,  3, -6, -2,  3,  2, -5, -2,  0, -2,<br>
+   -1,  1,  1, -2, -1, -2,  0,  2,  5,  5,  5,  7,  0, -4, -8, -7,<br>
+    0,  2, -1, -5, -1,  2,  2, -3,  0,  5,  3, -5,  3,  8,  2,-12,<br>
+    8,  4,  0, -2, 10, -1, -4, -1,  3, -6, -3,  0, -4, -5,  0,  0,<br>
+    0,-10, -4,  2, -1, -6,  3,  5, -1, -3,  6,  4,  0, -2,  4,  2,<br>
+    0,  8,  1, -1,  0, 11,  1, -3, -1,  6, -2, -4, -3, -2, -7, -4,<br>
+    0, -1, -1, -1,  4,  5,  6,  5, -5, -9, -8, -5,  2,  2,  3,  2,<br>
+    0,  2,  6,  1,  2,  0,  3,  0,  1, -2, -1, -2,  0, -1, -3, -6,<br>
+    0,  0,  2,  0,  4,  0,  2,  1,  5, -2,  0,  0, -2, -9, -1,  2,<br>
+    0,  1,  0,-10, -1,  1,  8,  0, -1, -2,  4,  0,  1, -1,  2, -1,<br>
+   -3, -2,  2, -1, -3, -1,  2, -3,  0, -1,  1,  0,  8,  1, -1,  3,<br>
+    0,  1,  1,  2,  0, -4, -2,  0, -1, -5,  1, -1, -2, -1, 11,  2,<br>
+    1,  5, -2, -2,  0,  2, -4,  0, -2,  1, -5,  1,  0,  5,  0,  1,<br>
+   -5, -3,  0,  6, -4,  2,  0,  0, -3,  5,  1,  0, -3,  3,  0,  0,<br>
+    3, -2, -3,  1,  1, -4,  0,  8, -2, -3, -2,  3,  1,  2, -1, -1,<br>
+    1,  1,  0,  2,  2,  0,  1,  6,  1, -1,  2,  1,  0,  3,  0,-19,<br>
+    1, -3, -2,  2,  6,  5, -2, -7, -3,  1,  3,  1, -1, -1,  0,  2,<br>
+   -8, -1, -1, -4,  1,  1, -1,  2,  4,  3,  2,  3, -5,  1,  3,  0,<br>
+    0,  2, -1,  1, -3,  0,  0,  5, -5, -2,  0,  8, -4, -4, -4,  6,<br>
+    1,  2,  1,  2,  2,  2, -3,  2,  4,  0, -9,  0,  7,  0,-11,  1,<br>
+    0,  0,  0, -2,  3,  3, -1, -6,  4,  3, -3,-10, -1,  2,  6,  2,<br>
+    7, -2, -3,  5, -4,  0,  3, -1, -4,  2,  1, -7,  2, -1, -1,  3,<br>
+    3,  2,  2,  2, -5, -7, -7, -5,  5,  6,  4,  2, -2, -1,  0,  1<br>
+};<br>
+<br>
+static const int8 s_svq1IntraCodebook8x4[3072] = {<br>
+    5,  6,  6,  6,  7,  7,  8,  8,  0,  0,  0,  0,  0,  1,  2,  3,<br>
+   -3, -4, -4, -5, -5, -4, -3, -2, -4, -4, -4, -5, -4, -4, -3, -3,<br>
+    1,  2,  2,  2,  2,  3,  3,  3,  2,  3,  3,  4,  4,  5,  5,  5,<br>
+   -1,  0,  1,  1,  2,  3,  4,  4, -9,-10, -9, -9, -8, -7, -6, -5,<br>
+   -4, -4, -5, -6, -6, -7, -7, -7,  0, -1, -2, -2, -3, -3, -4, -4,<br>
+    4,  4,  3,  3,  2,  1,  1,  0,  7,  7,  7,  6,  6,  5,  4,  4,<br>
+    2,  4,  5,  6,  4,  1, -3, -6,  3,  4,  5,  5,  4,  0, -5, -8,<br>
+    2,  3,  4,  4,  2, -2, -7,-10,  2,  2,  2,  1,  0, -4, -9,-12,<br>
+   -9, -7, -3,  1,  4,  4,  3,  3,-10, -7, -2,  3,  5,  5,  3,  3,<br>
+   -9, -6, -2,  3,  6,  5,  4,  3, -8, -6, -1,  3,  4,  4,  3,  2,<br>
+   -5, -5, -5, -5, -3,  1,  4,  7, -5, -5, -5, -4, -2,  1,  6,  8,<br>
+   -4, -5, -4, -3, -1,  3,  8, 10, -3, -4, -3, -2,  1,  5,  9, 11,<br>
+   -2, -2, -2, -2, -2, -2, -2, -2, -4, -5, -5, -5, -5, -5, -5, -4,<br>
+   -3, -4, -4, -4, -4, -4, -4, -3,  9, 10, 10, 11, 11, 11, 10, 10,<br>
+    7,  4,  1, -2, -4, -6, -9,-10,  9,  7,  3,  0, -2, -4, -8, -9,<br>
+   11,  8,  4,  2,  0, -3, -6, -8, 11,  9,  5,  3,  1, -2, -5, -7,<br>
+  -13,-13,-13,-12,-11,-10, -8, -8,  0,  1,  2,  3,  4,  4,  4,  3,<br>
+    3,  4,  5,  6,  6,  6,  5,  4,  3,  4,  4,  4,  3,  3,  3,  2,<br>
+   10, 10, 11, 10,  9,  9,  8,  7,  6,  6,  6,  6,  5,  4,  3,  2,<br>
+    0,  0,  0, -1, -2, -3, -4, -4,-10,-10,-11,-12,-13,-14,-14,-14,<br>
+   16, 16, 17, 16, 15, 13, 12, 11, -1, -2, -3, -4, -4, -4, -4, -3,<br>
+   -4, -5, -6, -6, -6, -6, -6, -6, -5, -6, -6, -6, -6, -6, -5, -5,<br>
+  -13,-13,-13,-12,-11,-10, -8, -6, -9, -8, -7, -6, -4, -2,  0,  1,<br>
+   -2, -1,  1,  3,  5,  7,  8,  9,  5,  7,  9, 11, 13, 14, 15, 15,<br>
+   16, 14, 11,  7,  2, -3, -7, -9, 14, 12,  8,  3, -1, -6, -9,-11,<br>
+   11,  9,  4,  0, -4, -8,-11,-13,  8,  5,  1, -3, -6,-10,-12,-14,<br>
+  -18,-15, -9, -3,  1,  6,  9, 11,-17,-13, -7, -1,  3,  7, 11, 12,<br>
+  -15,-11, -5,  1,  5,  9, 12, 13,-13, -9, -3,  2,  5,  9, 11, 13,<br>
+   22, 21, 19, 15, 10,  3, -4, -9, 20, 18, 15,  9,  2, -5,-12,-17,<br>
+   16, 13,  8,  1, -7,-14,-20,-24, 10,  6, -1, -8,-15,-21,-25,-27,<br>
+  -25,-23,-20,-14, -7,  1,  9, 14,-23,-21,-16, -9,  0,  9, 16, 21,<br>
+  -20,-16,-10, -1,  8, 16, 22, 25,-15,-11, -3,  6, 14, 20, 25, 27,<br>
+   -4, -2,  0,  1,  2,  2,  2,  2, -5, -2,  0,  2,  3,  3,  3,  3,<br>
+   -6, -4, -1,  1,  2,  3,  3,  3, -7, -5, -2,  0,  1,  1,  2,  2,<br>
+    2,  1,  1,  1,  1,  0, -2, -3,  3,  3,  2,  1,  0, -1, -3, -4,<br>
+    4,  3,  2,  1,  0, -2, -4, -6,  5,  4,  3,  1, -1, -3, -5, -6,<br>
+    5,  6,  6,  4,  2,  0, -2, -3,  3,  4,  4,  4,  3,  1,  0, -1,<br>
+   -2, -2, -1, -1, -1, -1, -2, -2, -5, -4, -3, -2, -2, -2, -3, -3,<br>
+   -1, -1, -1, -1, -1, -1, -1, -1, -3, -4, -4, -4, -3, -3, -3, -3,<br>
+   -1, -1, -1, -1, -1, -1, -1, -2,  5,  6,  6,  6,  6,  5,  4,  3,<br>
+    4,  4,  4,  4,  4,  5,  6,  7,  0, -1, -1, -1, -1,  0,  1,  2,<br>
+   -2, -3, -3, -3, -3, -2, -1,  0, -3, -3, -4, -4, -4, -3, -2, -1,<br>
+    0, -2, -4, -4, -2,  0,  2,  3,  0, -2, -3, -3, -1,  2,  4,  5,<br>
+   -1, -2, -4, -3,  0,  3,  5,  6, -2, -3, -4, -3, -1,  2,  4,  5,<br>
+    9,  4,  0, -3, -3, -1,  0,  1,  8,  4, -1, -4, -3, -1,  1,  2,<br>
+    6,  2, -3, -5, -4, -2,  0,  1,  5,  1, -3, -4, -4, -2,  0,  1,<br>
+    5,  3,  1, -1, -4, -8,-10,-10,  3,  3,  2,  1,  0, -2, -3, -4,<br>
+    1,  1,  1,  2,  3,  2,  1,  0, -1,  0,  1,  2,  3,  4,  3,  2,<br>
+    0,  1,  2,  2,  1, -1, -3, -3,  0,  1,  1,  1, -1, -2, -4, -3,<br>
+   -3, -3, -3, -3, -3, -3, -1,  2, -4, -4, -3,  0,  3,  7, 12, 14,<br>
+   -5, -5, -6, -6, -6, -6, -6, -5,  2,  2,  2,  1,  0,  0,  0,  0,<br>
+    4,  4,  3,  2,  1,  0,  0,  0,  6,  6,  5,  4,  2,  2,  1,  1,<br>
+   -7, -7, -6, -3,  0,  4,  7,  8, -1, -2, -3, -3, -2, -1,  1,  2,<br>
+    3,  3,  1, -1, -2, -2, -2, -1,  6,  6,  4,  2,  0, -2, -2, -2,<br>
+   -6, -5, -2,  2,  5,  9, 11, 12, -4, -4, -2,  0,  2,  4,  5,  6,<br>
+   -3, -2, -2, -2, -2, -1,  0,  1, -2, -2, -2, -3, -3, -3, -3, -2,<br>
+   -7, -3,  1,  3,  3,  0, -3, -5, -6, -2,  3,  5,  4,  1, -3, -5,<br>
+   -5, -1,  4,  6,  5,  2, -3, -4, -4,  0,  5,  7,  6,  3, -1, -3,<br>
+    0,  0,  0,  0,  0,  0,  0,  0, -2, -2, -3, -3, -3, -3, -2, -1,<br>
+    6,  7,  8,  9,  9,  8,  7,  6, -4, -4, -5, -5, -6, -6, -5, -4,<br>
+   -9, -8, -6, -4,  0,  3,  6,  6, -5, -4, -1,  3,  5,  6,  5,  3,<br>
+    1,  3,  6,  6,  4,  1, -2, -5,  6,  7,  5,  1, -3, -7,-10,-11,<br>
+   10,  9,  5,  1, -3, -6, -6, -4,  5,  3, -1, -5, -6, -5, -2,  2,<br>
+   -2, -4, -6, -6, -4,  1,  6, 10, -6, -7, -7, -4,  1,  7, 11, 12,<br>
+    6,  5,  3,  2,  0,  0,  0,  0,  2,  1, -1, -2, -3, -2, -1, -1,<br>
+    0, -1, -2, -4, -4, -2, -1,  1,  0,  0, -1, -2, -1,  0,  2,  3,<br>
+    0, -1, -2, -2, -2, -2, -1, -1,  5,  4,  2,  1,  0,  0,  0,  0,<br>
+    6,  5,  3,  1,  0,  0,  0,  0,  2,  0, -2, -4, -4, -3, -2, -2,<br>
+   -7, -4,  0,  2,  2,  2,  2,  1, -7, -3,  0,  0,  0,  0,  0,  0,<br>
+   -4, -1,  1,  1,  0,  0,  0,  1, -1,  1,  2,  2,  2,  2,  3,  3,<br>
+   -2,  0,  2,  2,  1,  1,  1,  1, -1,  1,  2,  2,  1,  0,  0, -1,<br>
+    0,  2,  4,  2,  0, -1, -2, -3,  1,  2,  3,  1, -2, -4, -6, -6,<br>
+    1,  2,  2,  4,  5,  6,  4,  1,  0, -1, -1, -1,  0,  0, -2, -4,<br>
+    0,  0, -1, -2, -2, -2, -4, -6,  2,  1,  0,  0,  1,  1, -1, -3,<br>
+    1,  1,  1,  1,  1,  2,  3,  3,  0,  0,  1,  0,  1,  2,  4,  4,<br>
+   -1, -1, -1, -1,  0,  1,  2,  3, -4, -4, -5, -5, -5, -3, -1,  0,<br>
+   -6, -5, -5, -4, -3, -2, -1, -1, -1,  0,  0,  1,  1,  2,  3,  3,<br>
+    0,  1,  1,  1,  2,  2,  3,  4,  0,  0, -1, -1,  0,  1,  2,  3,<br>
+    0,  1,  1,  1,  0,  0, -1, -1,  1,  3,  3,  2,  1, -1, -2, -2,<br>
+   -2,  0,  2,  2,  2,  2,  1,  1, -9, -8, -4, -2,  1,  3,  3,  3,<br>
+   -1, -1, -1, -2, -3, -3, -3, -4,  0,  0,  0, -1, -2, -2, -3, -3,<br>
+    2,  2,  2,  0, -1, -1, -1, -1,  5,  5,  4,  3,  2,  2,  2,  2,<br>
+    6,  3, -1, -4, -3, -1,  1,  1,  2, -1, -3, -4, -1,  2,  2,  0,<br>
+   -1, -2, -2,  1,  4,  4,  1, -3, -2, -1,  1,  4,  6,  3, -3, -8,<br>
+    3,  3,  2,  1, -1, -2, -2, -2, -4, -4, -2, -1,  1,  3,  4,  4,<br>
+   -4, -5, -5, -4, -2,  0,  2,  2,  7,  7,  4,  1, -1, -2, -3, -2,<br>
+   -1,  1,  3,  0, -4, -6,  0,  6, -2,  1,  4,  1, -4, -6, -1,  7,<br>
+   -3,  1,  4,  2, -3, -6, -1,  6, -2,  0,  3,  2, -2, -5, -1,  4,<br>
+    1, -1, -2,  1,  4,  4, -1, -7,  1, -1, -4, -1,  5,  6,  0, -6,<br>
+    3,  0, -4, -3,  3,  6,  2, -4,  3,  0, -5, -4,  1,  4,  1, -3,<br>
+    2,  2,  3,  3,  3,  3,  2,  2, -4, -5, -6, -7, -7, -7, -7, -6,<br>
+    1,  2,  3,  3,  3,  3,  2,  2,  0,  0,  1,  1,  1,  2,  2,  1,<br>
+    3, -3, -3,  3,  4, -2, -2,  2,  3, -4, -4,  4,  4, -4, -4,  2,<br>
+    4, -4, -4,  4,  4, -4, -3,  3,  3, -3, -4,  3,  3, -3, -3,  3,<br>
+   -2, -2, -2, -2, -2, -2, -1, -1,  6,  7,  8,  8,  8,  7,  6,  5,<br>
+   -5, -6, -7, -7, -8, -7, -6, -5,  1,  1,  2,  2,  2,  2,  1,  1,<br>
+    0,  0,  0,  0,  0, -1,  0,  0, -1,  0,  0,  0,  0, -1,  0,  0,<br>
+   -2, -3, -2, -2, -2, -3, -3, -3,  2,  3,  5,  6,  4,  2,  1,  0,<br>
+    8,  6,  2,  0,  0,  0,  0,  0,  4,  1,  0,  0,  0, -1, -1, -1,<br>
+    1, -1,  0,  0,  0, -1, -2, -3, -2, -2, -1,  0,  0, -2, -4, -5,<br>
+    3,  1, -1, -2, -3, -4, -5, -5,  2,  1,  0,  0,  1,  1,  0,  0,<br>
+    0, -1, -1,  0,  2,  2,  2,  2, -1, -2, -1,  1,  2,  2,  2,  2,<br>
+    0, -1, -2, -1, -1, -1, -1,  0, -1, -2, -2, -1, -1,  0,  0,  1,<br>
+    2,  1,  1,  2,  2,  1,  1,  0,  6,  5,  3,  1,  0, -2, -4, -4,<br>
+   -3, -2, -1,  0,  1,  1,  0, -1,  0,  1,  3,  4,  5,  5,  3,  1,<br>
+   -1, -1, -1,  0,  1,  0, -1, -2, -2, -2, -2, -1,  0, -1, -2, -3,<br>
+    0, -1, -2, -2, -1, -1,  0,  2,  1, -1, -2, -1, -1, -1,  0,  2,<br>
+    1,  0, -2, -2, -2, -2,  1,  5,  1, -1, -2, -2, -2,  0,  5, 10,<br>
+    0,  0,  0,  0,  0, -1, -1, -1, -1, -1, -1,  0,  0,  0,  1,  2,<br>
+    1,  2,  2,  3,  4,  4,  6,  5, -3, -3, -3, -2, -2, -3, -3, -3,<br>
+    1, -1, -2, -2,  0,  3,  5,  7,  2,  0, -2, -3, -2,  0,  2,  3,<br>
+    3,  1, -2, -3, -3, -2, -1, -1,  3,  1,  0, -1, -1, -1, -1, -1,<br>
+    1,  3,  5,  4,  2, -1, -3, -4, -3, -2,  1,  2,  1,  0, -1, -2,<br>
+   -5, -3,  0,  2,  2,  1,  0,  0, -3, -1,  1,  2,  2,  1,  0,  0,<br>
+    0, -1, -1, -1,  1,  2,  3,  4, -3, -4, -4, -3, -1,  0,  0,  1,<br>
+   -2, -3, -2, -1,  1,  1,  1,  1, -2, -2,  0,  3,  4,  4,  3,  2,<br>
+   -4, -4, -3, -2, -1,  1,  2,  3,  0,  1,  1,  1, -1, -2, -3, -3,<br>
+    3,  4,  5,  4,  2, -1, -3, -3, -2, -2,  0,  2,  2,  2,  1,  0,<br>
+   -4,  0,  5,  7,  4, -1, -4, -4, -1,  2,  4,  3,  0, -3, -3, -2,<br>
+    2,  1,  0, -1, -2, -2,  0,  1,  0,  0, -1, -2, -2, -1,  1,  2,<br>
+   -4, -3, -2, -1,  0,  1,  2,  2, 10,  9,  5,  0, -3, -4, -3, -2,<br>
+    1, -1, -2, -2, -1,  0,  0,  0, -2, -2, -1,  1,  1,  1,  0, -1,<br>
+   -5, -3,  0,  3,  4,  2,  0, -2, -2, -1,  0,  1,  1,  0, -1, -1,<br>
+    3,  2, -1, -2, -2, -1,  1,  1,  7,  5, -1, -5, -6, -2,  2,  4,<br>
+   -2,  3,  3, -3, -4,  1,  2, -2, -3,  3,  4, -3, -4,  2,  3, -2,<br>
+   -3,  3,  4, -3, -4,  2,  3, -2, -4,  2,  4, -2, -3,  1,  2, -1,<br>
+    4,  3, -1, -3, -3, -1,  1,  2, -4, -6, -4,  0,  4,  5,  4,  1,<br>
+    0,  2,  5,  6,  2, -3, -5, -4,  1,  1, -1, -3, -5, -2,  2,  4,<br>
+   -1,  0,  1,  2,  2,  3,  3,  4, -1,  0,  1,  1,  0, -1, -1, -1,<br>
+   -1,  0,  1,  2,  2,  1, -1, -2, -3, -2, -1,  0,  0, -1, -2, -3,<br>
+    1,  1,  1,  1,  0,  0,  1,  2,  1,  0, -1,  0,  0,  1,  1,  0,<br>
+    1, -2, -4, -1,  1,  2,  1,  0,  1, -4, -7, -3,  1,  3,  2,  1,<br>
+    1,  1,  1,  1,  1,  1,  0, -1,  1,  1,  1,  0,  1,  2,  2,  0,<br>
+    1,  1,  0,  0,  0,  2,  0, -3,  3,  2,  0, -1, -1, -2, -6, -9,<br>
+    0,  0,  0,  1,  0,  0,  1,  2,  1,  0,  0,  0, -1, -1,  0,  2,<br>
+    0,  1,  1,  1, -1, -3, -2,  0, -7, -5,  1,  6,  6,  2, -1, -1,<br>
+    3,  1, -1, -3, -4, -2,  1,  4,  2,  0, -2, -3, -4, -3, -1,  2,<br>
+    2,  2,  1,  1,  1,  0,  0,  1,  1,  1,  0,  0,  0,  0,  0,  1,<br>
+   -1,  1,  1, -2, -5, -6, -4, -1, -1,  1,  4,  3,  2,  0,  1,  2,<br>
+   -1,  0,  2,  3,  1,  0,  0,  1, -1,  0,  1,  0,  0, -1, -1,  0,<br>
+    0,  1,  2,  2,  0, -2, -1,  1, -2, -1, -1, -2, -1,  2,  6,  8,<br>
+   -1, -1, -2, -3, -2,  0,  1,  2, -1,  0,  0, -1, -1,  0, -1, -1,<br>
+    2,  1,  1,  1,  1,  0,  0,  0,  0,  0,  1,  1,  1, -1, -1,  1,<br>
+   -1,  0,  2,  2, -1, -3, -2,  3,  0,  2,  3,  0, -5, -7, -2,  4,<br>
+   -1,  0,  0,  0, -1, -2, -3, -3, -1,  0, -1, -2, -2, -2, -2, -2,<br>
+    1,  1,  0,  0,  1,  2,  0, -1,  1,  2,  1,  2,  5,  6,  2,  0,<br>
+   -2, -4, -3,  0,  2,  2,  0, -3,  3,  1,  0,  1,  2,  1, -2, -3,<br>
+    3,  1,  0,  0,  0,  0,  0, -1,  1, -1, -2, -2, -1,  1,  3,  3,<br>
+    3,  2,  1,  2,  4,  3,  1, -2, -2, -4, -4, -3, -1,  0, -2, -3,<br>
+    1,  0, -1, -1,  0,  1,  0, -1,  3,  2,  0,  0,  0,  1,  1,  0,<br>
+    1,  1,  0,  0,  0,  0,  0,  0,  2,  3,  3,  2,  2,  2,  1,  1,<br>
+    0, -1, -2, -3, -5, -5, -5, -4,  1,  1,  0, -1,  0,  1,  3,  3,<br>
+   -9, -6, -2,  0,  1,  1,  2,  2, -6, -2,  1,  2,  1,  1,  0,  1,<br>
+   -2,  1,  2,  2,  1,  1,  1,  1,  0,  2,  2,  1,  0,  1,  1,  1,<br>
+    1,  0,  0,  0,  0,  0, -1,  0,  0,  0,  0,  0, -1, -3, -2,  0,<br>
+   -3, -3, -3, -2, -1,  3,  7,  9,  1,  2,  2,  2,  0, -2, -4, -3,<br>
+    2,  0, -2, -1,  3,  4, -1, -6,  1,  0, -2, -3, -1,  3,  3,  0,<br>
+    0,  3,  3,  0, -2, -1,  1,  1, -6, -1,  3,  2, -1, -2,  0,  1,<br>
+    5,  3,  0, -2, -3,  0,  2,  1,  1,  1,  2,  2,  0, -2, -4, -7,<br>
+   -3, -2,  1,  2,  2,  1, -1, -4,  2,  2,  0, -2, -2,  0,  2,  2,<br>
+    0,  0, -2, -3, -2, -1,  0,  0,  0,  0,  0,  0,  0,  0,  2,  2,<br>
+   -2, -1,  0,  1,  0,  1,  2,  3, -4, -2,  0,  0, -1,  0,  2,  3,<br>
+   -2, -2, -2, -1, -1,  0,  2,  4,  0,  0,  0,  0, -1, -1,  0,  1,<br>
+    0, -1, -1, -1, -1, -1,  0,  0,  6,  4,  2,  0, -1, -2, -1, -1,<br>
+    0,  1,  1,  1,  1, -1, -5,-10,  1,  1,  1,  1,  1,  1,  0, -4,<br>
+    1,  0,  1,  1,  1,  1,  1, -1,  2,  1,  1,  1,  0,  0,  0,  0,<br>
+   -3,  1,  4,  3,  3,  1, -1,  0, -4,  0,  1,  0, -1,  0,  0,  0,<br>
+   -5,  0,  2,  1,  1,  1,  0, -1, -1,  2,  1, -2, -2, -1,  0, -1,<br>
+    2,  4,  5,  3,  0, -1,  1,  2,  0,  0,  1,  0, -2, -2, -1, -1,<br>
+   -2, -2, -2, -2, -3, -2, -1,  0,  0,  0,  1,  0,  0,  0,  1,  2,<br>
+    0, -2, -2, -3, -1,  2,  2, -1,  1,  0,  0,  0,  1,  5,  3, -2,<br>
+   -1, -1,  0, -1,  0,  2,  0, -5, -1,  0,  1,  0,  0,  2,  2, -2,<br>
+    3,  1, -1, -1,  0,  1,  1,  2,  1,  0,  0,  1,  1,  1,  1,  1,<br>
+  -10, -8, -2,  1,  2,  1,  1,  1, -1,  1,  2,  1,  0,  0,  0,  0,<br>
+   -1, -1,  0,  1,  2,  2,  2,  1, -1, -1, -1,  0, -1, -3, -5, -4,<br>
+    1,  1,  2,  1,  1,  0,  0,  2, -1, -2, -1, -1, -1,  0,  2,  4,<br>
+   -3, -7, -5,  0,  2,  0,  0,  0,  3, -1, -2,  1,  2,  1,  1,  2,<br>
+    1, -2, -1,  1,  2,  1,  0,  1,  0, -1,  0,  3,  2, -1, -1, -1,<br>
+    2,  1,  1,  0,  0,  0,  0,  0, -9, -7, -2,  3,  3,  2,  1,  1,<br>
+    3,  2,  0, -2, -2, -1,  1,  1,  0, -1,  0,  0,  1,  1,  0,  0,<br>
+   -2, -1,  1,  1,  1,  0,  0,  0,  1,  2,  1, -2, -4, -3,  1,  2,<br>
+    1,  2,  1, -2, -3,  0,  3,  1, -1, -1,  0,  0,  1,  3,  0, -4,<br>
+    2,  0, -1,  1,  2, -2, -2,  3,  2,  0, -1,  2,  3, -2, -4,  1,<br>
+    0,  1,  1,  1,  2, -2, -6, -2, -1,  0,  0,  0,  2,  0, -2, -1,<br>
+   -1, -1,  1,  2,  1, -2, -3, -2,  3, -1, -2, -1, -1,  0,  1,  2,<br>
+   10,  4,  0,  0, -1, -2, -2, -1,  3, -1, -2, -1,  0, -1, -1,  0,<br>
+   -5,  2,  7,  1, -4, -2,  1,  0, -2,  2,  3, -1, -3,  0,  2,  0,<br>
+    2,  1,  0,  0,  1,  1, -1, -2,  1, -2, -2, -1, -1, -2,  0,  0,<br>
+    0,  3, -2, -7, -1,  3,  0,  0,  1,  3, -3, -5,  2,  3, -1,  0,<br>
+    0,  2, -2, -2,  4,  2, -2,  0, -1,  1, -1,  0,  2, -1, -2,  1,<br>
+    4,  0, -3, -4, -2,  1,  2,  1,  0,  0,  3,  5,  3,  1, -1, -2,<br>
+    1,  1,  1, -1, -3, -1,  1,  1,  1, -1, -2, -2,  0,  0, -1, -2<br>
+};<br>
+<br>
+static const int8 s_svq1IntraCodebook8x8[6144] = {<br>
+    4,  4,  3,  2,  2,  1,  0, -1,  4,  3,  3,  2,  1,  0, -1, -1,<br>
+    3,  3,  2,  2,  1,  0, -1, -2,  3,  2,  2,  1,  0, -1, -2, -3,<br>
+    2,  2,  1,  0, -1, -1, -2, -3,  2,  1,  0,  0, -1, -2, -3, -4,<br>
+    1,  0,  0, -1, -2, -3, -4, -4,  0,  0, -1, -2, -2, -3, -4, -4,<br>
+    2,  3,  3,  3,  3,  3,  3,  3,  2,  2,  2,  2,  2,  2,  3,  3,<br>
+    1,  2,  2,  2,  2,  2,  2,  2,  0,  1,  1,  1,  1,  1,  1,  1,<br>
+   -1,  0,  0,  0,  0,  0,  1,  1, -2, -2, -1, -1, -1, -1, -1, -1,<br>
+   -3, -3, -3, -3, -3, -3, -2, -2, -5, -4, -4, -4, -4, -4, -4, -3,<br>
+   -4, -2, -1,  0,  1,  2,  2,  3, -4, -2, -1,  0,  1,  2,  3,  3,<br>
+   -4, -3, -1,  0,  1,  2,  3,  3, -4, -3, -1,  0,  1,  2,  3,  3,<br>
+   -5, -3, -1,  0,  1,  2,  3,  3, -5, -3, -1,  0,  1,  2,  3,  3,<br>
+   -5, -3, -1,  0,  1,  1,  2,  3, -5, -3, -2, -1,  0,  1,  2,  3,<br>
+    4,  4,  5,  5,  6,  6,  7,  7,  2,  2,  2,  3,  3,  4,  4,  4,<br>
+    0,  0,  0,  0,  1,  1,  1,  2, -2, -2, -2, -2, -1, -1, -1,  0,<br>
+   -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,<br>
+   -1, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -2, -2, -2, -2,<br>
+    5,  3,  1, -1, -2, -3, -3, -3,  5,  3,  1, -1, -2, -3, -3, -3,<br>
+    5,  3,  1, -1, -2, -3, -3, -3,  5,  3,  1, -1, -2, -3, -3, -3,<br>
+    5,  4,  1,  0, -2, -3, -3, -3,  6,  4,  2,  0, -2, -2, -3, -3,<br>
+    6,  4,  2,  0, -1, -2, -2, -3,  6,  4,  2,  1, -1, -2, -2, -2,<br>
+   -1,  1,  3,  3,  2,  0, -3, -6, -1,  1,  3,  4,  3,  0, -3, -6,<br>
+   -1,  1,  4,  4,  3,  1, -3, -6, -1,  1,  3,  4,  3,  1, -3, -6,<br>
+   -2,  1,  3,  4,  3,  1, -3, -6, -2,  1,  3,  4,  3,  1, -3, -7,<br>
+   -2,  1,  3,  3,  2,  0, -3, -7, -2,  0,  2,  3,  2,  0, -3, -6,<br>
+   10,  9,  8,  6,  6,  5,  4,  4,  6,  5,  4,  3,  2,  2,  2,  1,<br>
+    2,  1,  0, -1, -2, -2, -2, -1, -1, -2, -3, -4, -4, -4, -4, -3,<br>
+   -2, -3, -4, -4, -5, -4, -4, -3, -2, -2, -3, -3, -3, -3, -2, -2,<br>
+   -1, -1, -1, -1, -1, -1, -1,  0,  1,  1,  1,  1,  1,  1,  1,  2,<br>
+   -2, -1,  1,  2,  4,  5,  7,  8, -3, -2,  0,  1,  3,  5,  7,  8,<br>
+   -4, -3, -1,  0,  2,  4,  6,  7, -5, -4, -2, -1,  1,  3,  5,  7,<br>
+   -6, -5, -3, -2,  0,  2,  4,  6, -6, -5, -4, -2, -1,  1,  3,  5,<br>
+   -7, -6, -5, -3, -2,  0,  2,  3, -8, -7, -5, -4, -3, -1,  1,  2,<br>
+   11,  9,  7,  5,  3,  1, -1, -1, 10,  8,  6,  3,  1,  0, -2, -2,<br>
+    9,  7,  5,  2,  0, -2, -3, -4,  8,  6,  3,  1, -1, -3, -4, -4,<br>
+    6,  4,  2, -1, -3, -4, -5, -5,  5,  3,  0, -2, -4, -5, -6, -6,<br>
+    3,  1, -1, -3, -5, -6, -7, -7,  2,  0, -2, -4, -6, -6, -7, -7,<br>
+    5,  6,  7,  7,  7,  8,  8,  8,  3,  4,  5,  5,  6,  6,  6,  6,<br>
+    0,  2,  2,  3,  4,  4,  4,  5, -2, -1,  0,  1,  2,  2,  3,  3,<br>
+   -4, -3, -2, -1,  0,  1,  1,  2, -6, -5, -4, -3, -2, -2, -1,  0,<br>
+   -8, -7, -6, -6, -5, -4, -3, -3,-10, -9, -8, -8, -7, -6, -6, -5,<br>
+    6,  5,  3,  1, -1, -3, -6, -8,  6,  5,  4,  2, -1, -3, -6, -8,<br>
+    6,  5,  4,  2,  0, -3, -6, -8,  6,  5,  4,  2,  0, -3, -6, -8,<br>
+    6,  6,  4,  2,  0, -3, -6, -8,  6,  5,  4,  2,  0, -3, -6, -8,<br>
+    6,  5,  4,  2,  0, -3, -6, -8,  6,  5,  4,  2, -1, -3, -5, -8,<br>
+   11, 10,  9,  8,  7,  6,  5,  4,  8,  8,  7,  6,  5,  4,  3,  2,<br>
+    6,  5,  4,  4,  2,  2,  1,  0,  3,  3,  2,  1,  0,  0, -1, -2,<br>
+    1,  1,  0, -1, -2, -2, -3, -3, -1, -1, -2, -3, -4, -4, -5, -5,<br>
+   -3, -4, -4, -5, -6, -6, -7, -7, -5, -5, -6, -7, -8, -8, -8, -8,<br>
+  -14,-13,-12,-11, -9, -7, -6, -4,-12,-11,-10, -9, -7, -5, -3, -1,<br>
+  -10, -9, -7, -6, -3, -2,  0,  2, -8, -6, -4, -2,  0,  2,  4,  5,<br>
+   -5, -3,  0,  2,  4,  5,  7,  8, -2,  0,  2,  4,  6,  8,  9, 10,<br>
+    0,  3,  5,  7,  8, 10, 11, 12,  3,  5,  7,  8, 10, 11, 12, 12,<br>
+  -19,-19,-18,-18,-17,-16,-15,-14,-15,-15,-14,-13,-12,-11,-10, -9,<br>
+  -11,-10, -9, -8, -6, -5, -4, -3, -6, -5, -3, -2, -1,  0,  1,  2,<br>
+   -1,  0,  2,  3,  4,  5,  6,  6,  4,  6,  7,  8,  9, 10, 10, 10,<br>
+    9, 10, 11, 12, 13, 14, 14, 14, 12, 14, 14, 15, 16, 16, 16, 16,<br>
+   22, 21, 19, 17, 14, 11,  9,  5, 20, 19, 17, 14, 11,  8,  4,  1,<br>
+   17, 15, 13, 10,  6,  3,  0, -4, 13, 11,  8,  5,  1, -2, -5, -9,<br>
+    9,  6,  3, -1, -4, -7,-11,-13,  4,  0, -3, -6, -9,-12,-15,-17,<br>
+   -2, -5, -8,-11,-14,-16,-18,-20, -8,-10,-13,-16,-17,-19,-21,-22,<br>
+   17, 18, 18, 18, 17, 16, 16, 14, 16, 16, 15, 15, 14, 13, 12, 11,<br>
+   12, 12, 11, 10,  9,  8,  7,  5,  7,  6,  6,  4,  3,  2,  1, -1,<br>
+    1,  0, -1, -2, -3, -4, -5, -6, -5, -6, -7, -8, -9,-10,-11,-12,<br>
+  -11,-12,-13,-14,-15,-16,-16,-17,-16,-17,-17,-18,-19,-20,-20,-20,<br>
+    0,  0,  0,  0, -1, -1, -2, -3,  1,  0,  0,  0,  0, -1, -2, -3,<br>
+    1,  1,  0,  0, -1, -1, -2, -2,  1,  1,  1,  0,  0, -1, -1, -2,<br>
+    2,  1,  1,  1,  0, -1, -1, -2,  2,  2,  1,  1,  0,  0, -1, -2,<br>
+    2,  2,  1,  1,  1,  0, -1, -1,  2,  2,  1,  1,  1,  0,  0, -2,<br>
+    0, -1, -1,  0,  0,  1,  2,  3,  0, -1, -1,  0,  1,  1,  2,  2,<br>
+   -1, -1, -1, -1,  0,  1,  2,  2, -1, -1, -2, -1,  0,  1,  1,  2,<br>
+   -1, -2, -2, -1,  0,  0,  1,  2, -1, -2, -2, -2, -1,  0,  1,  2,<br>
+   -1, -1, -2, -1,  0,  0,  1,  2, -1, -1, -1, -1,  0,  1,  1,  2,<br>
+    3,  2,  2,  2,  1,  1,  0,  0,  3,  2,  2,  2,  2,  1,  0,  0,<br>
+    2,  2,  2,  1,  1,  1,  0,  0,  2,  2,  1,  1,  1,  0,  0, -1,<br>
+    1,  1,  1,  0,  0,  0, -1, -1,  0,  0, -1, -1, -1, -1, -1, -1,<br>
+   -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -2, -2, -2, -2,<br>
+    5,  2,  0,  0, -1,  0,  0,  0,  4,  2,  0, -1, -1, -1,  0, -1,<br>
+    4,  1, -1, -1, -2, -1, -1, -1,  4,  1, -1, -1, -2, -1, -1, -1,<br>
+    4,  1, -1, -2, -2, -1, -1, -1,  4,  1, -1, -2, -2, -1, -1, -1,<br>
+    4,  1, -1, -1, -1, -1, -1, -1,  4,  2,  0, -1,  0,  0,  0, -1,<br>
+   -2, -1,  0,  1,  1,  1,  1,  1, -3, -1,  0,  1,  1,  1,  1,  1,<br>
+   -3, -1,  0,  1,  1,  1,  1,  1, -3, -1,  0,  1,  1,  1,  1,  1,<br>
+   -3, -2,  0,  1,  2,  2,  1,  1, -4, -2,  0,  1,  2,  2,  2,  2,<br>
+   -5, -3, -1,  1,  1,  2,  1,  2, -5, -3, -2,  0,  1,  1,  1,  1,<br>
+    3,  3,  1,  0, -2, -4, -4, -5,  3,  3,  2,  0, -1, -2, -3, -4,<br>
+    2,  2,  1,  1,  0, -1, -2, -2,  1,  1,  1,  1,  1,  0,  0,  0,<br>
+    0,  0,  0,  1,  1,  1,  1,  1, -2, -1, -1,  0,  0,  1,  2,  2,<br>
+   -3, -2, -2, -1,  0,  1,  2,  3, -3, -3, -2, -1,  0,  1,  2,  3,<br>
+   -3, -3, -3, -3, -3, -2, -2, -2, -3, -3, -2, -2, -2, -1, -1, -1,<br>
+   -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0,<br>
+    0,  0,  0,  0,  1,  1,  1,  1,  0,  0,  1,  1,  2,  2,  2,  2,<br>
+    1,  1,  1,  2,  2,  3,  3,  3,  2,  2,  2,  2,  3,  3,  3,  3,<br>
+   -8, -7, -5, -3, -2, -1,  0, -1, -4, -3, -1,  0,  1,  2,  1,  1,<br>
+   -1,  1,  2,  3,  3,  2,  2,  1,  1,  2,  3,  3,  2,  2,  1,  0,<br>
+    2,  3,  3,  2,  1,  0,  0, -1,  1,  2,  1,  0, -1, -1, -1, -1,<br>
+    1,  1,  0, -1, -1, -2, -2, -1,  1,  1,  0,  0, -1, -1,  0, -1,<br>
+   -4, -3, -2,  0,  1,  2,  3,  3, -4, -3, -2,  0,  1,  2,  2,  2,<br>
+   -3, -3, -2, -1,  0,  1,  1,  1, -2, -2, -2, -1, -1,  0,  0,  0,<br>
+    0, -1, -1, -1, -1, -1, -1, -1,  2,  1,  1,  0,  0, -1, -1, -2,<br>
+    3,  3,  3,  1,  0, -1, -2, -2,  5,  4,  4,  2,  1,  0, -1, -2,<br>
+    0,  0,  0,  0,  1,  2,  3,  3,  0, -1,  0,  0,  1,  2,  3,  3,<br>
+    0, -1,  0,  0,  1,  2,  3,  2,  0,  0,  0,  1,  1,  2,  2,  2,<br>
+    2,  1,  1,  1,  1,  1,  1,  0,  2,  2,  2,  1,  0,  0, -1, -2,<br>
+    2,  1,  0,  0, -2, -3, -5, -6,  0, -1, -1, -3, -5, -6, -8, -9,<br>
+   -2,  0,  1,  2,  2,  1, -1, -4, -2,  0,  2,  2,  2,  1, -1, -4,<br>
+   -2,  0,  2,  2,  2,  1, -1, -3, -2,  0,  2,  2,  2,  1, -1, -3,<br>
+   -2, -1,  2,  2,  2,  1, -1, -3, -2, -1,  1,  2,  2,  1, -1, -3,<br>
+   -3, -1,  1,  2,  2,  1, -1, -3, -2, -1,  1,  2,  2,  1, -1, -3,<br>
+   -1,  1,  1, -1, -3, -3,  0,  4, -1,  1,  1, -1, -3, -3,  0,  4,<br>
+   -1,  1,  1,  0, -3, -3,  0,  4, -1,  1,  2,  0, -3, -3,  0,  5,<br>
+    0,  1,  2,  0, -3, -4,  0,  4,  0,  1,  2,  0, -3, -4,  0,  5,<br>
+    0,  1,  2,  0, -3, -3,  0,  4,  0,  1,  2, -1, -2, -2,  0,  4,<br>
+    6,  6,  5,  6,  5,  5,  5,  5,  2,  2,  2,  2,  2,  2,  2,  2,<br>
+    0,  0,  0,  0,  0,  0,  0,  0, -1, -1, -1, -1, -2, -2, -2, -2,<br>
+   -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,<br>
+   -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
+    2,  2,  2,  2,  2,  2,  2,  2,  0,  1,  1,  0,  0,  0,  0,  0,<br>
+   -1, -2, -2, -2, -2, -2, -2, -1, -3, -3, -3, -3, -3, -3, -3, -2,<br>
+   -3, -4, -4, -3, -3, -3, -2, -2, -2, -2, -2, -2, -1, -1,  0,  0,<br>
+    0,  1,  1,  1,  2,  2,  3,  3,  3,  4,  4,  5,  5,  6,  6,  6,<br>
+    4,  1, -2, -3, -3, -1,  1,  3,  4,  1, -2, -4, -3, -1,  1,  3,<br>
+    5,  1, -2, -4, -3, -1,  1,  4,  5,  1, -2, -3, -3, -1,  2,  4,<br>
+    5,  1, -2, -3, -3, -1,  2,  4,  4,  0, -3, -4, -3, -1,  2,  4,<br>
+    4,  0, -3, -3, -3, -1,  1,  3,  3,  0, -2, -3, -2, -1,  1,  3,<br>
+   -3, -4, -4, -4, -4, -4, -4, -4, -1, -1, -1, -1, -1, -1, -2, -2,<br>
+    2,  1,  1,  2,  2,  1,  1,  1,  3,  3,  3,  4,  4,  3,  3,  3,<br>
+    3,  3,  3,  4,  4,  4,  3,  3,  1,  2,  1,  2,  2,  2,  2,  2,<br>
+   -2, -2, -2, -1, -1, -1,  0,  0, -4, -4, -4, -4, -3, -3, -3, -3,<br>
+   -1, -2, -3, -3, -2, -2, -1,  0,  0, -1, -2, -2, -2, -1,  0,  1,<br>
+    2,  1, -1, -1, -1, -1,  0,  1,  3,  1,  0, -1, -1,  0,  0,  1,<br>
+    3,  2,  0, -1,  0,  0,  0,  1,  3,  1,  0, -1,  0,  0,  0,  1,<br>
+    3,  1,  0, -1,  0,  0,  0,  1,  2,  1,  0,  0,  0,  0,  0,  1,<br>
+    0,  0,  0,  1,  1,  2,  3,  4,  0,  0, -1,  0,  0,  0,  2,  3,<br>
+    0, -1, -1, -1, -1, -1,  0,  1,  0, -1, -1, -1, -1, -1, -1,  0,<br>
+    0,  0, -1, -1, -1, -2, -2, -1,  1,  0,  0, -1, -1, -2, -2, -1,<br>
+    2,  2,  1,  0, -1, -1, -1, -1,  3,  3,  2,  1,  0, -1, -1,  0,<br>
+    1,  0,  1,  0,  0, -1, -2, -1,  0,  0,  0,  0, -1, -1, -2, -1,<br>
+    0, -1,  0,  0, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0,<br>
+   -1, -1, -1,  0,  0,  0,  1,  1, -1, -1, -1,  0,  1,  1,  2,  3,<br>
+   -2, -2, -1,  0,  1,  2,  3,  4, -2, -2, -1,  0,  1,  2,  4,  5,<br>
+   -3, -1,  1,  0,  0, -1,  0,  1, -3,  0,  1,  0, -1, -1,  0,  2,<br>
+   -3,  0,  1,  0, -1, -1,  0,  2, -2,  1,  2,  0, -1, -1,  0,  2,<br>
+   -2,  1,  2,  0, -1, -1,  0,  2, -2,  1,  2,  0, -1, -1,  0,  2,<br>
+   -1,  2,  2,  0, -1, -1,  0,  2, -1,  1,  1,  0, -1, -1, -1,  1,<br>
+   -2, -2, -1,  1,  3,  4,  3,  1, -2, -2, -1,  0,  2,  3,  2,  0,<br>
+   -2, -2, -1,  0,  1,  2,  1, -1, -1, -1, -1,  0,  1,  2,  1, -1,<br>
+   -1, -1, -1,  0,  1,  1,  0, -2,  0, -1, -1,  0,  1,  1,  0, -1,<br>
+    0, -1, -1,  0,  1,  1,  1, -1,  0, -1, -1,  0,  0,  1,  0, -1,<br>
+   -2, -1,  0,  1,  1,  1,  1,  1, -2, -1,  0,  0,  0,  0,  0,  0,<br>
+   -2, -1, -1,  0, -1, -1, -2, -2, -2, -1, -1, -1, -1, -2, -2, -3,<br>
+   -1,  0,  1,  1,  0, -1, -2, -2,  1,  2,  3,  3,  2,  1,  0,  0,<br>
+    1,  2,  3,  3,  3,  2,  1,  0,  0,  0,  1,  1,  1,  1,  0,  0,<br>
+    0, -1, -1, -1,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  1,  1,<br>
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  1,  1,  1,  1,<br>
+    1,  1,  1,  1,  1,  1,  1,  1, -1,  0,  0,  1,  1,  0,  0,  0,<br>
+   -3, -2, -1, -1, -1, -1,  0, -1, -5, -5, -4, -3, -2, -2, -2, -1,<br>
+    1,  1,  1,  1,  2,  1,  0, -1,  1,  1,  1,  2,  1,  1,  0, -1,<br>
+    1,  1,  1,  1,  1,  1,  0, -2,  2,  1,  1,  1,  1,  1,  0, -2,<br>
+    1,  1,  0,  0,  0,  0, -1, -3,  1,  1,  0,  0,  0, -1, -2, -3,<br>
+    1,  1,  0,  0, -1, -1, -2, -4,  1,  0,  0, -1, -2, -2, -3, -4,<br>
+    8,  7,  5,  3,  2,  1,  1,  1,  2,  1,  0,  0, -1, -1, -2, -1,<br>
+   -1, -1, -1, -2, -2, -2, -2, -1, -1, -1, -1, -1,  0, -1, -1,  0,<br>
+    0,  0,  0,  1,  1,  0,  0,  0,  0,  0,  1,  1,  1,  0,  0,  0,<br>
+   -1,  0,  0,  0,  0,  0, -1, -1, -2, -2, -1, -1, -1, -2, -2, -1,<br>
+    9,  4,  0, -2, -2, -2, -1, -1,  7,  2, -1, -2, -2, -1,  0,  0,<br>
+    4,  0, -2, -2, -1,  0,  1,  1,  1, -2, -2, -2, -1,  0,  1,  1,<br>
+   -1, -2, -2, -1,  0,  1,  1,  1, -1, -2, -1,  0,  1,  1,  1,  0,<br>
+   -1, -1,  0,  1,  1,  1,  0, -1,  0, -1,  0,  1,  0,  0, -1, -1,<br>
+    0,  1,  1,  1,  1,  1,  0,  0,  1,  2,  2,  2,  1,  0,  0,  0,<br>
+    2,  2,  2,  2,  1,  0, -1, -1,  1,  1,  1,  0, -1, -2, -2, -2,<br>
+    0,  0,  0, -1, -2, -3, -2, -2, -1, -1, -1, -2, -2, -2, -1,  0,<br>
+   -1, -1, -1, -1,  0,  0,  1,  2, -1, -1, -1,  0,  1,  2,  3,  4,<br>
+   -1, -1,  0,  0, -1, -2, -3, -3, -1, -1,  0,  0,  0, -1, -1, -1,<br>
+   -2, -2, -1,  0,  1,  1,  1,  1, -2, -2, -2,  0,  1,  2,  3,  3,<br>
+   -1, -1, -1,  0,  1,  3,  3,  3,  1,  0,  0,  0,  1,  1,  2,  2,<br>
+    2,  2,  1,  0,  0, -1, -1, -1,  3,  2,  1,  0, -1, -2, -3, -3,<br>
+   -1, -1, -1, -2, -2, -3, -4, -5,  0,  0,  0, -1, -1, -3, -3, -4,<br>
+    1,  1,  1,  0,  0, -1, -2, -3,  2,  2,  2,  1,  1,  0, -1, -1,<br>
+    2,  2,  2,  2,  1,  1,  0, -1,  2,  2,  2,  2,  2,  1,  0,  0,<br>
+    1,  1,  2,  1,  1,  1,  0,  0,  0,  0,  1,  1,  0,  0,  0, -1,<br>
+   -2,  2,  3,  1, -1,  1,  1, -1, -3,  2,  3,  0, -1,  1,  1, -1,<br>
+   -3,  2,  3,  0, -1,  1,  1, -1, -4,  2,  3,  0, -1,  1,  1, -2,<br>
+   -4,  1,  3,  0, -1,  1,  1, -2, -4,  1,  3, -1, -2,  1,  1, -2,<br>
+   -3,  1,  2,  0, -1,  1,  1, -2, -3,  1,  2,  0, -1,  1,  1, -1,<br>
+   -1, -1, -1, -2, -2, -2, -2, -2,  1,  1,  1,  1,  0,  0,  0,  0,<br>
+    1,  2,  2,  2,  2,  2,  2,  2,  0,  0,  1,  1,  1,  2,  2,  2,<br>
+   -2, -2, -1, -1, -1,  0,  0,  0, -3, -3, -3, -3, -3, -3, -3, -2,<br>
+   -1, -1, -1, -1, -2, -2, -2, -2,  4,  4,  4,  4,  4,  3,  3,  2,<br>
+   -3, -3, -2, -1,  0,  1,  2,  5, -3, -3, -3, -2, -1,  1,  3,  6,<br>
+   -3, -3, -2, -2,  0,  2,  3,  5, -3, -2, -2, -2,  0,  1,  3,  5,<br>
+   -2, -2, -2, -1, -1,  1,  3,  5, -2, -2, -1, -1,  0,  1,  2,  4,<br>
+   -1, -1, -1, -1,  0,  1,  1,  4, -1, -1, -1, -1,  0,  1,  2,  3,<br>
+    0, -1,  0,  1,  1,  0, -1, -1,  0,  0,  0,  1,  2,  0, -1, -1,<br>
+    1,  0, -1,  0,  1,  0,  0,  0,  1, -1, -2, -1,  0,  0,  0,  0,<br>
+    1, -2, -3, -1,  0,  0,  0,  1,  1, -1, -3, -2,  0,  1,  1,  2,<br>
+    1, -1, -2, -1,  0,  1,  1,  2,  2,  0, -1,  0,  1,  1,  2,  2,<br>
+    1,  1,  1,  1,  0,  0,  1,  2, -1,  0,  0, -1,  0,  0,  0,  1,<br>
+   -3, -2, -1, -1, -1,  0,  1,  1, -4, -2, -1,  0,  0,  1,  1,  1,<br>
+   -3, -2,  0,  0,  1,  1,  1,  1, -3, -1,  0,  1,  1,  1,  0,  0,<br>
+   -1,  0,  1,  1,  1,  0,  0, -1,  0,  1,  2,  2,  1,  0,  0, -1,<br>
+   -4, -4, -4, -3, -2, -1, -1, -1, -2, -2, -2, -1,  0,  0,  0,  0,<br>
+   -1,  0,  0,  0,  1,  1,  1,  1,  0,  0,  1,  1,  1,  1,  1,  1,<br>
+    0,  0,  1,  1,  2,  2,  1,  0,  0,  0,  1,  1,  1,  1,  1,  0,<br>
+    0,  0,  0,  1,  1,  1,  1,  0, -1,  0,  0,  1,  1,  1,  0,  0,<br>
+    1,  2,  2,  2,  1, -1, -2, -4,  1,  1,  2,  2,  1,  0, -2, -4,<br>
+    0,  1,  1,  1,  1,  0, -1, -3, -1,  0,  1,  1,  0,  0, -1, -2,<br>
+   -1,  0,  1,  1,  1,  0,  0, -1, -2, -1,  0,  0,  0,  0,  0, -1,<br>
+   -1, -1,  0,  1,  1,  0,  0,  0, -1,  0,  1,  1,  1,  1,  1,  0,<br>
+    2,  2,  0, -1, -2, -1, -1, -2,  1,  1, -1, -2, -2, -1, -1, -2,<br>
+    1,  1, -1, -2, -2,  0,  0, -1,  1,  1,  0, -2, -1,  1,  1,  0,<br>
+    1,  1,  0, -1, -1,  1,  2,  1,  1,  1,  0, -1, -1,  1,  2,  1,<br>
+    1,  1,  0, -1, -1,  1,  1,  1,  1,  1,  0, -1,  0,  1,  1,  1,<br>
+    0,  0, -1, -2, -4, -4, -4, -4,  3,  3,  3,  2,  1,  0,  0,  0,<br>
+    3,  3,  3,  3,  2,  2,  2,  2,  0,  0,  0,  0,  0,  0,  0,  1,<br>
+   -1, -1, -1, -1, -1, -1, -1,  0,  0, -1,  0,  0, -1,  0,  0,  0,<br>
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, -1, -1,  0,<br>
+   -1, -1,  0, -1, -1,  1,  2, -1,  1,  1,  0,  0,  0,  2,  3, -1,<br>
+    1,  1,  0, -1, -1,  1,  3, -1,  1,  1,  0, -2, -2,  0,  1, -2,<br>
+    1,  0,  0, -2, -2,  0,  1, -3,  0,  0,  0,  0, -1,  1,  1, -3,<br>
+    0,  1,  1,  0,  1,  2,  1, -3, -1,  0,  1,  1,  1,  2,  1, -4,<br>
+   -4, -3,  0,  1,  1,  1,  0,  0, -4, -2,  0,  1,  1,  1,  0, -1,<br>
+   -3, -1,  1,  1,  1,  0, -1, -1, -1,  1,  1,  1,  1,  0, -1,  0,<br>
+    1,  2,  2,  1,  0, -1,  0,  0,  2,  2,  1,  0, -1, -1,  0,  1,<br>
+    2,  1,  0, -1, -2, -1,  0,  1,  2,  2,  0, -1, -2, -1,  1,  1,<br>
+    1,  1,  0,  0, -1, -1, -1, -1,  0, -1, -1, -1, -1, -1, -1, -1,<br>
+   -1, -1, -1, -1, -1, -1, -1, -1,  0,  0, -1, -1, -1, -1, -1, -1,<br>
+    1,  0,  0, -1, -1, -1, -1, -1,  2,  1,  0,  0, -1, -1, -1, -1,<br>
+    5,  3,  2,  1,  0,  0,  0,  0,  6,  5,  3,  2,  1,  0,  0,  0,<br>
+    4,  4,  3,  1,  0,  0,  0,  1,  3,  3,  2,  1,  0,  0,  0,  1,<br>
+    2,  2,  1,  0, -1, -1,  0,  1,  0,  0,  0, -1, -1, -1,  0,  1,<br>
+    0,  0, -1, -1, -2, -1,  0,  2,  0, -1, -1, -2, -2, -2,  0,  1,<br>
+    0, -1, -1, -2, -2, -2, -1,  0,  0,  0, -1, -2, -2, -2, -1,  0,<br>
+    0,  0, -1, -1, -1,  0,  2,  3,  0, -1, -2, -2, -1, -1,  1,  2,<br>
+    1,  0, -1, -1, -1,  0,  0,  0,  1,  1,  1,  0,  0,  0, -1, -1,<br>
+    1,  2,  1,  0,  0, -1, -1, -1, -1,  0,  0,  0, -1, -1, -1, -1,<br>
+   -3, -2, -1, -1,  0,  1,  1,  2, -4, -3, -1,  1,  2,  3,  5,  5,<br>
+    0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1,  1,  1,  1,<br>
+    0,  0,  0, -1,  0,  0,  0,  1, -1, -1, -2, -2, -2, -1, -1,  0,<br>
+    0,  0,  0,  0,  0,  1,  1,  1,  2,  2,  2,  2,  2,  3,  3,  3,<br>
+    1,  1,  1,  1,  2,  2,  1,  1, -4, -3, -4, -4, -4, -4, -3, -3,<br>
+   -1,  0,  1,  2,  2,  3,  3,  3, -1, -1, -1, -1,  0,  0,  0,  0,<br>
+    0,  0, -1, -2, -2, -3, -3, -2,  3,  2,  1,  0, -1, -2, -2, -2,<br>
+    4,  3,  2,  1,  1,  0,  0,  0,  2,  2,  1,  1,  0,  1,  1,  1,<br>
+    0, -1, -1, -1, -1,  0,  0,  1, -2, -2, -2, -2, -2, -1,  0,  0,<br>
+    1, -1,  0,  2,  1, -2, -1,  1,  1, -1,  0,  2,  1, -2, -2,  1,<br>
+    1, -1,  0,  3,  2, -2, -1,  1,  0, -2,  0,  3,  2, -2, -2,  1,<br>
+    0, -2,  0,  3,  2, -2, -2,  1,  0, -2,  0,  3,  1, -2, -1,  1,<br>
+    0, -2,  0,  2,  1, -2, -2,  1,  0, -1,  0,  2,  1, -2, -1,  1,<br>
+    0,  1,  2,  2,  3,  3,  2,  2,  0,  1,  1,  2,  3,  3,  2,  1,<br>
+    0,  0,  1,  2,  2,  2,  2,  1, -1,  0,  0,  1,  1,  1,  1,  1,<br>
+   -1, -1,  0,  0,  0,  0,  0,  0, -1, -1, -1, -1, -1, -1, -1, -1,<br>
+   -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -1,<br>
+    0,  0, -1, -2, -1,  0,  3,  5,  0,  0, -1, -1, -1,  0,  2,  4,<br>
+    1,  1,  0,  0, -1, -1,  1,  2,  1,  2,  1,  1,  0, -1, -1,  0,<br>
+    0,  1,  2,  1,  0, -1, -2, -2, -1,  0,  1,  2,  1,  0, -3, -3,<br>
+   -2, -1,  1,  2,  2,  0, -2, -4, -2, -1,  0,  2,  2,  1, -1, -3,<br>
+    0,  0,  0,  0,  0,  0, -1, -1,  0,  0, -1,  0,  0,  0,  0,  0,<br>
+   -1, -1, -1, -1,  0,  0,  0,  0, -1, -1, -1, -1, -1, -1, -1,  0,<br>
+   -1, -1, -1, -1, -1, -1, -1,  0, -1,  0,  0,  0,  0, -1, -1,  0,<br>
+    0,  0,  1,  1,  0,  0,  0,  1,  3,  3,  3,  4,  3,  3,  3,  3,<br>
+    5,  1, -2, -2,  0,  0,  0, -1,  4, -1, -3, -1,  0,  0,  0, -1,<br>
+    3, -1, -1,  0,  1,  1,  0, -1,  2,  0,  0,  1,  1,  1,  0, -2,<br>
+    1,  0,  0,  1,  1,  1,  0, -2,  0, -1, -1, -1,  0,  0,  0, -1,<br>
+    0, -1, -1, -1, -1,  0,  0, -1,  2,  1,  0,  0,  0,  1,  0,  0,<br>
+    1,  0,  1,  1,  1,  1,  0,  0,  1,  0,  0,  1,  1,  0,  0,  0,<br>
+    1, -1, -1,  0,  0,  0,  0,  0,  2,  0, -1, -1, -1, -1, -1,  0,<br>
+    3,  1, -1, -1, -2, -2, -2, -1,  4,  2,  1,  0, -1, -2, -2, -1,<br>
+    2,  1,  0,  0, -1, -1,  0,  0,  0, -1, -1, -1, -1,  0,  1,  1,<br>
+    0,  1,  2,  2,  2,  1, -1, -3,  0,  0,  1,  1,  1,  0, -1, -2,<br>
+    0,  0,  0,  0,  0,  0, -1, -1,  0,  0, -1,  0,  0,  1,  1,  0,<br>
+    0,  0, -1,  0,  1,  1,  1,  1,  0,  0,  0,  0,  1,  1,  1,  0,<br>
+    0,  0,  1,  1,  2,  1, -1, -3,  0,  0,  0,  1,  1, -1, -4, -5,<br>
+   -2, -2, -2, -1,  0,  2,  2,  2,  0,  0,  0,  0,  1,  1,  1,  0,<br>
+    1,  1,  1,  1,  1,  0, -2, -3,  0,  0,  1,  1,  0, -1, -3, -4,<br>
+   -1, -1,  0,  1,  0,  0, -2, -3, -1, -1,  0,  1,  1,  1,  0, -1,<br>
+    0,  0,  0,  1,  1,  1,  1,  0,  1,  1,  1,  1,  0,  0,  0,  0,<br>
+    0,  1,  0,  0,  1,  1,  1,  2,  1,  2,  0,  0,  0,  0, -1,  1,<br>
+    0,  2,  0, -1,  1,  0, -1,  0,  0,  1,  0,  0,  2,  1,  0,  1,<br>
+    0,  1, -1,  0,  2,  2,  0,  1, -1,  0, -1, -1,  2,  1,  1,  2,<br>
+   -2, -2, -3, -2,  0,  1,  1,  1, -2, -2, -3, -3, -1, -1, -1,  0,<br>
+   -3, -1,  0,  1,  2,  1,  1,  0, -3, -1,  0,  1,  2,  1,  1,  1,<br>
+   -2,  0,  0,  1,  1,  1,  1,  1, -1,  0,  0,  0,  0,  0,  0,  0,<br>
+   -2,  0,  0,  0,  0, -1, -1,  0, -2,  0,  0,  0,  0,  0, -1, -1,<br>
+   -3,  0,  1,  1,  1,  1,  0,  1, -5, -2,  0,  1,  2,  2,  1,  2,<br>
+   -2, -1, -1,  0,  0,  1,  2,  3,  0,  0,  1,  1,  0,  0,  1,  2,<br>
+    0,  0,  1,  0, -1, -1,  0,  1, -1, -1, -1, -1, -2, -2, -1,  0,<br>
+   -2, -2, -2, -2, -2, -1,  0,  1,  0,  0,  0, -1,  0,  1,  2,  2,<br>
+    2,  1,  0,  0,  0,  1,  2,  2,  2,  1,  0, -1, -1, -1,  0,  0,<br>
+    0,  1,  1,  1,  1,  1, -1, -4, -1, -1,  0,  1,  1,  1,  0, -3,<br>
+   -2, -1,  0,  0,  1,  2,  2, -2, -1,  0,  0,  0,  0,  2,  3, -1,<br>
+   -1,  0,  0,  0,  0,  1,  2,  0,  0,  0, -1, -2, -1,  1,  1,  0,<br>
+    0,  0, -1, -2, -2,  0,  2,  1,  0,  0, -1, -2, -1,  1,  2,  2,<br>
+    1,  0,  0,  0, -2, -3, -2, -3,  0,  0,  1,  0, -2, -2, -1, -1,<br>
+    0, -1,  1,  1, -1, -1,  0,  0,  0, -1,  1,  1, -1, -1,  0,  0,<br>
+    0,  1,  2,  1, -1, -1,  0,  1,  1,  2,  3,  2,  0,  0,  1,  2,<br>
+   -1,  0,  2,  1,  0,  0,  2,  3, -2, -1,  0,  0, -1,  0,  1,  2,<br>
+    1,  1,  0, -1, -2, -2, -1,  1,  1,  1,  1, -1, -2, -2,  0,  2,<br>
+    1,  1,  1, -1, -1, -1,  0,  2,  0,  0,  0,  0,  0,  0,  1,  2,<br>
+   -1, -1, -1,  0,  0,  0,  1,  2, -1, -2, -1,  1,  1,  1,  0,  0,<br>
+   -1, -2, -1,  1,  2,  2,  0, -1, -1, -2, -1,  2,  2,  2,  0, -1,<br>
+   -1, -1, -1, -2, -1, -1,  0,  1,  0,  0, -1, -1, -1,  0,  1,  2,<br>
+    1,  0,  0,  0,  0,  1,  1,  2,  1,  1,  0,  0,  1,  1,  1,  1,<br>
+    1,  1,  0,  1,  1,  0,  1,  1,  1,  1,  1,  1,  0, -1, -1, -1,<br>
+    1,  2,  1,  0, -1, -2, -2, -3,  2,  2,  1,  0, -2, -3, -4, -4,<br>
+   -4, -2,  1,  1,  1,  1,  0,  0, -2,  0,  1,  0,  0,  0,  0,  0,<br>
+    0,  1,  1, -2, -2, -1,  0,  1,  2,  2,  1, -2, -2, -1,  1,  2,<br>
+    1,  2,  1, -2, -2, -1,  1,  2, -1,  1,  1, -1, -1, -1,  0,  1,<br>
+   -2,  0,  1,  1,  0, -1, -1,  0, -2,  0,  2,  2,  1, -1, -1,  0,<br>
+    1,  1,  0,  0,  0,  1,  0,  0, -2, -3, -3, -2, -2, -1,  0,  0,<br>
+   -3, -4, -3, -2, -1,  0,  0,  0, -1, -1,  0,  1,  2,  3,  2,  1,<br>
+    0,  1,  2,  3,  3,  3,  2,  1,  1,  1,  1,  2,  1,  0,  0, -1,<br>
+    0,  0,  0,  0, -1, -1, -1, -1,  0, -1, -1,  0,  0,  0,  0,  0,<br>
+    1,  1,  0,  0, -1, -1,  0,  2,  0,  0,  1,  0, -1, -1,  1,  1,<br>
+   -2, -1,  0,  1,  1,  1,  1,  1, -3, -3,  0,  2,  2,  1,  1,  0,<br>
+   -2, -2,  0,  1,  1,  1,  0,  0,  1,  0,  0,  0,  0,  0, -1, -1,<br>
+    3,  1, -1, -3, -2, -1,  0,  1,  4,  2, -1, -3, -3, -1,  1,  2,<br>
+    0,  0,  0, -1, -1, -1, -1, -1,  1,  2,  1,  0,  0,  0, -1, -1,<br>
+    2,  3,  3,  2,  1,  0, -1, -1,  3,  4,  4,  2,  1,  0, -1, -2,<br>
+    3,  3,  2,  1,  0, -1, -2, -2,  1,  1,  0, -1, -1, -2, -2, -3,<br>
+    0,  0,  0, -1, -1, -2, -2, -2, -1, -1, -1, -1, -1, -2, -2, -1,<br>
+    1,  2,  2,  2,  2,  1,  2,  2,  0,  1,  1,  1,  1,  0,  0,  0,<br>
+    0,  0,  0,  1,  1,  0, -1, -2,  0,  0,  0,  0,  1,  0, -1, -4,<br>
+    1,  0,  0,  0,  0,  0, -2, -5,  1,  0,  0,  0,  0,  0, -1, -4,<br>
+    1,  0, -1,  0,  0,  0, -1, -3,  0, -1, -1,  0,  1,  1,  1, -1,<br>
+   -2, -1,  0,  0, -1, -1, -1, -2, -1,  0,  0,  0, -1, -1, -2, -2,<br>
+    0,  1,  1,  0, -1, -1, -1, -2,  0,  1,  1,  0,  0,  0, -1, -1,<br>
+    0,  1,  0,  0,  1,  1,  1,  0,  1,  1,  0,  0,  1,  2,  2,  1,<br>
+    1,  1,  0,  0,  1,  2,  2,  1,  1,  1,  0, -1,  0,  1,  1,  0,<br>
+    4,  2,  1,  0,  0,  1,  1,  1,  4,  2,  1,  0,  0,  0,  0,  1,<br>
+    3,  1,  0,  0, -1, -1, -1,  0,  1,  0,  0, -1, -1, -2, -1,  0,<br>
+    0,  0,  0,  0, -1, -1, -1,  0, -1, -1,  0,  0, -1, -1,  0,  1,<br>
+   -2, -1,  0, -1, -1,  0,  0,  1, -2, -2, -1, -2, -1,  0,  0,  1,<br>
+    0,  1,  1,  1,  2,  1,  0, -1, -1, -1, -1,  0,  0, -1, -2, -2,<br>
+   -1,  0, -1,  0,  0, -1, -2, -1,  0,  0,  0,  0,  0,  0,  1,  2,<br>
+    0,  0,  0,  0,  0,  0,  2,  3, -1,  0, -1, -1, -1, -1,  0,  3,<br>
+   -1,  0,  0, -1, -1, -2,  0,  3,  0,  0,  0,  0, -1, -1,  1,  4,<br>
+    2,  2,  0,  0,  0,  0,  0,  1,  1,  1, -1, -2, -1, -2, -1,  1,<br>
+   -1, -1, -2, -2, -2, -3, -2,  0, -1,  0, -1, -1, -1, -2, -1,  1,<br>
+    1,  1,  0,  0,  1,  0,  0,  1,  2,  2,  0,  0,  1,  0,  0,  1,<br>
+    2,  2,  0,  0,  0,  0, -1, -1,  2,  2,  0,  0,  1,  0, -1, -1,<br>
+   -1,  0,  1,  1,  0, -1, -1, -1,  1,  2,  3,  2,  1,  0,  0,  0,<br>
+    0,  1,  1,  1,  0, -1,  0,  0, -2, -2, -1,  0,  1,  0,  0,  0,<br>
+   -2, -2, -1,  2,  2,  2,  1,  0, -2, -1,  0,  1,  1,  0,  0, -1,<br>
+   -1, -1,  0,  0, -1, -2, -1, -2,  0,  1,  1,  1,  0,  0,  1,  1,<br>
+   -3, -3, -3, -2, -1, -1, -2, -2, -1, -1,  0,  1,  2,  1,  0,  0,<br>
+    1,  1,  1,  2,  2,  1,  0,  0,  1,  1,  1,  1,  1,  0, -1,  1,<br>
+    1,  0, -1, -1,  0,  0, -1,  1,  0, -1, -1, -1,  0, -1, -1,  1,<br>
+    1,  0, -1,  0,  0, -1,  0,  2,  2,  0, -1,  0,  0,  0,  0,  2,<br>
+    1,  0, -2, -1,  0,  1,  1,  0,  2,  0, -1, -1,  0,  1,  1,  0,<br>
+    1,  0, -2, -1,  0,  1,  0, -1,  1,  0, -1, -1,  0,  1,  0, -1,<br>
+    0,  1,  1,  0,  1,  1,  0,  0, -2,  1,  2,  1,  0,  0,  0,  1,<br>
+   -5,  0,  2,  1,  0, -1,  0,  1, -6, -1,  2,  1,  0, -1,  0,  0,<br>
+    5,  3,  0, -1, -2, -1, -1, -1,  1,  1,  0, -1, -1,  0, -1, -1,<br>
+   -1,  0,  1,  1,  2,  2,  1,  0, -2, -1,  0,  1,  2,  1,  1,  1,<br>
+   -2, -1, -1, -1,  0, -1,  0,  1,  0,  1,  0,  0, -1, -1,  0,  0,<br>
+    0,  1,  1,  1,  1,  0,  0,  0, -3, -2,  0,  1,  1,  0,  0, -1,<br>
+   -1,  0,  1,  0, -1,  0,  2,  3, -1,  0,  0, -2, -4, -2, -1,  0,<br>
+    0,  1,  1,  0, -2, -1,  0, -1,  1,  2,  3,  1,  0,  1,  1,  0,<br>
+   -1,  0,  1,  1,  1,  1,  1,  0, -2, -3, -2,  0,  0,  0,  1,  0,<br>
+   -1, -2, -2,  0,  1,  0,  0, -1,  3,  1,  0,  0,  1,  0, -1, -1,<br>
+   -2, -1,  0,  0, -1, -1,  0,  0, -1,  0,  0,  0,  0,  1,  1,  1,<br>
+   -1, -1, -1,  0,  1,  1,  1,  1,  0, -2, -3, -1,  1,  0,  0,  0,<br>
+    1, -1, -3, -1,  1,  1,  0, -1,  3,  1, -1,  1,  2,  2,  0, -1,<br>
+    3,  1,  0,  1,  2,  1,  1,  0,  0, -2, -2, -1, -1,  0,  0,  0,<br>
+    1,  0, -1, -1,  1,  2,  1,  0,  0, -1, -2, -1,  1,  2,  2,  1,<br>
+   -1, -1, -1,  0,  0,  1,  2,  0, -2,  0,  0,  0,  0,  0,  1, -1,<br>
+   -1,  0,  1,  0, -1, -1, -1, -1,  0,  1,  1,  2,  0, -2, -1,  0,<br>
+    1,  2,  2,  2,  1, -1, -1,  0,  0,  1,  1,  1,  0, -2, -2, -1,<br>
+    0,  0, -1, -1, -1, -1, -2, -2,  0,  0, -1,  0,  1,  2,  2,  1,<br>
+    0,  0, -1, -1,  0,  1,  2,  2,  1,  1, -1, -2, -1, -1, -1, -1,<br>
+    2,  2,  1,  0,  0, -1, -2, -2,  1,  2,  2,  1,  0,  0, -2, -2,<br>
+    0,  0,  0,  0,  1,  1,  0, -1,  0, -1, -1, -1,  2,  3,  2,  1,<br>
+    0, -2,  1,  2, -1,  0,  0,  1, -1, -2,  2,  3, -1,  0,  0,  0,<br>
+    0, -2,  2,  3, -1, -1,  0,  0,  0, -1,  3,  2, -2,  0,  1,  0,<br>
+    0, -1,  3,  1, -2,  0,  1,  0,  0, -1,  2,  1, -1,  1,  0, -1,<br>
+    0,  0,  1, -1, -2,  0,  0, -1,  1,  0,  0, -2, -2, -1, -1, -1,<br>
+    1,  1,  1,  1,  1, -1, -1, -2,  0,  0,  0,  1,  1,  1,  1,  1,<br>
+    0,  0,  0,  1,  1,  1,  2,  3,  1,  0,  0, -1,  0,  0,  1,  2,<br>
+    0, -1, -1, -2, -1,  0,  1,  2, -2, -2, -2, -2, -1,  0,  1,  1,<br>
+   -1, -1, -1, -1,  0,  0,  0, -1,  2,  2,  2,  0, -1, -1, -2, -4,<br>
+   -1, -2, -1, -1,  0,  1,  2,  3, -1, -1, -1, -1,  0,  1,  2,  3,<br>
+    1,  0, -1,  0, -1,  0,  1,  2,  1,  0,  0,  0, -1,  0,  2,  2,<br>
+    1,  0, -1, -1, -2,  0,  1,  2,  0, -2, -2, -2, -3, -1,  0,  1,<br>
+    0, -2, -2, -2, -2, -1,  1,  1,  0,  0,  0,  0,  0,  1,  2,  2<br>
+};<br>
+<br>
+static const int8 *const s_svq1IntraCodebooks[6] = {<br>
+    s_svq1IntraCodebook4x2, s_svq1IntraCodebook4x4,<br>
+    s_svq1IntraCodebook8x4, s_svq1IntraCodebook8x8,<br>
+    0, 0<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/svq1_vlc.h b/image/codecs/svq1_vlc.h<br>
new file mode 100644<br>
index 0000000..19cfb34<br>
--- /dev/null<br>
+++ b/image/codecs/svq1_vlc.h<br>
@@ -0,0 +1,341 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// These tables are modified versions of the FFmpeg ones so that they<br>
+// will work with our BitStream class directly.<br>
+<br>
+#ifndef IMAGE_CODECS_SVQ1_VLC_H<br>
+#define IMAGE_CODECS_SVQ1_VLC_H<br>
+<br>
+#include "common/scummsys.h"<br>
+<br>
+namespace Image {<br>
+<br>
+static const byte s_svq1BlockTypeLengths[4] = {<br>
+       1, 2, 3, 3<br>
+};<br>
+<br>
+static const uint32 s_svq1BlockTypeCodes[4] = {<br>
+       1, 1, 1, 0<br>
+};<br>
+<br>
+static const byte s_svq1IntraMultistageLengths0[8] = {<br>
+       5, 1, 3, 3, 4, 4, 5, 4<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMultistageCodes0[8] = {<br>
+       1, 1, 3, 2, 3, 2, 0, 1<br>
+};<br>
+<br>
+static const byte s_svq1IntraMultistageLengths1[8] = {<br>
+       4, 2, 3, 3, 3, 3, 4, 3<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMultistageCodes1[8] = {<br>
+       1, 3, 5, 4, 3, 2, 0, 1<br>
+};<br>
+<br>
+static const byte s_svq1IntraMultistageLengths2[8] = {<br>
+       5, 1, 3, 5, 4, 3, 4, 4<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMultistageCodes2[8] = {<br>
+       1, 1, 3, 0, 3, 2, 2, 1<br>
+};<br>
+<br>
+static const byte s_svq1IntraMultistageLengths3[8] = {<br>
+       6, 1, 2, 6, 4, 4, 5, 4<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMultistageCodes3[8] = {<br>
+       1, 1, 1, 0, 3, 2, 1, 1<br>
+};<br>
+<br>
+static const byte s_svq1IntraMultistageLengths4[8] = {<br>
+       6, 1, 2, 5, 5, 6, 5, 3<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMultistageCodes4[8] = {<br>
+       1, 1, 1, 3, 2, 0, 1, 1<br>
+};<br>
+<br>
+static const byte s_svq1IntraMultistageLengths5[8] = {<br>
+       7, 1, 2, 3, 4, 6, 7, 5<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMultistageCodes5[8] = {<br>
+       1, 1, 1, 1, 1, 1, 0, 1<br>
+};<br>
+<br>
+static const byte *s_svq1IntraMultistageLengths[6] = {<br>
+       s_svq1IntraMultistageLengths0, s_svq1IntraMultistageLengths1, s_svq1IntraMultistageLengths2,<br>
+       s_svq1IntraMultistageLengths3, s_svq1IntraMultistageLengths4, s_svq1IntraMultistageLengths5<br>
+};<br>
+<br>
+static const uint32 *s_svq1IntraMultistageCodes[6] = {<br>
+       s_svq1IntraMultistageCodes0, s_svq1IntraMultistageCodes1, s_svq1IntraMultistageCodes2,<br>
+       s_svq1IntraMultistageCodes3, s_svq1IntraMultistageCodes4, s_svq1IntraMultistageCodes5<br>
+};<br>
+<br>
+static const byte s_svq1InterMultistageLengths0[8] = {<br>
+       2, 3, 3, 3, 3, 3, 4, 4<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMultistageCodes0[8] = {<br>
+       3, 5, 4, 3, 2, 1, 1, 0<br>
+};<br>
+<br>
+static const byte s_svq1InterMultistageLengths1[8] = {<br>
+       2, 3, 3, 3, 3, 3, 4, 4<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMultistageCodes1[8] = {<br>
+       3, 5, 4, 3, 2, 1, 1, 0<br>
+};<br>
+<br>
+static const byte s_svq1InterMultistageLengths2[8] = {<br>
+       1, 3, 3, 4, 4, 4, 5, 5<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMultistageCodes2[8] = {<br>
+       1, 3, 2, 3, 2, 1, 1, 0<br>
+};<br>
+<br>
+static const byte s_svq1InterMultistageLengths3[8] = {<br>
+       1, 3, 3, 4, 4, 4, 5, 5<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMultistageCodes3[8] = {<br>
+       1, 3, 2, 3, 2, 1, 1, 0<br>
+};<br>
+<br>
+static const byte s_svq1InterMultistageLengths4[8] = {<br>
+       1, 3, 3, 4, 4, 4, 5, 5<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMultistageCodes4[8] = {<br>
+       1, 3, 2, 3, 2, 1, 1, 0<br>
+};<br>
+<br>
+static const byte s_svq1InterMultistageLengths5[8] = {<br>
+       1, 2, 3, 5, 5, 5, 6, 6<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMultistageCodes5[8] = {<br>
+       1, 1, 1, 3, 2, 1, 1, 0<br>
+};<br>
+<br>
+static const byte *s_svq1InterMultistageLengths[6] = {<br>
+       s_svq1InterMultistageLengths0, s_svq1InterMultistageLengths1, s_svq1InterMultistageLengths2,<br>
+       s_svq1InterMultistageLengths3, s_svq1InterMultistageLengths4, s_svq1InterMultistageLengths5<br>
+};<br>
+<br>
+static const uint32 *s_svq1InterMultistageCodes[6] = {<br>
+       s_svq1InterMultistageCodes0, s_svq1InterMultistageCodes1, s_svq1InterMultistageCodes2,<br>
+       s_svq1InterMultistageCodes3, s_svq1InterMultistageCodes4, s_svq1InterMultistageCodes5<br>
+};<br>
+<br>
+static const byte s_svq1IntraMeanLengths[256] = {<br>
+       6, 7, 17, 20, 20, 20, 20, 20, 20, 19,<br>
+       11, 9, 11, 14, 14, 15, 16, 12, 10, 11,<br>
+       11, 9, 8, 8, 7, 4, 4, 6, 7, 8,<br>
+       8, 9, 9, 9, 9, 9, 9, 9, 9, 9,<br>
+       9, 9, 9, 9, 9, 9, 9, 9, 8, 8,<br>
+       8, 8, 8, 8, 8, 8, 8, 8, 8, 8,<br>
+       8, 8, 8, 8, 7, 8, 8, 8, 8, 8,<br>
+       8, 8, 8, 8, 8, 8, 8, 8, 8, 8,<br>
+       8, 8, 8, 8, 8, 7, 8, 8, 7, 8,<br>
+       8, 8, 8, 8, 7, 8, 7, 7, 8, 7,<br>
+       7, 8, 7, 8, 8, 8, 7, 7, 8, 7,<br>
+       8, 7, 7, 7, 7, 7, 7, 7, 7, 7,<br>
+       7, 7, 7, 7, 7, 7, 7, 8, 8, 8,<br>
+       8, 8, 8, 8, 8, 8, 8, 7, 7, 7,<br>
+       7, 7, 7, 7, 7, 7, 7, 7, 6, 6,<br>
+       7, 8, 8, 8, 8, 8, 8, 8, 8, 8,<br>
+       8, 8, 8, 8, 8, 8, 8, 8, 8, 9,<br>
+       9, 9, 9, 9, 8, 8, 9, 9, 9, 9,<br>
+       9, 9, 9, 9, 9, 9, 9, 9, 9, 9,<br>
+       9, 9, 9, 9, 9, 9, 9, 9, 9, 9,<br>
+       9, 9, 9, 9, 10, 10, 10, 10, 10, 10,<br>
+       10, 10, 10, 10, 10, 10, 10, 10, 10, 10,<br>
+       10, 10, 10, 10, 10, 10, 10, 10, 10, 10,<br>
+       10, 10, 10, 11, 11, 11, 10, 11, 11, 11,<br>
+       11, 11, 11, 11, 11, 11, 11, 11, 11, 11,<br>
+       11, 11, 11, 11, 11, 14<br>
+};<br>
+<br>
+static const uint32 s_svq1IntraMeanCodes[256] = {<br>
+       55, 86, 1, 1, 2, 3, 0, 4, 5, 3,<br>
+       21, 66, 20, 3, 2, 1, 1, 1, 43, 24,<br>
+       12, 65, 120, 108, 85, 15, 14, 52, 81, 114,<br>
+       110, 64, 63, 62, 61, 60, 59, 58, 57, 56,<br>
+       55, 67, 70, 71, 69, 68, 73, 72, 74, 121,<br>
+       118, 119, 113, 117, 116, 115, 106, 85, 112, 111,<br>
+       82, 109, 76, 107, 64, 105, 104, 103, 102, 101,<br>
+       100, 99, 98, 97, 96, 95, 94, 93, 92, 91,<br>
+       90, 89, 88, 87, 86, 61, 84, 83, 63, 81,<br>
+       80, 79, 78, 77, 65, 75, 83, 62, 72, 79,<br>
+       82, 69, 80, 67, 66, 65, 66, 67, 62, 68,<br>
+       60, 69, 70, 71, 72, 73, 74, 75, 76, 77,<br>
+       78, 88, 89, 90, 91, 92, 93, 68, 73, 41,<br>
+       63, 61, 59, 44, 40, 37, 38, 94, 87, 84,<br>
+       95, 98, 99, 100, 97, 101, 103, 102, 53, 54,<br>
+       96, 57, 58, 56, 55, 54, 53, 52, 51, 50,<br>
+       49, 48, 45, 43, 42, 39, 64, 70, 71, 38,<br>
+       37, 36, 35, 34, 46, 47, 31, 54, 29, 33,<br>
+       27, 28, 25, 26, 24, 23, 22, 30, 32, 39,<br>
+       40, 41, 42, 43, 44, 45, 46, 47, 48, 53,<br>
+       49, 50, 51, 52, 25, 42, 23, 22, 21, 40,<br>
+       38, 37, 34, 33, 24, 20, 41, 18, 13, 14,<br>
+       15, 16, 17, 26, 27, 28, 29, 30, 31, 32,<br>
+       19, 35, 36, 9, 8, 7, 39, 5, 11, 6,<br>
+       4, 3, 2, 1, 10, 22, 25, 23, 13, 14,<br>
+       15, 16, 17, 18, 19, 1<br>
+};<br>
+<br>
+static const byte s_svq1InterMeanLengths[512] = {<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 21, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 21,<br>
+       22, 22, 22, 22, 22, 22, 20, 21, 22, 21,<br>
+       22, 22, 20, 22, 22, 21, 19, 18, 20, 22,<br>
+       22, 21, 20, 19, 20, 20, 19, 19, 19, 18,<br>
+       19, 18, 19, 20, 19, 19, 18, 18, 18, 19,<br>
+       18, 18, 18, 17, 19, 18, 18, 17, 18, 18,<br>
+       18, 17, 17, 17, 17, 16, 16, 16, 16, 16,<br>
+       16, 16, 16, 16, 15, 16, 15, 15, 15, 15,<br>
+       15, 15, 15, 15, 14, 14, 14, 14, 14, 14,<br>
+       14, 14, 14, 13, 13, 13, 13, 13, 13, 13,<br>
+       13, 12, 12, 12, 12, 12, 12, 11, 11, 11,<br>
+       11, 11, 11, 10, 10, 10, 10, 10, 10, 9,<br>
+       9, 9, 9, 9, 8, 8, 8, 8, 7, 7,<br>
+       7, 6, 6, 5, 5, 4, 1, 3, 5, 5,<br>
+       6, 6, 7, 7, 7, 7, 8, 8, 8, 9,<br>
+       9, 9, 9, 9, 10, 10, 10, 10, 11, 11,<br>
+       11, 11, 11, 11, 11, 12, 12, 12, 12, 12,<br>
+       12, 13, 13, 13, 13, 13, 13, 13, 13, 13,<br>
+       14, 14, 14, 14, 14, 14, 14, 14, 15, 15,<br>
+       15, 15, 15, 15, 15, 15, 15, 15, 16, 16,<br>
+       16, 16, 16, 16, 16, 16, 16, 16, 17, 17,<br>
+       17, 17, 17, 17, 17, 17, 18, 17, 17, 17,<br>
+       17, 17, 17, 17, 19, 18, 18, 19, 18, 18,<br>
+       19, 18, 18, 18, 19, 18, 19, 19, 18, 20,<br>
+       20, 19, 19, 19, 19, 19, 19, 18, 19, 20,<br>
+       19, 19, 21, 20, 19, 20, 19, 19, 20, 20,<br>
+       22, 20, 22, 22, 21, 22, 22, 21, 21, 22,<br>
+       22, 20, 22, 22, 21, 22, 22, 22, 20, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 21, 21, 22, 22, 22, 21,<br>
+       22, 21, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22, 22, 22, 22, 22, 22, 22, 22, 22,<br>
+       22, 22<br>
+};<br>
+<br>
+static const uint32 s_svq1InterMeanCodes[512] = {<br>
+       90, 212, 213, 214, 215, 216, 217, 218, 219, 220,<br>
+       221, 222, 223, 224, 225, 226, 227, 228, 229, 230,<br>
+       232, 203, 233, 234, 231, 236, 237, 238, 239, 240,<br>
+       241, 242, 243, 244, 245, 246, 247, 248, 258, 235,<br>
+       249, 252, 253, 254, 256, 92, 96, 257, 113, 260,<br>
+       261, 251, 255, 134, 250, 124, 117, 259, 120, 211,<br>
+       123, 130, 210, 209, 208, 207, 206, 205, 204, 195,<br>
+       202, 201, 200, 199, 198, 197, 139, 196, 194, 193,<br>
+       192, 191, 190, 189, 188, 187, 186, 185, 97, 132,<br>
+       133, 134, 135, 136, 137, 138, 140, 141, 142, 143,<br>
+       144, 145, 146, 147, 148, 149, 150, 151, 152, 153,<br>
+       154, 155, 156, 157, 158, 159, 160, 161, 162, 163,<br>
+       164, 165, 166, 167, 168, 169, 170, 171, 127, 143,<br>
+       172, 173, 174, 175, 176, 177, 83, 144, 178, 145,<br>
+       179, 180, 84, 181, 182, 140, 52, 61, 85, 183,<br>
+       184, 139, 86, 61, 87, 88, 64, 67, 71, 42,<br>
+       46, 44, 70, 89, 73, 45, 56, 54, 57, 69,<br>
+       40, 48, 53, 32, 68, 50, 49, 31, 47, 46,<br>
+       45, 33, 34, 35, 36, 39, 35, 32, 29, 37,<br>
+       30, 36, 42, 38, 33, 41, 34, 35, 36, 27,<br>
+       26, 29, 31, 39, 23, 24, 25, 27, 28, 30,<br>
+       37, 32, 33, 19, 20, 21, 22, 23, 24, 25,<br>
+       26, 24, 23, 21, 20, 19, 18, 15, 16, 18,<br>
+       19, 27, 26, 14, 19, 15, 16, 17, 18, 13,<br>
+       20, 21, 12, 19, 15, 14, 16, 17, 12, 9,<br>
+       10, 8, 9, 9, 8, 5, 1, 3, 7, 6,<br>
+       11, 10, 14, 15, 11, 13, 11, 13, 12, 15,<br>
+       16, 17, 14, 18, 23, 20, 22, 21, 25, 24,<br>
+       23, 22, 21, 20, 17, 25, 26, 22, 29, 27,<br>
+       28, 32, 28, 35, 34, 33, 31, 30, 27, 29,<br>
+       36, 22, 26, 34, 29, 31, 21, 35, 24, 32,<br>
+       41, 40, 38, 37, 25, 28, 30, 23, 44, 43,<br>
+       28, 33, 45, 40, 31, 27, 26, 34, 45, 50,<br>
+       44, 39, 49, 51, 47, 43, 55, 42, 46, 48,<br>
+       41, 40, 38, 37, 47, 51, 52, 48, 58, 59,<br>
+       49, 60, 43, 41, 72, 39, 66, 65, 38, 82,<br>
+       81, 63, 62, 57, 60, 59, 58, 37, 56, 80,<br>
+       55, 54, 135, 79, 53, 78, 51, 50, 77, 76,<br>
+       131, 75, 129, 128, 142, 126, 125, 132, 141, 122,<br>
+       121, 74, 119, 118, 137, 116, 115, 114, 73, 112,<br>
+       111, 110, 109, 108, 107, 106, 105, 104, 103, 102,<br>
+       101, 100, 99, 98, 138, 136, 95, 94, 93, 133,<br>
+       91, 131, 89, 88, 87, 86, 85, 84, 83, 82,<br>
+       81, 80, 79, 78, 77, 76, 75, 74, 73, 72,<br>
+       71, 70, 69, 68, 67, 66, 65, 64, 63, 62,<br>
+       61, 60, 59, 58, 57, 56, 55, 54, 53, 52,<br>
+       51, 50, 49, 48, 47, 46, 45, 44, 43, 42,<br>
+       41, 40, 39, 38, 37, 36, 35, 34, 33, 32,<br>
+       31, 30, 29, 28, 27, 26, 25, 24, 23, 22,<br>
+       21, 20, 19, 18, 17, 16, 15, 14, 13, 12,<br>
+       11, 10, 9, 8, 7, 6, 5, 4, 3, 2,<br>
+       1, 0<br>
+};<br>
+<br>
+static const byte s_svq1MotionComponentLengths[33] = {<br>
+       1, 2, 3, 4, 6, 7, 7, 7, 9, 9,<br>
+       9, 10, 10, 10, 10, 10, 10, 10, 10, 10,<br>
+       10, 10, 10, 10, 10, 11, 11, 11, 11, 11,<br>
+       11, 12, 12<br>
+};<br>
+<br>
+static const uint32 s_svq1MotionComponentCodes[33] = {<br>
+       1, 1, 1, 1, 3, 5, 4, 3, 11, 10,<br>
+       9, 17, 16, 15, 14, 13, 12, 11, 10, 9,<br>
+       8, 7, 6, 5, 4, 7, 6, 5, 4, 3,<br>
+       2, 3, 2<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/codecs/truemotion1.cpp b/image/codecs/truemotion1.cpp<br>
new file mode 100644<br>
index 0000000..3b8ad85<br>
--- /dev/null<br>
+++ b/image/codecs/truemotion1.cpp<br>
@@ -0,0 +1,422 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+// Based on the TrueMotion 1 decoder by Alex Beregszaszi & Mike Melanson in FFmpeg<br>
+<br>
+#include "common/scummsys.h"<br>
+#include "image/codecs/truemotion1.h"<br>
+<br>
+#ifdef IMAGE_CODECS_TRUEMOTION1_H<br>
+<br>
+#include "image/codecs/truemotion1data.h"<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "common/util.h"<br>
+<br>
+namespace Image {<br>
+<br>
+enum {<br>
+       FLAG_SPRITE = (1 << 5),<br>
+       FLAG_KEYFRAME = (1 << 4),<br>
+       FLAG_INTERFRAME = (1 << 3),<br>
+       FLAG_INTERPOLATED = (1 << 2)<br>
+};<br>
+<br>
+enum {<br>
+       ALGO_NOP = 0,<br>
+       ALGO_RGB16V = 1,<br>
+       ALGO_RGB16H = 2,<br>
+       ALGO_RGB24H = 3<br>
+};<br>
+<br>
+// these are the various block sizes that can occupy a 4x4 block<br>
+enum {<br>
+       BLOCK_2x2 = 0,<br>
+       BLOCK_2x4 = 1,<br>
+       BLOCK_4x2 = 2,<br>
+       BLOCK_4x4 = 3<br>
+};<br>
+<br>
+// { valid for metatype }, algorithm, num of deltas, vert res, horiz res<br>
+struct CompressionType {<br>
+       int algorithm;<br>
+       int blockWidth; // vres<br>
+       int blockHeight; // hres<br>
+       int blockType;<br>
+};<br>
+<br>
+static const CompressionType compressionTypes[17] = {<br>
+       { ALGO_NOP,     0, 0, 0 },<br>
+<br>
+       { ALGO_RGB16V, 4, 4, BLOCK_4x4 },<br>
+       { ALGO_RGB16H, 4, 4, BLOCK_4x4 },<br>
+       { ALGO_RGB16V, 4, 2, BLOCK_4x2 },<br>
+       { ALGO_RGB16H, 4, 2, BLOCK_4x2 },<br>
+<br>
+       { ALGO_RGB16V, 2, 4, BLOCK_2x4 },<br>
+       { ALGO_RGB16H, 2, 4, BLOCK_2x4 },<br>
+       { ALGO_RGB16V, 2, 2, BLOCK_2x2 },<br>
+       { ALGO_RGB16H, 2, 2, BLOCK_2x2 },<br>
+<br>
+       { ALGO_NOP,     4, 4, BLOCK_4x4 },<br>
+       { ALGO_RGB24H, 4, 4, BLOCK_4x4 },<br>
+       { ALGO_NOP,     4, 2, BLOCK_4x2 },<br>
+       { ALGO_RGB24H, 4, 2, BLOCK_4x2 },<br>
+<br>
+       { ALGO_NOP,     2, 4, BLOCK_2x4 },<br>
+       { ALGO_RGB24H, 2, 4, BLOCK_2x4 },<br>
+       { ALGO_NOP,     2, 2, BLOCK_2x2 },<br>
+       { ALGO_RGB24H, 2, 2, BLOCK_2x2 }<br>
+};<br>
+<br>
+TrueMotion1Decoder::TrueMotion1Decoder(uint16 width, uint16 height) {<br>
+       _surface = new Graphics::Surface();<br>
+       _width = width;<br>
+       _height = height;<br>
+<br>
+       _surface->create(width, height, getPixelFormat());<br>
+<br>
+       // there is a vertical predictor for each pixel in a line; each vertical<br>
+       // predictor is 0 to start with<br>
+       _vertPred = new uint32[_width];<br>
+<br>
+       _buf = _mbChangeBits = _indexStream = 0;<br>
+       _lastDeltaset = _lastVectable = -1;<br>
+}<br>
+<br>
+TrueMotion1Decoder::~TrueMotion1Decoder() {<br>
+       _surface->free();<br>
+       delete _surface;<br>
+       delete[] _vertPred;<br>
+}<br>
+<br>
+void TrueMotion1Decoder::selectDeltaTables(int deltaTableIndex) {<br>
+       if (deltaTableIndex > 3)<br>
+               return;<br>
+<br>
+       for (byte i = 0; i < 8; i++) {<br>
+               _ydt[i] = ydts[deltaTableIndex][i];<br>
+               _cdt[i] = cdts[deltaTableIndex][i];<br>
+<br>
+               // Y skinny deltas need to be halved for some reason; maybe the<br>
+               // skinny Y deltas should be modified<br>
+               // Drop the lsb before dividing by 2-- net effect: round down<br>
+               // when dividing a negative number (e.g., -3/2 = -2, not -1)<br>
+               _ydt[i] &= 0xFFFE;<br>
+               _ydt[i] /= 2;<br>
+       }<br>
+}<br>
+<br>
+int TrueMotion1Decoder::makeYdt16Entry(int p1, int p2) {<br>
+#ifdef SCUMM_BIG_ENDIAN<br>
+       // Swap the values on BE systems. FFmpeg does this too.<br>
+       SWAP<int>(p1, p2);<br>
+#endif<br>
+<br>
+       int lo = _ydt[p1];<br>
+       lo += (lo << 6) + (lo << 11);<br>
+       int hi = _ydt[p2];<br>
+       hi += (hi << 6) + (hi << 11);<br>
+       return lo + (hi << 16);<br>
+}<br>
+<br>
+int TrueMotion1Decoder::makeCdt16Entry(int p1, int p2) {<br>
+       int b = _cdt[p2];<br>
+       int r = _cdt[p1] << 11;<br>
+       int lo = b + r;<br>
+       return lo + (lo << 16);<br>
+}<br>
+<br>
+void TrueMotion1Decoder::genVectorTable16(const byte *selVectorTable) {<br>
+       memset(&_yPredictorTable, 0, sizeof(PredictorTableEntry) * 1024);<br>
+       memset(&_cPredictorTable, 0, sizeof(PredictorTableEntry) * 1024);<br>
+<br>
+       for (int i = 0; i < 1024; i += 4) {<br>
+               int len = *selVectorTable++ / 2;<br>
+               for (int j = 0; j < len; j++) {<br>
+                       byte deltaPair = *selVectorTable++;<br>
+                       _yPredictorTable[i + j].color = makeYdt16Entry(deltaPair >> 4, deltaPair & 0xf);<br>
+                       _cPredictorTable[i + j].color = makeCdt16Entry(deltaPair >> 4, deltaPair & 0xf);<br>
+               }<br>
+<br>
+               _yPredictorTable[i + (len - 1)].getNextIndex = true;<br>
+               _cPredictorTable[i + (len - 1)].getNextIndex = true;<br>
+       }<br>
+}<br>
+<br>
+void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream *stream) {<br>
+       _buf = new byte[stream->size()];<br>
+       stream->read(_buf, stream->size());<br>
+<br>
+       byte headerBuffer[128];  // logical maximum size of the header<br>
+       const byte *selVectorTable;<br>
+<br>
+       // There is 1 change bit per 4 pixels, so each change byte represents<br>
+       // 32 pixels; divide width by 4 to obtain the number of change bits and<br>
+       // then round up to the nearest byte.<br>
+       _mbChangeBitsRowSize = ((_width >> 2) + 7) >> 3;<br>
+<br>
+       _header.headerSize = ((_buf[0] >> 5) | (_buf[0] << 3)) & 0x7f;<br>
+<br>
+       if (_buf[0] < 0x10)<br>
+               error("Invalid TrueMotion1 header size %d", _header.headerSize);<br>
+<br>
+       // unscramble the header bytes with a XOR operation<br>
+       memset(headerBuffer, 0, 128);<br>
+       for (int i = 1; i < _header.headerSize; i++)<br>
+               headerBuffer[i - 1] = _buf[i] ^ _buf[i + 1];<br>
+<br>
+       _header.compression = headerBuffer[0];<br>
+       _header.deltaset = headerBuffer[1];<br>
+       _header.vectable = headerBuffer[2];<br>
+       _header.ysize = READ_LE_UINT16(&headerBuffer[3]);<br>
+       _header.xsize = READ_LE_UINT16(&headerBuffer[5]);<br>
+       _header.checksum = READ_LE_UINT16(&headerBuffer[7]);<br>
+       _header.version = headerBuffer[9];<br>
+       _header.headerType = headerBuffer[10];<br>
+       _header.flags = headerBuffer[11];<br>
+       _header.control = headerBuffer[12];<br>
+<br>
+       // Version 2<br>
+       if (_header.version >= 2) {<br>
+               if (_header.headerType > 3) {<br>
+                       error("Invalid header type %d", _header.headerType);<br>
+               } else if (_header.headerType == 2 || _header.headerType == 3) {<br>
+                       _flags = _header.flags;<br>
+                       if (!(_flags & FLAG_INTERFRAME))<br>
+                               _flags |= FLAG_KEYFRAME;<br>
+               } else<br>
+                       _flags = FLAG_KEYFRAME;<br>
+       } else // Version 1<br>
+               _flags = FLAG_KEYFRAME;<br>
+<br>
+       if (_flags & FLAG_SPRITE) {<br>
+               error("SPRITE frame found, please report the sample to the developers");<br>
+       } else if (_header.headerType < 2 && _header.xsize < 213 && _header.ysize >= 176) {<br>
+               _flags |= FLAG_INTERPOLATED;<br>
+               error("INTERPOLATION selected, please report the sample to the developers");<br>
+       }<br>
+<br>
+       if (_header.compression >= 17)<br>
+               error("Invalid TrueMotion1 compression type %d", _header.compression);<br>
+<br>
+       if (_header.deltaset != _lastDeltaset || _header.vectable != _lastVectable)<br>
+               selectDeltaTables(_header.deltaset);<br>
+<br>
+       if ((_header.compression & 1) && _header.headerType)<br>
+               selVectorTable = pc_tbl2;<br>
+       else if (_header.vectable < 4)<br>
+               selVectorTable = tables[_header.vectable - 1];<br>
+       else<br>
+               error("Invalid vector table id %d", _header.vectable);<br>
+<br>
+       if (_header.deltaset != _lastDeltaset || _header.vectable != _lastVectable)<br>
+               genVectorTable16(selVectorTable);<br>
+<br>
+       // set up pointers to the other key data chunks<br>
+       _mbChangeBits = _buf + _header.headerSize;<br>
+<br>
+       if (_flags & FLAG_KEYFRAME) {<br>
+               // no change bits specified for a keyframe; only index bytes<br>
+               _indexStream = _mbChangeBits;<br>
+       } else {<br>
+               // one change bit per 4x4 block<br>
+               _indexStream = _mbChangeBits + _mbChangeBitsRowSize * (_height >> 2);<br>
+       }<br>
+<br>
+       _indexStreamSize = stream->size() - (_indexStream - _buf);<br>
+<br>
+       _lastDeltaset = _header.deltaset;<br>
+       _lastVectable = _header.vectable;<br>
+       _blockWidth = compressionTypes[_header.compression].blockWidth;<br>
+       _blockHeight = compressionTypes[_header.compression].blockHeight;<br>
+       _blockType = compressionTypes[_header.compression].blockType;<br>
+}<br>
+<br>
+#define GET_NEXT_INDEX() \<br>
+do { \<br>
+       if (indexStreamIndex >= _indexStreamSize) \<br>
+               error("TrueMotion1 decoder went out of bounds"); \<br>
+       index = _indexStream[indexStreamIndex++] * 4; \<br>
+} while (0) \<br>
+<br>
+#define APPLY_C_PREDICTOR() \<br>
+       predictor_pair = _cPredictorTable[index].color; \<br>
+       horizPred += predictor_pair; \<br>
+       if (_cPredictorTable[index].getNextIndex) { \<br>
+               GET_NEXT_INDEX(); \<br>
+               if (!index) { \<br>
+                       GET_NEXT_INDEX(); \<br>
+                       predictor_pair = _cPredictorTable[index].color; \<br>
+                       horizPred += predictor_pair * 5; \<br>
+                       if (_cPredictorTable[index].getNextIndex) \<br>
+                               GET_NEXT_INDEX(); \<br>
+                       else \<br>
+                               index++; \<br>
+               } \<br>
+       } else \<br>
+               index++<br>
+<br>
+#define APPLY_Y_PREDICTOR() \<br>
+       predictor_pair = _yPredictorTable[index].color; \<br>
+       horizPred += predictor_pair; \<br>
+       if (_yPredictorTable[index].getNextIndex) { \<br>
+               GET_NEXT_INDEX(); \<br>
+               if (!index) { \<br>
+                       GET_NEXT_INDEX(); \<br>
+                       predictor_pair = _yPredictorTable[index].color; \<br>
+                       horizPred += predictor_pair * 5; \<br>
+                       if (_yPredictorTable[index].getNextIndex) \<br>
+                               GET_NEXT_INDEX(); \<br>
+                       else \<br>
+                               index++; \<br>
+               } \<br>
+       } else \<br>
+               index++<br>
+<br>
+#define OUTPUT_PIXEL_PAIR() \<br>
+       *currentPixelPair = *vertPred + horizPred; \<br>
+       *vertPred++ = *currentPixelPair++<br>
+<br>
+void TrueMotion1Decoder::decode16() {<br>
+       uint32 predictor_pair;<br>
+       bool keyframe = _flags & FLAG_KEYFRAME;<br>
+       int indexStreamIndex = 0;<br>
+<br>
+       // these variables are for managing the main index stream<br>
+       int index;<br>
+<br>
+       // clean out the line buffer<br>
+       memset(_vertPred, 0, _width * 4);<br>
+<br>
+       GET_NEXT_INDEX();<br>
+<br>
+       for (int y = 0; y < _height; y++) {<br>
+               // re-init variables for the next line iteration<br>
+               uint32 horizPred = 0;<br>
+               uint32 *currentPixelPair = (uint32 *)_surface->getBasePtr(0, y);<br>
+               uint32 *vertPred = _vertPred;<br>
+               int mbChangeIndex = 0;<br>
+               byte mbChangeByte = _mbChangeBits[mbChangeIndex++];<br>
+               byte mbChangeByteMask = 1;<br>
+<br>
+               for (int pixelsLeft = _width; pixelsLeft > 0; pixelsLeft -= 4) {<br>
+                       if (keyframe || (mbChangeByte & mbChangeByteMask) == 0) {<br>
+                               switch (y & 3) {<br>
+                               case 0:<br>
+                                       // if macroblock width is 2, apply C-Y-C-Y; else<br>
+                                       // apply C-Y-Y<br>
+                                       if (_blockWidth == 2) {<br>
+                                               APPLY_C_PREDICTOR();<br>
+                                               APPLY_Y_PREDICTOR();<br>
+                                               OUTPUT_PIXEL_PAIR();<br>
<br>
<br>
Commit: c432b96cf667a1b7f1386cc4c97fcf5411690f7d<br>
    <a href="https://github.com/scummvm/scummvm/commit/c432b96cf667a1b7f1386cc4c97fcf5411690f7d" target="_blank">https://github.com/scummvm/scummvm/commit/c432b96cf667a1b7f1386cc4c97fcf5411690f7d</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:27:36-08:00<br>
<br>
Commit Message:<br>
IMAGE: Merge the JPEG codec into the ImageDecoder<br>
<br>
Changed paths:<br>
  R image/codecs/jpeg.cpp<br>
  R image/codecs/jpeg.h<br>
    image/jpeg.cpp<br>
    image/jpeg.h<br>
    image/<a href="http://module.mk" target="_blank">module.mk</a><br>
    video/qt_decoder.cpp<br>
<br>
<br>
<br>
diff --git a/image/codecs/jpeg.cpp b/image/codecs/jpeg.cpp<br>
deleted file mode 100644<br>
index 9e8ba5a..0000000<br>
--- a/image/codecs/jpeg.cpp<br>
+++ /dev/null<br>
@@ -1,66 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#include "common/system.h"<br>
-#include "common/textconsole.h"<br>
-#include "graphics/surface.h"<br>
-#include "image/jpeg.h"<br>
-<br>
-#include "image/codecs/jpeg.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Image {<br>
-<br>
-JPEGCodec::JPEGCodec() : Codec() {<br>
-       _pixelFormat = g_system->getScreenFormat();<br>
-       _surface = NULL;<br>
-}<br>
-<br>
-JPEGCodec::~JPEGCodec() {<br>
-       if (_surface) {<br>
-               _surface->free();<br>
-               delete _surface;<br>
-       }<br>
-}<br>
-<br>
-const Graphics::Surface *JPEGCodec::decodeImage(Common::SeekableReadStream *stream) {<br>
-       JPEGDecoder jpeg;<br>
-<br>
-       if (!jpeg.loadStream(*stream)) {<br>
-               warning("Failed to decode JPEG frame");<br>
-               return 0;<br>
-       }<br>
-<br>
-       if (_surface) {<br>
-               _surface->free();<br>
-               delete _surface;<br>
-       }<br>
-<br>
-       _surface = jpeg.getSurface()->convertTo(_pixelFormat);<br>
-<br>
-       return _surface;<br>
-}<br>
-<br>
-} // End of namespace Image<br>
diff --git a/image/codecs/jpeg.h b/image/codecs/jpeg.h<br>
deleted file mode 100644<br>
index d48604b..0000000<br>
--- a/image/codecs/jpeg.h<br>
+++ /dev/null<br>
@@ -1,60 +0,0 @@<br>
-/* ScummVM - Graphic Adventure Engine<br>
- *<br>
- * ScummVM is the legal property of its developers, whose names<br>
- * are too numerous to list here. Please refer to the COPYRIGHT<br>
- * file distributed with this source distribution.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of the GNU General Public License<br>
- * as published by the Free Software Foundation; either version 2<br>
- * of the License, or (at your option) any later version.<br>
- *<br>
- * This program is distributed in the hope that it will be useful,<br>
- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
- * GNU General Public License for more details.<br>
- *<br>
- * You should have received a copy of the GNU General Public License<br>
- * along with this program; if not, write to the Free Software<br>
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
- *<br>
- */<br>
-<br>
-#ifndef IMAGE_CODECS_JPEG_H<br>
-#define IMAGE_CODECS_JPEG_H<br>
-<br>
-#include "image/codecs/codec.h"<br>
-#include "graphics/pixelformat.h"<br>
-<br>
-namespace Common {<br>
-class SeekableReadStream;<br>
-}<br>
-<br>
-namespace Graphics {<br>
-struct Surface;<br>
-}<br>
-<br>
-namespace Image {<br>
-<br>
-/**<br>
- * JPEG decoder.<br>
- *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
- */<br>
-class JPEGCodec : public Codec {<br>
-public:<br>
-       JPEGCodec();<br>
-       ~JPEGCodec();<br>
-<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
-       Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
-<br>
-private:<br>
-       Graphics::PixelFormat _pixelFormat;<br>
-       Graphics::Surface *_surface;<br>
-};<br>
-<br>
-} // End of namespace Image<br>
-<br>
-#endif<br>
diff --git a/image/jpeg.cpp b/image/jpeg.cpp<br>
index 9d4b0a7..3602d50 100644<br>
--- a/image/jpeg.cpp<br>
+++ b/image/jpeg.cpp<br>
@@ -44,7 +44,7 @@ extern "C" {<br>
<br>
 namespace Image {<br>
<br>
-JPEGDecoder::JPEGDecoder() : ImageDecoder(), _surface(), _colorSpace(kColorSpaceRGBA) {<br>
+JPEGDecoder::JPEGDecoder() : _surface(), _colorSpace(kColorSpaceRGBA) {<br>
 }<br>
<br>
 JPEGDecoder::~JPEGDecoder() {<br>
@@ -59,6 +59,17 @@ void JPEGDecoder::destroy() {<br>
        _surface.free();<br>
 }<br>
<br>
+const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+       if (!loadStream(*stream))<br>
+               return 0;<br>
+<br>
+       return getSurface();<br>
+}<br>
+<br>
+Graphics::PixelFormat JPEGDecoder::getPixelFormat() const {<br>
+       return _surface.format;<br>
+}<br>
+<br>
 #ifdef USE_JPEG<br>
 namespace {<br>
<br>
diff --git a/image/jpeg.h b/image/jpeg.h<br>
index f578170..1bf76ec 100644<br>
--- a/image/jpeg.h<br>
+++ b/image/jpeg.h<br>
@@ -26,6 +26,12 @@<br>
  *  - groovie<br>
  *  - mohawk<br>
  *  - wintermute<br>
+ *<br>
+ * Used in image:<br>
+ *  - PICTDecoder<br>
+ *<br>
+ * Used in video:<br>
+ *  - QuickTimeDecoder<br>
  */<br>
<br>
 #ifndef IMAGE_JPEG_H<br>
@@ -33,6 +39,7 @@<br>
<br>
 #include "graphics/surface.h"<br>
 #include "image/image_decoder.h"<br>
+#include "image/codecs/codec.h"<br>
<br>
 namespace Common {<br>
 class SeekableReadStream;<br>
@@ -40,7 +47,7 @@ class SeekableReadStream;<br>
<br>
 namespace Image {<br>
<br>
-class JPEGDecoder : public ImageDecoder {<br>
+class JPEGDecoder : public ImageDecoder, public Codec {<br>
 public:<br>
        JPEGDecoder();<br>
        ~JPEGDecoder();<br>
@@ -50,6 +57,10 @@ public:<br>
        virtual bool loadStream(Common::SeekableReadStream &str);<br>
        virtual const Graphics::Surface *getSurface() const;<br>
<br>
+       // Codec API<br>
+       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::PixelFormat getPixelFormat() const;<br>
+<br>
        // Special API for JPEG<br>
        enum ColorSpace {<br>
                /**<br>
@@ -90,6 +101,6 @@ private:<br>
        ColorSpace _colorSpace;<br>
 };<br>
<br>
-} // End of Graphics namespace<br>
+} // End of namespace Image<br>
<br>
-#endif // GRAPHICS_JPEG_H<br>
+#endif<br>
diff --git a/image/<a href="http://module.mk" target="_blank">module.mk</a> b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
index 28d7503..46129cb 100644<br>
--- a/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
+++ b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
@@ -11,7 +11,6 @@ MODULE_OBJS := \<br>
        codecs/cdtoons.o \<br>
        codecs/cinepak.o \<br>
        codecs/indeo3.o \<br>
-       codecs/jpeg.o \<br>
        codecs/mjpeg.o \<br>
        codecs/msrle.o \<br>
        codecs/msvideo1.o \<br>
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp<br>
index 25ac05c..20c20d0 100644<br>
--- a/video/qt_decoder.cpp<br>
+++ b/video/qt_decoder.cpp<br>
@@ -40,7 +40,7 @@<br>
<br>
 // Video codecs<br>
 #include "image/codecs/cinepak.h"<br>
-#include "image/codecs/jpeg.h"<br>
+#include "image/jpeg.h"<br>
 #include "image/codecs/qtrle.h"<br>
 #include "image/codecs/rpza.h"<br>
 #include "image/codecs/smc.h"<br>
@@ -297,7 +297,7 @@ void QuickTimeDecoder::VideoSampleDesc::initCodec() {<br>
                break;<br>
        case MKTAG('j','p','e','g'):<br>
                // JPEG: Used by some Myst ME 10th Anniversary videos.<br>
-               _videoCodec = new Image::JPEGCodec();<br>
+               _videoCodec = new Image::JPEGDecoder();<br>
                break;<br>
        case MKTAG('Q','k','B','k'):<br>
                // CDToons: Used by most of the Broderbund games.<br>
<br>
<br>
Commit: e6717aaf43c7a25d426502a6d5d7028d50aab255<br>
    <a href="https://github.com/scummvm/scummvm/commit/e6717aaf43c7a25d426502a6d5d7028d50aab255" target="_blank">https://github.com/scummvm/scummvm/commit/e6717aaf43c7a25d426502a6d5d7028d50aab255</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:27:37-08:00<br>
<br>
Commit Message:<br>
IMAGE: Clarify difference between ImageDecoder and Codec a bit<br>
<br>
Changed paths:<br>
    image/codecs/codec.h<br>
    image/image_decoder.h<br>
<br>
<br>
<br>
diff --git a/image/codecs/codec.h b/image/codecs/codec.h<br>
index c84f3e3..1b7a295 100644<br>
--- a/image/codecs/codec.h<br>
+++ b/image/codecs/codec.h<br>
@@ -33,8 +33,16 @@ class SeekableReadStream;<br>
 namespace Image {<br>
<br>
 /**<br>
- * An abstract representation of a video codec used for decoding<br>
- * video frames.<br>
+ * An abstract representation of a image codec.<br>
+ *<br>
+ * Unlike ImageDecoder, the entire info for a frame may not be present<br>
+ * within the stream. The codec may rely on the supporting container<br>
+ * for parameters and can also rely on a previous (or future) frame.<br>
+ * When decoding, the previous frame may not destroyed and could be<br>
+ * maintained for use in the next one.<br>
+ *<br>
+ * An ImageDecoder can always be a Codec, but a Codec may not necessarily<br>
+ * be able to be an ImageDecoder.<br>
  *<br>
  * Used in video:<br>
  *  - AVIDecoder<br>
diff --git a/image/image_decoder.h b/image/image_decoder.h<br>
index 08fa4d8..4d3512e 100644<br>
--- a/image/image_decoder.h<br>
+++ b/image/image_decoder.h<br>
@@ -39,6 +39,8 @@ namespace Image {<br>
 /**<br>
  * A representation of an image decoder that maintains ownership of the surface<br>
  * and palette it decodes to.<br>
+ *<br>
+ * This is designed for still frames only.<br>
  */<br>
 class ImageDecoder {<br>
 public:<br>
<br>
<br>
Commit: 08ea14a8d0e1a1478d1f486edeecea3e619e0cd0<br>
    <a href="https://github.com/scummvm/scummvm/commit/08ea14a8d0e1a1478d1f486edeecea3e619e0cd0" target="_blank">https://github.com/scummvm/scummvm/commit/08ea14a8d0e1a1478d1f486edeecea3e619e0cd0</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:27:37-08:00<br>
<br>
Commit Message:<br>
IMAGE: Make Codec take a stream reference; change function name to decodeFrame<br>
<br>
Changed paths:<br>
    image/codecs/cdtoons.cpp<br>
    image/codecs/cdtoons.h<br>
    image/codecs/cinepak.cpp<br>
    image/codecs/cinepak.h<br>
    image/codecs/codec.h<br>
    image/codecs/indeo3.cpp<br>
    image/codecs/indeo3.h<br>
    image/codecs/mjpeg.cpp<br>
    image/codecs/mjpeg.h<br>
    image/codecs/mpeg.cpp<br>
    image/codecs/mpeg.h<br>
    image/codecs/msrle.cpp<br>
    image/codecs/msrle.h<br>
    image/codecs/msvideo1.cpp<br>
    image/codecs/msvideo1.h<br>
    image/codecs/qtrle.cpp<br>
    image/codecs/qtrle.h<br>
    image/codecs/rpza.cpp<br>
    image/codecs/rpza.h<br>
    image/codecs/smc.cpp<br>
    image/codecs/smc.h<br>
    image/codecs/svq1.cpp<br>
    image/codecs/svq1.h<br>
    image/codecs/truemotion1.cpp<br>
    image/codecs/truemotion1.h<br>
    image/jpeg.cpp<br>
    image/jpeg.h<br>
    video/avi_decoder.cpp<br>
    video/coktel_decoder.cpp<br>
    video/qt_decoder.cpp<br>
<br>
<br>
<br>
diff --git a/image/codecs/cdtoons.cpp b/image/codecs/cdtoons.cpp<br>
index e1246a0..6a2dc51 100644<br>
--- a/image/codecs/cdtoons.cpp<br>
+++ b/image/codecs/cdtoons.cpp<br>
@@ -39,12 +39,12 @@ struct CDToonsDiff {<br>
        Common::Rect rect;<br>
 };<br>
<br>
-static Common::Rect readRect(Common::SeekableReadStream *stream) {<br>
+static Common::Rect readRect(Common::SeekableReadStream &stream) {<br>
        Common::Rect rect;<br>
-       rect.top = stream->readUint16BE();<br>
-       rect.left = stream->readUint16BE();<br>
-       rect.bottom = stream->readUint16BE();<br>
-       rect.right = stream->readUint16BE();<br>
+       rect.top = stream.readUint16BE();<br>
+       rect.left = stream.readUint16BE();<br>
+       rect.bottom = stream.readUint16BE();<br>
+       rect.right = stream.readUint16BE();<br>
        return rect;<br>
 }<br>
<br>
@@ -67,14 +67,14 @@ CDToonsDecoder::~CDToonsDecoder() {<br>
                delete[] i->_value.data;<br>
 }<br>
<br>
-Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
-       uint16 u0 = stream->readUint16BE(); // always 9?<br>
-       uint16 frameId = stream->readUint16BE();<br>
-       uint16 blocksValidUntil = stream->readUint16BE();<br>
-       byte u6 = stream->readByte();<br>
-       byte backgroundColor = stream->readByte();<br>
+Graphics::Surface *CDToonsDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
+       uint16 u0 = stream.readUint16BE(); // always 9?<br>
+       uint16 frameId = stream.readUint16BE();<br>
+       uint16 blocksValidUntil = stream.readUint16BE();<br>
+       byte u6 = stream.readByte();<br>
+       byte backgroundColor = stream.readByte();<br>
        debugN(5, "CDToons frame %d, size %d, unknown %04x (at 0), blocks valid until %d, unknown 6 is %02x, bkg color is %02x\n",<br>
-               frameId, stream->size(), u0, blocksValidUntil, u6, backgroundColor);<br>
+               frameId, stream.size(), u0, blocksValidUntil, u6, backgroundColor);<br>
<br>
        Common::Rect clipRect = readRect(stream);<br>
        debugN(9, "CDToons clipRect: (%d, %d) to (%d, %d)\n",<br>
@@ -84,31 +84,31 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
        debugN(9, "CDToons dirtyRect: (%d, %d) to (%d, %d)\n",<br>
                dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);<br>
<br>
-       uint32 flags = stream->readUint32BE();<br>
+       uint32 flags = stream.readUint32BE();<br>
        if (flags & 0x80)<br>
                error("CDToons: frame already processed?");<br>
        debugN(5, "CDToons flags: %08x\n", flags);<br>
<br>
-       uint16 blockCount = stream->readUint16BE();<br>
-       uint16 blockOffset = stream->readUint16BE();<br>
+       uint16 blockCount = stream.readUint16BE();<br>
+       uint16 blockOffset = stream.readUint16BE();<br>
        debugN(9, "CDToons: %d blocks at 0x%04x\n",<br>
                blockCount, blockOffset);<br>
<br>
        // max block id?<br>
-       uint16 u32 = stream->readUint16BE();<br>
+       uint16 u32 = stream.readUint16BE();<br>
        debugN(5, "CDToons unknown at 32: %04x\n", u32);<br>
<br>
-       byte actionCount = stream->readByte();<br>
-       byte u35 = stream->readByte();<br>
+       byte actionCount = stream.readByte();<br>
+       byte u35 = stream.readByte();<br>
<br>
-       uint16 paletteId = stream->readUint16BE();<br>
-       byte paletteSet = stream->readByte();<br>
+       uint16 paletteId = stream.readUint16BE();<br>
+       byte paletteSet = stream.readByte();<br>
        debugN(9, "CDToons palette id %04x, palette byte %02x\n",<br>
                paletteId, paletteSet);<br>
<br>
-       byte u39 = stream->readByte();<br>
-       uint16 u40 = stream->readUint16BE();<br>
-       uint16 u42 = stream->readUint16BE();<br>
+       byte u39 = stream.readByte();<br>
+       uint16 u40 = stream.readUint16BE();<br>
+       uint16 u42 = stream.readUint16BE();<br>
        debugN(5, "CDToons: unknown at 35 is %02x, unknowns at 39: %02x, %04x, %04x\n",<br>
                u35, u39, u40, u42);<br>
<br>
@@ -116,41 +116,41 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
<br>
        for (uint i = 0; i < actionCount; i++) {<br>
                CDToonsAction action;<br>
-               action.blockId = stream->readUint16BE();<br>
+               action.blockId = stream.readUint16BE();<br>
                action.rect = readRect(stream);<br>
                debugN(9, "CDToons action: render block %d at (%d, %d) to (%d, %d)\n",<br>
                        action.blockId, action.rect.left, action.rect.top, action.rect.right, action.rect.bottom);<br>
                actions.push_back(action);<br>
        }<br>
<br>
-       if (stream->pos() > blockOffset)<br>
+       if (stream.pos() > blockOffset)<br>
                error("CDToons header ended at 0x%08x, but blocks should have started at 0x%08x",<br>
-                       stream->pos(), blockOffset);<br>
+                       stream.pos(), blockOffset);<br>
<br>
-       if (stream->pos() != blockOffset)<br>
-               error("CDToons had %d unknown bytes after header", blockOffset - stream->pos());<br>
+       if (stream.pos() != blockOffset)<br>
+               error("CDToons had %d unknown bytes after header", blockOffset - stream.pos());<br>
<br>
        for (uint i = 0; i < blockCount; i++) {<br>
-               uint16 blockId = stream->readUint16BE();<br>
+               uint16 blockId = stream.readUint16BE();<br>
                if (blockId >= 1200)<br>
                        error("CDToons: block id %d was too high", blockId);<br>
                if (_blocks.contains(blockId))<br>
                        error("CDToons: new block %d was already seen", blockId);<br>
<br>
                CDToonsBlock block;<br>
-               block.flags = stream->readUint16BE();<br>
+               block.flags = stream.readUint16BE();<br>
                // flag 1 = palette, flag 2 = data?<br>
                if (block.flags & 0x8000)<br>
                        error("CDToons: block already processed?");<br>
-               block.size = stream->readUint32BE();<br>
+               block.size = stream.readUint32BE();<br>
                if (block.size < 14)<br>
                        error("CDToons: block size was %d, too small", block.size);<br>
                block.size -= 14;<br>
-               block.startFrame = stream->readUint16BE();<br>
-               block.endFrame = stream->readUint16BE();<br>
-               block.unknown12 = stream->readUint16BE();<br>
+               block.startFrame = stream.readUint16BE();<br>
+               block.endFrame = stream.readUint16BE();<br>
+               block.unknown12 = stream.readUint16BE();<br>
                block.data = new byte[block.size];<br>
-               stream->read(block.data, block.size);<br>
+               stream.read(block.data, block.size);<br>
<br>
                debugN(9, "CDToons block id 0x%04x of size 0x%08x, flags %04x, from frame %d to %d, unknown at 12 is %04x\n",<br>
                        blockId, block.size, block.flags, block.startFrame, block.endFrame, block.unknown12);<br>
@@ -162,16 +162,16 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
        Common::Array<CDToonsDiff> diffs;<br>
<br>
        while (true) {<br>
-               int32 nextPos = stream->pos();<br>
-               uint32 tag = stream->readUint32BE();<br>
-               uint32 size = stream->readUint32BE();<br>
+               int32 nextPos = stream.pos();<br>
+               uint32 tag = stream.readUint32BE();<br>
+               uint32 size = stream.readUint32BE();<br>
                nextPos += size;<br>
<br>
                switch (tag) {<br>
                case MKTAG('D','i','f','f'):<br>
                        {<br>
                        debugN(5, "CDToons: Diff\n");<br>
-                       uint16 count = stream->readUint16BE();<br>
+                       uint16 count = stream.readUint16BE();<br>
<br>
                        Common::Rect diffClipRect = readRect(stream);<br>
                        debugN(9, "CDToons diffClipRect: (%d, %d) to (%d, %d)\n",<br>
@@ -182,14 +182,14 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
                                CDToonsDiff diff;<br>
<br>
                                diff.rect = readRect(stream);<br>
-                               diff.size = stream->readUint32BE();<br>
+                               diff.size = stream.readUint32BE();<br>
                                if (diff.size < 20)<br>
                                        error("CDToons: Diff block size was %d, too small", diff.size);<br>
<br>
-                               uint16 diffWidth = stream->readUint16BE();<br>
-                               uint16 diffHeight = stream->readUint16BE();<br>
-                               uint16 unknown16 = stream->readUint16BE();<br>
-                               uint16 unknown18 = stream->readUint16BE();<br>
+                               uint16 diffWidth = stream.readUint16BE();<br>
+                               uint16 diffHeight = stream.readUint16BE();<br>
+                               uint16 unknown16 = stream.readUint16BE();<br>
+                               uint16 unknown18 = stream.readUint16BE();<br>
                                diff.size -= 8;<br>
<br>
                                if (diffWidth != diff.rect.width() || diffHeight != diff.rect.height())<br>
@@ -199,7 +199,7 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
                                        unknown16, unknown18);<br>
<br>
                                diff.data = new byte[diff.size];<br>
-                               stream->read(diff.data, diff.size);<br>
+                               stream.read(diff.data, diff.size);<br>
                                diffs.push_back(diff);<br>
                        }<br>
                        }<br>
@@ -212,8 +212,8 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
<br>
                        if (xFrmBegin)<br>
                                error("CDToons: duplicate XFrm");<br>
-                       xFrmBegin = stream->readByte();<br>
-                       xFrmCount = stream->readByte();<br>
+                       xFrmBegin = stream.readByte();<br>
+                       xFrmCount = stream.readByte();<br>
                        debugN(9, "CDToons XFrm: run %d actions from %d\n", xFrmCount, xFrmBegin - 1);<br>
<br>
                        // TODO: don't ignore (if xFrmCount is non-zero)<br>
@@ -248,7 +248,7 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
                        if (!(flags & 0x40))<br>
                                error("CDToons: useless FrtR?");<br>
<br>
-                       uint16 count = stream->readUint16BE();<br>
+                       uint16 count = stream.readUint16BE();<br>
                        debugN(9, "CDToons FrtR: %d dirty rectangles\n", count);<br>
                        for (uint i = 0; i < count; i++) {<br>
                                Common::Rect dirtyRectFrtR = readRect(stream);<br>
@@ -263,7 +263,7 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
                        if (!(flags & 0x20))<br>
                                error("CDToons: useless BckR?");<br>
<br>
-                       uint16 count = stream->readUint16BE();<br>
+                       uint16 count = stream.readUint16BE();<br>
                        debugN(9, "CDToons BckR: %d subentries\n", count);<br>
                        for (uint i = 0; i < count; i++) {<br>
                                Common::Rect dirtyRectBckR = readRect(stream);<br>
@@ -276,15 +276,15 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea<br>
                        warning("Unknown CDToons tag '%s'", tag2str(tag));<br>
                }<br>
<br>
-               if (stream->pos() > nextPos)<br>
+               if (stream.pos() > nextPos)<br>
                        error("CDToons ran off the end of a block while reading it (at %d, next block at %d)",<br>
-                               stream->pos(), nextPos);<br>
-               if (stream->pos() != nextPos) {<br>
-                       warning("CDToons had %d unknown bytes after block", nextPos - stream->pos());<br>
-                       stream->seek(nextPos);<br>
+                               stream.pos(), nextPos);<br>
+               if (stream.pos() != nextPos) {<br>
+                       warning("CDToons had %d unknown bytes after block", nextPos - stream.pos());<br>
+                       stream.seek(nextPos);<br>
                }<br>
<br>
-               if (stream->pos() == stream->size())<br>
+               if (stream.pos() == stream.size())<br>
                        break;<br>
        }<br>
<br>
diff --git a/image/codecs/cdtoons.h b/image/codecs/cdtoons.h<br>
index ac569b5..a75ce55 100644<br>
--- a/image/codecs/cdtoons.h<br>
+++ b/image/codecs/cdtoons.h<br>
@@ -49,7 +49,7 @@ public:<br>
        CDToonsDecoder(uint16 width, uint16 height);<br>
        ~CDToonsDecoder();<br>
<br>
-       Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
        bool containsPalette() const { return true; }<br>
        const byte *getPalette() { _dirtyPalette = false; return _palette; }<br>
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp<br>
index 6af7ab0..8d5dbce 100644<br>
--- a/image/codecs/cinepak.cpp<br>
+++ b/image/codecs/cinepak.cpp<br>
@@ -83,13 +83,13 @@ CinepakDecoder::~CinepakDecoder() {<br>
        delete[] _clipTableBuf;<br>
 }<br>
<br>
-const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
-       _curFrame.flags = stream->readByte();<br>
-       _curFrame.length = (stream->readByte() << 16);<br>
-       _curFrame.length |= stream->readUint16BE();<br>
-       _curFrame.width = stream->readUint16BE();<br>
-       _curFrame.height = stream->readUint16BE();<br>
-       _curFrame.stripCount = stream->readUint16BE();<br>
+const Graphics::Surface *CinepakDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
+       _curFrame.flags = stream.readByte();<br>
+       _curFrame.length = (stream.readByte() << 16);<br>
+       _curFrame.length |= stream.readUint16BE();<br>
+       _curFrame.width = stream.readUint16BE();<br>
+       _curFrame.height = stream.readUint16BE();<br>
+       _curFrame.stripCount = stream.readUint16BE();<br>
<br>
        if (_curFrame.strips == NULL)<br>
                _curFrame.strips = new CinepakStrip[_curFrame.stripCount];<br>
@@ -98,11 +98,11 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream<br>
<br>
        // Borrowed from FFMPEG. This should cut out the extra data Cinepak for Sega has (which is useless).<br>
        // The theory behind this is that this is here to confuse standard Cinepak decoders. But, we won't let that happen! ;)<br>
-       if (_curFrame.length != (uint32)stream->size()) {<br>
-               if (stream->readUint16BE() == 0xFE00)<br>
-                       stream->readUint32BE();<br>
-               else if ((stream->size() % _curFrame.length) == 0)<br>
-                       stream->seek(-2, SEEK_CUR);<br>
+       if (_curFrame.length != (uint32)stream.size()) {<br>
+               if (stream.readUint16BE() == 0xFE00)<br>
+                       stream.readUint32BE();<br>
+               else if ((stream.size() % _curFrame.length) == 0)<br>
+                       stream.seek(-2, SEEK_CUR);<br>
        }<br>
<br>
        if (!_curFrame.surface) {<br>
@@ -121,29 +121,29 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream<br>
                        }<br>
                }<br>
<br>
-               _curFrame.strips[i].id = stream->readUint16BE();<br>
-               _curFrame.strips[i].length = stream->readUint16BE() - 12; // Subtract the 12 byte header<br>
-               _curFrame.strips[i].rect.top = _y; stream->readUint16BE(); // Ignore, substitute with our own.<br>
-               _curFrame.strips[i].rect.left = 0; stream->readUint16BE(); // Ignore, substitute with our own<br>
-               _curFrame.strips[i].rect.bottom = _y + stream->readUint16BE();<br>
-               _curFrame.strips[i].rect.right = _curFrame.width; stream->readUint16BE(); // Ignore, substitute with our own<br>
+               _curFrame.strips[i].id = stream.readUint16BE();<br>
+               _curFrame.strips[i].length = stream.readUint16BE() - 12; // Subtract the 12 byte header<br>
+               _curFrame.strips[i].rect.top = _y; stream.readUint16BE(); // Ignore, substitute with our own.<br>
+               _curFrame.strips[i].rect.left = 0; stream.readUint16BE(); // Ignore, substitute with our own<br>
+               _curFrame.strips[i].rect.bottom = _y + stream.readUint16BE();<br>
+               _curFrame.strips[i].rect.right = _curFrame.width; stream.readUint16BE(); // Ignore, substitute with our own<br>
<br>
                // Sanity check. Because Cinepak is based on 4x4 blocks, the width and height of each strip needs to be divisible by 4.<br>
                assert(!(_curFrame.strips[i].rect.width() % 4) && !(_curFrame.strips[i].rect.height() % 4));<br>
<br>
-               uint32 pos = stream->pos();<br>
+               uint32 pos = stream.pos();<br>
<br>
-               while ((uint32)stream->pos() < (pos + _curFrame.strips[i].length) && !stream->eos()) {<br>
-                       byte chunkID = stream->readByte();<br>
+               while ((uint32)stream.pos() < (pos + _curFrame.strips[i].length) && !stream.eos()) {<br>
+                       byte chunkID = stream.readByte();<br>
<br>
-                       if (stream->eos())<br>
+                       if (stream.eos())<br>
                                break;<br>
<br>
                        // Chunk Size is 24-bit, ignore the first 4 bytes<br>
-                       uint32 chunkSize = stream->readByte() << 16;<br>
-                       chunkSize += stream->readUint16BE() - 4;<br>
+                       uint32 chunkSize = stream.readByte() << 16;<br>
+                       chunkSize += stream.readUint16BE() - 4;<br>
<br>
-                       int32 startPos = stream->pos();<br>
+                       int32 startPos = stream.pos();<br>
<br>
                        switch (chunkID) {<br>
                        case 0x20:<br>
@@ -168,8 +168,8 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream<br>
                                return _curFrame.surface;<br>
                        }<br>
<br>
-                       if (stream->pos() != startPos + (int32)chunkSize)<br>
-                               stream->seek(startPos + chunkSize);<br>
+                       if (stream.pos() != startPos + (int32)chunkSize)<br>
+                               stream.seek(startPos + chunkSize);<br>
                }<br>
<br>
                _y = _curFrame.strips[i].rect.bottom;<br>
@@ -178,32 +178,32 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream<br>
        return _curFrame.surface;<br>
 }<br>
<br>
-void CinepakDecoder::loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize) {<br>
+void CinepakDecoder::loadCodebook(Common::SeekableReadStream &stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize) {<br>
        CinepakCodebook *codebook = (codebookType == 1) ? _curFrame.strips[strip].v1_codebook : _curFrame.strips[strip].v4_codebook;<br>
<br>
-       int32 startPos = stream->pos();<br>
+       int32 startPos = stream.pos();<br>
        uint32 flag = 0, mask = 0;<br>
<br>
        for (uint16 i = 0; i < 256; i++) {<br>
                if ((chunkID & 0x01) && !(mask >>= 1)) {<br>
-                       if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                       if ((stream.pos() - startPos + 4) > (int32)chunkSize)<br>
                                break;<br>
<br>
-                       flag  = stream->readUint32BE();<br>
+                       flag  = stream.readUint32BE();<br>
                        mask  = 0x80000000;<br>
                }<br>
<br>
                if (!(chunkID & 0x01) || (flag & mask)) {<br>
                        byte n = (chunkID & 0x04) ? 4 : 6;<br>
-                       if ((stream->pos() - startPos + n) > (int32)chunkSize)<br>
+                       if ((stream.pos() - startPos + n) > (int32)chunkSize)<br>
                                break;<br>
<br>
                        for (byte j = 0; j < 4; j++)<br>
-                               codebook[i].y[j] = stream->readByte();<br>
+                               codebook[i].y[j] = stream.readByte();<br>
<br>
                        if (n == 6) {<br>
-                               codebook[i].u = stream->readSByte();<br>
-                               codebook[i].v = stream->readSByte();<br>
+                               codebook[i].u = stream.readSByte();<br>
+                               codebook[i].v = stream.readSByte();<br>
                        } else {<br>
                                // This codebook type indicates either greyscale or<br>
                                // palettized video. For greyscale, default us to<br>
@@ -215,10 +215,10 @@ void CinepakDecoder::loadCodebook(Common::SeekableReadStream *stream, uint16 str<br>
        }<br>
 }<br>
<br>
-void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize) {<br>
+void CinepakDecoder::decodeVectors(Common::SeekableReadStream &stream, uint16 strip, byte chunkID, uint32 chunkSize) {<br>
        uint32 flag = 0, mask = 0;<br>
        uint32 iy[4];<br>
-       int32 startPos = stream->pos();<br>
+       int32 startPos = stream.pos();<br>
<br>
        for (uint16 y = _curFrame.strips[strip].rect.top; y < _curFrame.strips[strip].rect.bottom; y += 4) {<br>
                iy[0] = _curFrame.strips[strip].rect.left + y * _curFrame.width;<br>
@@ -228,28 +228,28 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st<br>
<br>
                for (uint16 x = _curFrame.strips[strip].rect.left; x < _curFrame.strips[strip].rect.right; x += 4) {<br>
                        if ((chunkID & 0x01) && !(mask >>= 1)) {<br>
-                               if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                               if ((stream.pos() - startPos + 4) > (int32)chunkSize)<br>
                                        return;<br>
<br>
-                               flag  = stream->readUint32BE();<br>
+                               flag  = stream.readUint32BE();<br>
                                mask  = 0x80000000;<br>
                        }<br>
<br>
                        if (!(chunkID & 0x01) || (flag & mask)) {<br>
                                if (!(chunkID & 0x02) && !(mask >>= 1)) {<br>
-                                       if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                                       if ((stream.pos() - startPos + 4) > (int32)chunkSize)<br>
                                                return;<br>
<br>
-                                       flag  = stream->readUint32BE();<br>
+                                       flag  = stream.readUint32BE();<br>
                                        mask  = 0x80000000;<br>
                                }<br>
<br>
                                if ((chunkID & 0x02) || (~flag & mask)) {<br>
-                                       if ((stream->pos() - startPos + 1) > (int32)chunkSize)<br>
+                                       if ((stream.pos() - startPos + 1) > (int32)chunkSize)<br>
                                                return;<br>
<br>
                                        // Get the codebook<br>
-                                       CinepakCodebook codebook = _curFrame.strips[strip].v1_codebook[stream->readByte()];<br>
+                                       CinepakCodebook codebook = _curFrame.strips[strip].v1_codebook[stream.readByte()];<br>
<br>
                                        PUT_PIXEL(iy[0] + 0, codebook.y[0], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[0] + 1, codebook.y[0], codebook.u, codebook.v);<br>
@@ -271,28 +271,28 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st<br>
                                        PUT_PIXEL(iy[3] + 2, codebook.y[3], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[3] + 3, codebook.y[3], codebook.u, codebook.v);<br>
                                } else if (flag & mask) {<br>
-                                       if ((stream->pos() - startPos + 4) > (int32)chunkSize)<br>
+                                       if ((stream.pos() - startPos + 4) > (int32)chunkSize)<br>
                                                return;<br>
<br>
-                                       CinepakCodebook codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       CinepakCodebook codebook = _curFrame.strips[strip].v4_codebook[stream.readByte()];<br>
                                        PUT_PIXEL(iy[0] + 0, codebook.y[0], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[0] + 1, codebook.y[1], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[1] + 0, codebook.y[2], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[1] + 1, codebook.y[3], codebook.u, codebook.v);<br>
<br>
-                                       codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       codebook = _curFrame.strips[strip].v4_codebook[stream.readByte()];<br>
                                        PUT_PIXEL(iy[0] + 2, codebook.y[0], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[0] + 3, codebook.y[1], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[1] + 2, codebook.y[2], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[1] + 3, codebook.y[3], codebook.u, codebook.v);<br>
<br>
-                                       codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       codebook = _curFrame.strips[strip].v4_codebook[stream.readByte()];<br>
                                        PUT_PIXEL(iy[2] + 0, codebook.y[0], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[2] + 1, codebook.y[1], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[3] + 0, codebook.y[2], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[3] + 1, codebook.y[3], codebook.u, codebook.v);<br>
<br>
-                                       codebook = _curFrame.strips[strip].v4_codebook[stream->readByte()];<br>
+                                       codebook = _curFrame.strips[strip].v4_codebook[stream.readByte()];<br>
                                        PUT_PIXEL(iy[2] + 2, codebook.y[0], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[2] + 3, codebook.y[1], codebook.u, codebook.v);<br>
                                        PUT_PIXEL(iy[3] + 2, codebook.y[2], codebook.u, codebook.v);<br>
diff --git a/image/codecs/cinepak.h b/image/codecs/cinepak.h<br>
index 99a316e..985fc91 100644<br>
--- a/image/codecs/cinepak.h<br>
+++ b/image/codecs/cinepak.h<br>
@@ -71,7 +71,7 @@ public:<br>
        CinepakDecoder(int bitsPerPixel = 24);<br>
        ~CinepakDecoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
<br>
 private:<br>
@@ -80,8 +80,8 @@ private:<br>
        Graphics::PixelFormat _pixelFormat;<br>
        byte *_clipTable, *_clipTableBuf;<br>
<br>
-       void loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);<br>
-       void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize);<br>
+       void loadCodebook(Common::SeekableReadStream &stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);<br>
+       void decodeVectors(Common::SeekableReadStream &stream, uint16 strip, byte chunkID, uint32 chunkSize);<br>
 };<br>
<br>
 } // End of namespace Image<br>
diff --git a/image/codecs/codec.h b/image/codecs/codec.h<br>
index 1b7a295..092f975 100644<br>
--- a/image/codecs/codec.h<br>
+++ b/image/codecs/codec.h<br>
@@ -59,9 +59,8 @@ public:<br>
         * containing the decoded frame.<br>
         *<br>
         * @return a pointer to the decoded frame<br>
-        * @note stream is not deleted<br>
         */<br>
-       virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;<br>
+       virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) = 0;<br>
<br>
        /**<br>
         * Get the format that the surface returned from decodeImage() will<br>
diff --git a/image/codecs/indeo3.cpp b/image/codecs/indeo3.cpp<br>
index 77bcec0..af9120c 100644<br>
--- a/image/codecs/indeo3.cpp<br>
+++ b/image/codecs/indeo3.cpp<br>
@@ -165,24 +165,24 @@ void Indeo3Decoder::allocFrames() {<br>
        }<br>
 }<br>
<br>
-const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *Indeo3Decoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        // Not Indeo 3? Fail<br>
-       if (!isIndeo3(*stream))<br>
+       if (!isIndeo3(stream))<br>
                return 0;<br>
<br>
-       stream->seek(12);<br>
-       uint32 frameDataLen = stream->readUint32LE();<br>
+       stream.seek(12);<br>
+       uint32 frameDataLen = stream.readUint32LE();<br>
<br>
        // Less data than the frame should have? Fail<br>
-       if (stream->size() < (int)(frameDataLen - 16))<br>
+       if (stream.size() < (int)(frameDataLen - 16))<br>
                return 0;<br>
<br>
-       stream->seek(16); // Behind header<br>
-       stream->skip(2);  // Unknown<br>
+       stream.seek(16); // Behind header<br>
+       stream.skip(2);  // Unknown<br>
<br>
-       uint16 flags1 = stream->readUint16LE();<br>
-       uint32 flags3 = stream->readUint32LE();<br>
-       uint8  flags2 = stream->readByte();<br>
+       uint16 flags1 = stream.readUint16LE();<br>
+       uint32 flags3 = stream.readUint32LE();<br>
+       uint8  flags2 = stream.readByte();<br>
<br>
        // Finding the reference frame<br>
        if (flags1 & 0x200) {<br>
@@ -196,22 +196,22 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *<br>
        if (flags3 == 0x80)<br>
                return _surface;<br>
<br>
-       stream->skip(3);<br>
+       stream.skip(3);<br>
<br>
-       uint16 fHeight = stream->readUint16LE();<br>
-       uint16 fWidth  = stream->readUint16LE();<br>
+       uint16 fHeight = stream.readUint16LE();<br>
+       uint16 fWidth  = stream.readUint16LE();<br>
<br>
        uint32 chromaHeight = ((fHeight >> 2) + 3) & 0x7FFC;<br>
        uint32 chromaWidth  = ((fWidth  >> 2) + 3) & 0x7FFC;<br>
<br>
        uint32 offs;<br>
-       uint32 offsY = stream->readUint32LE() + 16;<br>
-       uint32 offsU = stream->readUint32LE() + 16;<br>
-       uint32 offsV = stream->readUint32LE() + 16;<br>
+       uint32 offsY = stream.readUint32LE() + 16;<br>
+       uint32 offsU = stream.readUint32LE() + 16;<br>
+       uint32 offsV = stream.readUint32LE() + 16;<br>
<br>
-       stream->skip(4);<br>
+       stream.skip(4);<br>
<br>
-       uint32 hPos = stream->pos();<br>
+       uint32 hPos = stream.pos();<br>
<br>
        if (offsY < hPos) {<br>
                warning("Indeo3Decoder::decodeImage: offsY < hPos");<br>
@@ -226,11 +226,11 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *<br>
                return 0;<br>
        }<br>
<br>
-       uint32 dataSize = stream->size() - hPos;<br>
+       uint32 dataSize = stream.size() - hPos;<br>
<br>
        byte *inData = new byte[dataSize];<br>
<br>
-       if (stream->read(inData, dataSize) != dataSize) {<br>
+       if (stream.read(inData, dataSize) != dataSize) {<br>
                delete[] inData;<br>
                return 0;<br>
        }<br>
@@ -239,23 +239,23 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *<br>
        byte *buf_pos;<br>
<br>
        // Luminance Y<br>
-       stream->seek(offsY);<br>
+       stream.seek(offsY);<br>
        buf_pos = inData + offsY + 4 - hPos;<br>
-       offs = stream->readUint32LE();<br>
+       offs = stream.readUint32LE();<br>
        decodeChunk(_cur_frame->Ybuf, _ref_frame->Ybuf, fWidth, fHeight,<br>
                        buf_pos + offs * 2, flags2, hdr_pos, buf_pos, MIN<int>(fWidth, 160));<br>
<br>
        // Chrominance U<br>
-       stream->seek(offsU);<br>
+       stream.seek(offsU);<br>
        buf_pos = inData + offsU + 4 - hPos;<br>
-       offs = stream->readUint32LE();<br>
+       offs = stream.readUint32LE();<br>
        decodeChunk(_cur_frame->Vbuf, _ref_frame->Vbuf, chromaWidth, chromaHeight,<br>
                        buf_pos + offs * 2, flags2, hdr_pos, buf_pos, MIN<int>(chromaWidth, 40));<br>
<br>
        // Chrominance V<br>
-       stream->seek(offsV);<br>
+       stream.seek(offsV);<br>
        buf_pos = inData + offsV + 4 - hPos;<br>
-       offs = stream->readUint32LE();<br>
+       offs = stream.readUint32LE();<br>
        decodeChunk(_cur_frame->Ubuf, _ref_frame->Ubuf, chromaWidth, chromaHeight,<br>
                        buf_pos + offs * 2, flags2, hdr_pos, buf_pos, MIN<int>(chromaWidth, 40));<br>
<br>
diff --git a/image/codecs/indeo3.h b/image/codecs/indeo3.h<br>
index 275cbc1..f1b406d 100644<br>
--- a/image/codecs/indeo3.h<br>
+++ b/image/codecs/indeo3.h<br>
@@ -48,7 +48,7 @@ public:<br>
        Indeo3Decoder(uint16 width, uint16 height);<br>
        ~Indeo3Decoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const;<br>
<br>
        static bool isIndeo3(Common::SeekableReadStream &stream);<br>
diff --git a/image/codecs/mjpeg.cpp b/image/codecs/mjpeg.cpp<br>
index aa7e1d0..4ad72f2 100644<br>
--- a/image/codecs/mjpeg.cpp<br>
+++ b/image/codecs/mjpeg.cpp<br>
@@ -147,20 +147,20 @@ static const byte s_mjpegValACChrominance[] = {<br>
        0xf9, 0xfa<br>
 };<br>
<br>
-const Graphics::Surface *MJPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *MJPEGDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        // We need to reconstruct an actual JPEG stream here, then feed it to the JPEG decoder<br>
        // Yes, this is a pain.<br>
<br>
-       stream->readUint32BE(); // Skip nonsense JPEG header<br>
-       uint16 inputSkip = stream->readUint16BE() + 4;<br>
-       uint32 tag = stream->readUint32BE();<br>
+       stream.readUint32BE(); // Skip nonsense JPEG header<br>
+       uint16 inputSkip = stream.readUint16BE() + 4;<br>
+       uint32 tag = stream.readUint32BE();<br>
<br>
        if (tag != MKTAG('A', 'V', 'I', '1')) {<br>
                warning("Invalid MJPEG tag found");<br>
                return 0;<br>
        }<br>
<br>
-       uint32 outputSize = stream->size() - inputSkip + sizeof(s_jpegHeader) + DHT_SEGMENT_SIZE;<br>
+       uint32 outputSize = stream.size() - inputSkip + sizeof(s_jpegHeader) + DHT_SEGMENT_SIZE;<br>
        byte *data = (byte *)malloc(outputSize);<br>
<br>
        if (!data) {<br>
@@ -193,8 +193,8 @@ const Graphics::Surface *MJPEGDecoder::decodeImage(Common::SeekableReadStream *s<br>
        dataOffset += 162;<br>
<br>
        // Write the actual data<br>
-       stream->seek(inputSkip);<br>
-       stream->read(data + dataOffset, stream->size() - inputSkip);<br>
+       stream.seek(inputSkip);<br>
+       stream.read(data + dataOffset, stream.size() - inputSkip);<br>
<br>
        Common::MemoryReadStream convertedStream(data, outputSize, DisposeAfterUse::YES);<br>
        JPEGDecoder jpeg;<br>
diff --git a/image/codecs/mjpeg.h b/image/codecs/mjpeg.h<br>
index b34b84b..904b89d 100644<br>
--- a/image/codecs/mjpeg.h<br>
+++ b/image/codecs/mjpeg.h<br>
@@ -47,7 +47,7 @@ public:<br>
        MJPEGDecoder();<br>
        ~MJPEGDecoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
<br>
 private:<br>
diff --git a/image/codecs/mpeg.cpp b/image/codecs/mpeg.cpp<br>
index d81123f..beb042d 100644<br>
--- a/image/codecs/mpeg.cpp<br>
+++ b/image/codecs/mpeg.cpp<br>
@@ -52,13 +52,13 @@ MPEGDecoder::~MPEGDecoder() {<br>
        }<br>
 }<br>
<br>
-const Graphics::Surface *MPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *MPEGDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        uint32 framePeriod;<br>
        decodePacket(stream, framePeriod);<br>
        return _surface;<br>
 }<br>
<br>
-bool MPEGDecoder::decodePacket(Common::SeekableReadStream *packet, uint32 &framePeriod, Graphics::Surface *dst) {<br>
+bool MPEGDecoder::decodePacket(Common::SeekableReadStream &packet, uint32 &framePeriod, Graphics::Surface *dst) {<br>
        // Decode as much as we can out of this packet<br>
        uint32 size = 0xFFFFFFFF;<br>
        mpeg2_state_t state;<br>
@@ -70,7 +70,7 @@ bool MPEGDecoder::decodePacket(Common::SeekableReadStream *packet, uint32 &frame<br>
<br>
                switch (state) {<br>
                case STATE_BUFFER:<br>
-                       size = packet->read(_buffer, BUFFER_SIZE);<br>
+                       size = packet.read(_buffer, BUFFER_SIZE);<br>
                        mpeg2_buffer(_mpegDecoder, _buffer, _buffer + size);<br>
                        break;<br>
                case STATE_SLICE:<br>
diff --git a/image/codecs/mpeg.h b/image/codecs/mpeg.h<br>
index b9e961c..7f231dd 100644<br>
--- a/image/codecs/mpeg.h<br>
+++ b/image/codecs/mpeg.h<br>
@@ -72,11 +72,11 @@ public:<br>
        ~MPEGDecoder();<br>
<br>
        // Codec interface<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }<br>
<br>
        // MPEGPSDecoder call<br>
-       bool decodePacket(Common::SeekableReadStream *packet, uint32 &framePeriod, Graphics::Surface *dst = 0);<br>
+       bool decodePacket(Common::SeekableReadStream &packet, uint32 &framePeriod, Graphics::Surface *dst = 0);<br>
<br>
 private:<br>
        Graphics::PixelFormat _pixelFormat;<br>
diff --git a/image/codecs/msrle.cpp b/image/codecs/msrle.cpp<br>
index 951de83..89fe869 100644<br>
--- a/image/codecs/msrle.cpp<br>
+++ b/image/codecs/msrle.cpp<br>
@@ -39,7 +39,7 @@ MSRLEDecoder::~MSRLEDecoder() {<br>
        delete _surface;<br>
 }<br>
<br>
-const Graphics::Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *MSRLEDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        if (_bitsPerPixel == 8) {<br>
                decode8(stream);<br>
        } else<br>
@@ -48,7 +48,7 @@ const Graphics::Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *s<br>
        return _surface;<br>
 }<br>
<br>
-void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {<br>
+void MSRLEDecoder::decode8(Common::SeekableReadStream &stream) {<br>
<br>
        int x = 0;<br>
        int y = _surface->h - 1;<br>
@@ -60,9 +60,9 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {<br>
        byte *output     = data + ((height - 1) * width);<br>
        byte *output_end = data + ((height)     * width);<br>
<br>
-       while (!stream->eos()) {<br>
-               byte count = stream->readByte();<br>
-               byte value = stream->readByte();<br>
+       while (!stream.eos()) {<br>
+               byte count = stream.readByte();<br>
+               byte value = stream.readByte();<br>
<br>
                if (count == 0) {<br>
                        if (value == 0) {<br>
@@ -84,8 +84,8 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {<br>
                        } else if (value == 2) {<br>
                                // Skip<br>
<br>
-                               count = stream->readByte();<br>
-                               value = stream->readByte();<br>
+                               count = stream.readByte();<br>
+                               value = stream.readByte();<br>
<br>
                                y -= value;<br>
                                x += count;<br>
@@ -101,15 +101,15 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {<br>
                                // Copy data<br>
<br>
                                if (output + value > output_end) {<br>
-                                       stream->skip(value);<br>
+                                       stream.skip(value);<br>
                                        continue;<br>
                                }<br>
<br>
                                for (int i = 0; i < value; i++)<br>
-                                       *output++ = stream->readByte();<br>
+                                       *output++ = stream.readByte();<br>
<br>
                                if (value & 1)<br>
-                                       stream->skip(1);<br>
+                                       stream.skip(1);<br>
<br>
                                x += value;<br>
                        }<br>
diff --git a/image/codecs/msrle.h b/image/codecs/msrle.h<br>
index 10e3531..a65ef1c 100644<br>
--- a/image/codecs/msrle.h<br>
+++ b/image/codecs/msrle.h<br>
@@ -38,7 +38,7 @@ public:<br>
        MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);<br>
        ~MSRLEDecoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
<br>
 private:<br>
@@ -46,7 +46,7 @@ private:<br>
<br>
        Graphics::Surface *_surface;<br>
<br>
-       void decode8(Common::SeekableReadStream *stream);<br>
+       void decode8(Common::SeekableReadStream &stream);<br>
 };<br>
<br>
 } // End of namespace Image<br>
diff --git a/image/codecs/msvideo1.cpp b/image/codecs/msvideo1.cpp<br>
index e94afed..25d7395 100644<br>
--- a/image/codecs/msvideo1.cpp<br>
+++ b/image/codecs/msvideo1.cpp<br>
@@ -29,8 +29,8 @@<br>
 namespace Image {<br>
<br>
 #define CHECK_STREAM_PTR(n) \<br>
-  if ((stream->pos() + n) > stream->size() ) { \<br>
-       warning ("MS Video-1: Stream out of bounds (%d >= %d)", stream->pos() + n, stream->size()); \<br>
+  if ((stream.pos() + n) > stream.size() ) { \<br>
+       warning ("MS Video-1: Stream out of bounds (%d >= %d)", stream.pos() + n, stream.size()); \<br>
     return; \<br>
   }<br>
<br>
@@ -46,7 +46,7 @@ MSVideo1Decoder::~MSVideo1Decoder() {<br>
        delete _surface;<br>
 }<br>
<br>
-void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {<br>
+void MSVideo1Decoder::decode8(Common::SeekableReadStream &stream) {<br>
     byte colors[8];<br>
     byte *pixels = (byte *)_surface->getPixels();<br>
     uint16 stride = _surface->w;<br>
@@ -73,8 +73,8 @@ void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {<br>
<br>
             /* get the next two bytes in the encoded data stream */<br>
             CHECK_STREAM_PTR(2);<br>
-            byte byte_a = stream->readByte();<br>
-            byte byte_b = stream->readByte();<br>
+            byte byte_a = stream.readByte();<br>
+            byte byte_b = stream.readByte();<br>
<br>
             /* check if the decode is finished */<br>
             if (byte_a == 0 && byte_b == 0 && totalBlocks == 0) {<br>
@@ -87,8 +87,8 @@ void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {<br>
                 uint16 flags = (byte_b << 8) | byte_a;<br>
<br>
                 CHECK_STREAM_PTR(2);<br>
-                colors[0] = stream->readByte();<br>
-                colors[1] = stream->readByte();<br>
+                colors[0] = stream.readByte();<br>
+                colors[1] = stream.readByte();<br>
<br>
                 for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
                     for (byte pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1)<br>
@@ -101,7 +101,7 @@ void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {<br>
<br>
                 CHECK_STREAM_PTR(8);<br>
                                for (byte i = 0; i < 8; i++)<br>
-                                       colors[i] = stream->readByte();<br>
+                                       colors[i] = stream.readByte();<br>
<br>
                 for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
                     for (byte pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1)<br>
@@ -125,7 +125,7 @@ void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {<br>
     }<br>
 }<br>
<br>
-const Graphics::Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *MSVideo1Decoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        if (_bitsPerPixel == 8)<br>
                decode8(stream);<br>
        else {<br>
diff --git a/image/codecs/msvideo1.h b/image/codecs/msvideo1.h<br>
index 517936d..bdee5ac 100644<br>
--- a/image/codecs/msvideo1.h<br>
+++ b/image/codecs/msvideo1.h<br>
@@ -38,7 +38,7 @@ public:<br>
        MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);<br>
        ~MSVideo1Decoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
<br>
 private:<br>
@@ -46,8 +46,8 @@ private:<br>
<br>
        Graphics::Surface *_surface;<br>
<br>
-       void decode8(Common::SeekableReadStream *stream);<br>
-       //void decode16(Common::SeekableReadStream *stream);<br>
+       void decode8(Common::SeekableReadStream &stream);<br>
+       //void decode16(Common::SeekableReadStream &stream);<br>
 };<br>
<br>
 } // End of namespace Image<br>
diff --git a/image/codecs/qtrle.cpp b/image/codecs/qtrle.cpp<br>
index a609e9b..94744ef 100644<br>
--- a/image/codecs/qtrle.cpp<br>
+++ b/image/codecs/qtrle.cpp<br>
@@ -48,8 +48,8 @@ QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Cod<br>
 }<br>
<br>
 #define CHECK_STREAM_PTR(n) \<br>
-  if ((stream->pos() + n) > stream->size()) { \<br>
-    warning("QTRLE Problem: stream out of bounds (%d > %d)", stream->pos() + n, stream->size()); \<br>
+  if ((stream.pos() + n) > stream.size()) { \<br>
+    warning("QTRLE Problem: stream out of bounds (%d > %d)", stream.pos() + n, stream.size()); \<br>
     return; \<br>
   }<br>
<br>
@@ -59,14 +59,14 @@ QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Cod<br>
     return; \<br>
   } \<br>
<br>
-void QTRLEDecoder::decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+void QTRLEDecoder::decode1(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange) {<br>
        uint32 pixelPtr = 0;<br>
        byte *rgb = (byte *)_surface->getPixels();<br>
<br>
        while (linesToChange) {<br>
                CHECK_STREAM_PTR(2);<br>
-               byte skip = stream->readByte();<br>
-               int8 rleCode = stream->readSByte();<br>
+               byte skip = stream.readByte();<br>
+               int8 rleCode = stream.readSByte();<br>
<br>
                if (rleCode == 0)<br>
                        break;<br>
@@ -83,8 +83,8 @@ void QTRLEDecoder::decode1(Common::SeekableReadStream *stream, uint32 rowPtr, ui<br>
                        rleCode = -rleCode;<br>
                        // get the next 2 bytes from the stream, treat them as groups of 8 pixels, and output them rleCode times */<br>
                        CHECK_STREAM_PTR(2);<br>
-                       byte pi0 = stream->readByte();<br>
-                       byte pi1 = stream->readByte();<br>
+                       byte pi0 = stream.readByte();<br>
+                       byte pi1 = stream.readByte();<br>
                        CHECK_PIXEL_PTR(rleCode * 2);<br>
<br>
                        while (rleCode--) {<br>
@@ -98,25 +98,25 @@ void QTRLEDecoder::decode1(Common::SeekableReadStream *stream, uint32 rowPtr, ui<br>
                        CHECK_PIXEL_PTR(rleCode);<br>
<br>
                        while (rleCode--)<br>
-                               rgb[pixelPtr++] = stream->readByte();<br>
+                               rgb[pixelPtr++] = stream.readByte();<br>
                }<br>
        }<br>
 }<br>
<br>
-void QTRLEDecoder::decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp) {<br>
+void QTRLEDecoder::decode2_4(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange, byte bpp) {<br>
        uint32 pixelPtr = 0;<br>
        byte *rgb = (byte *)_surface->getPixels();<br>
        byte numPixels = (bpp == 4) ? 8 : 16;<br>
<br>
        while (linesToChange--) {<br>
                CHECK_STREAM_PTR(2);<br>
-               pixelPtr = rowPtr + (numPixels * (stream->readByte() - 1));<br>
+               pixelPtr = rowPtr + (numPixels * (stream.readByte() - 1));<br>
<br>
-               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+               for (int8 rleCode = stream.readSByte(); rleCode != -1; rleCode = stream.readSByte()) {<br>
                        if (rleCode == 0) {<br>
                                // there's another skip code in the stream<br>
                                CHECK_STREAM_PTR(1);<br>
-                               pixelPtr += (numPixels * (stream->readByte() - 1));<br>
+                               pixelPtr += (numPixels * (stream.readByte() - 1));<br>
                        } else if (rleCode < 0) {<br>
                                // decode the run length code<br>
                                rleCode = -rleCode;<br>
@@ -127,10 +127,10 @@ void QTRLEDecoder::decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr,<br>
                                byte pi[16]; // 16 palette indices<br>
<br>
                                for (int8 i = numPixels - 1; i >= 0; i--) {<br>
-                                       pi[numPixels - 1 - i] = (stream->readByte() >> ((i * bpp) & 0x07)) & ((1 << bpp) - 1);<br>
+                                       pi[numPixels - 1 - i] = (stream.readByte() >> ((i * bpp) & 0x07)) & ((1 << bpp) - 1);<br>
<br>
                                        if ((i & ((numPixels >> 2) - 1)) == 0)<br>
-                                               stream->readByte();<br>
+                                               stream.readByte();<br>
                                }<br>
<br>
                                CHECK_PIXEL_PTR(rleCode * numPixels);<br>
@@ -145,7 +145,7 @@ void QTRLEDecoder::decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr,<br>
                                CHECK_PIXEL_PTR(rleCode * (numPixels >> 2));<br>
<br>
                                while (rleCode--) {<br>
-                                       byte temp = stream->readByte();<br>
+                                       byte temp = stream.readByte();<br>
                                        if (bpp == 4) {<br>
                                                rgb[pixelPtr++] = (temp >> 4) & 0x0f;<br>
                                                rgb[pixelPtr++] = temp & 0x0f;<br>
@@ -163,19 +163,19 @@ void QTRLEDecoder::decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr,<br>
        }<br>
 }<br>
<br>
-void QTRLEDecoder::decode8(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+void QTRLEDecoder::decode8(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange) {<br>
        uint32 pixelPtr = 0;<br>
        byte *rgb = (byte *)_surface->getPixels();<br>
<br>
        while (linesToChange--) {<br>
                CHECK_STREAM_PTR(2);<br>
-               pixelPtr = rowPtr + 4 * (stream->readByte() - 1);<br>
+               pixelPtr = rowPtr + 4 * (stream.readByte() - 1);<br>
<br>
-               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+               for (int8 rleCode = stream.readSByte(); rleCode != -1; rleCode = stream.readSByte()) {<br>
                        if (rleCode == 0) {<br>
                                // there's another skip code in the stream<br>
                                CHECK_STREAM_PTR(1);<br>
-                               pixelPtr += 4 * (stream->readByte() - 1);<br>
+                               pixelPtr += 4 * (stream.readByte() - 1);<br>
                        } else if (rleCode < 0) {<br>
                                // decode the run length code<br>
                                rleCode = -rleCode;<br>
@@ -186,7 +186,7 @@ void QTRLEDecoder::decode8(Common::SeekableReadStream *stream, uint32 rowPtr, ui<br>
                                byte pi[4];  // 4 palette indexes<br>
<br>
                                for (byte i = 0; i < 4; i++)<br>
-                                       pi[i] = stream->readByte();<br>
+                                       pi[i] = stream.readByte();<br>
<br>
                                CHECK_PIXEL_PTR(rleCode * 4);<br>
<br>
@@ -200,7 +200,7 @@ void QTRLEDecoder::decode8(Common::SeekableReadStream *stream, uint32 rowPtr, ui<br>
                                CHECK_PIXEL_PTR(rleCode);<br>
<br>
                                while (rleCode--)<br>
-                                       rgb[pixelPtr++] = stream->readByte();<br>
+                                       rgb[pixelPtr++] = stream.readByte();<br>
                        }<br>
                }<br>
<br>
@@ -208,25 +208,25 @@ void QTRLEDecoder::decode8(Common::SeekableReadStream *stream, uint32 rowPtr, ui<br>
        }<br>
 }<br>
<br>
-void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+void QTRLEDecoder::decode16(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange) {<br>
        uint32 pixelPtr = 0;<br>
        uint16 *rgb = (uint16 *)_surface->getPixels();<br>
<br>
        while (linesToChange--) {<br>
                CHECK_STREAM_PTR(2);<br>
-               pixelPtr = rowPtr + stream->readByte() - 1;<br>
+               pixelPtr = rowPtr + stream.readByte() - 1;<br>
<br>
-               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+               for (int8 rleCode = stream.readSByte(); rleCode != -1; rleCode = stream.readSByte()) {<br>
                        if (rleCode == 0) {<br>
                                // there's another skip code in the stream<br>
                                CHECK_STREAM_PTR(1);<br>
-                               pixelPtr += stream->readByte() - 1;<br>
+                               pixelPtr += stream.readByte() - 1;<br>
                        } else if (rleCode < 0) {<br>
                                // decode the run length code<br>
                                rleCode = -rleCode;<br>
                                CHECK_STREAM_PTR(2);<br>
<br>
-                               uint16 rgb16 = stream->readUint16BE();<br>
+                               uint16 rgb16 = stream.readUint16BE();<br>
<br>
                                CHECK_PIXEL_PTR(rleCode);<br>
<br>
@@ -238,7 +238,7 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u<br>
<br>
                                // copy pixels directly to output<br>
                                while (rleCode--)<br>
-                                       rgb[pixelPtr++] = stream->readUint16BE();<br>
+                                       rgb[pixelPtr++] = stream.readUint16BE();<br>
                        }<br>
                }<br>
<br>
@@ -246,28 +246,28 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u<br>
        }<br>
 }<br>
<br>
-void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+void QTRLEDecoder::decode24(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange) {<br>
        uint32 pixelPtr = 0;<br>
        uint32 *rgb = (uint32 *)_surface->getPixels();<br>
<br>
        while (linesToChange--) {<br>
                CHECK_STREAM_PTR(2);<br>
-               pixelPtr = rowPtr + stream->readByte() - 1;<br>
+               pixelPtr = rowPtr + stream.readByte() - 1;<br>
<br>
-               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+               for (int8 rleCode = stream.readSByte(); rleCode != -1; rleCode = stream.readSByte()) {<br>
                        if (rleCode == 0) {<br>
                                // there's another skip code in the stream<br>
                                CHECK_STREAM_PTR(1);<br>
-                               pixelPtr += stream->readByte() - 1;<br>
+                               pixelPtr += stream.readByte() - 1;<br>
                        } else if (rleCode < 0) {<br>
                                // decode the run length code<br>
                                rleCode = -rleCode;<br>
<br>
                                CHECK_STREAM_PTR(3);<br>
<br>
-                               byte r = stream->readByte();<br>
-                               byte g = stream->readByte();<br>
-                               byte b = stream->readByte();<br>
+                               byte r = stream.readByte();<br>
+                               byte g = stream.readByte();<br>
+                               byte b = stream.readByte();<br>
                                uint32 color = _surface->format.RGBToColor(r, g, b);<br>
<br>
                                CHECK_PIXEL_PTR(rleCode);<br>
@@ -280,9 +280,9 @@ void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, u<br>
<br>
                                // copy pixels directly to output<br>
                                while (rleCode--) {<br>
-                                       byte r = stream->readByte();<br>
-                                       byte g = stream->readByte();<br>
-                                       byte b = stream->readByte();<br>
+                                       byte r = stream.readByte();<br>
+                                       byte g = stream.readByte();<br>
+                                       byte b = stream.readByte();<br>
                                        rgb[pixelPtr++] = _surface->format.RGBToColor(r, g, b);<br>
                                }<br>
                        }<br>
@@ -292,29 +292,29 @@ void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, u<br>
        }<br>
 }<br>
<br>
-void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) {<br>
+void QTRLEDecoder::decode32(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange) {<br>
        uint32 pixelPtr = 0;<br>
        uint32 *rgb = (uint32 *)_surface->getPixels();<br>
<br>
        while (linesToChange--) {<br>
                CHECK_STREAM_PTR(2);<br>
-               pixelPtr = rowPtr + stream->readByte() - 1;<br>
+               pixelPtr = rowPtr + stream.readByte() - 1;<br>
<br>
-               for (int8 rleCode = stream->readSByte(); rleCode != -1; rleCode = stream->readSByte()) {<br>
+               for (int8 rleCode = stream.readSByte(); rleCode != -1; rleCode = stream.readSByte()) {<br>
                        if (rleCode == 0) {<br>
                                // there's another skip code in the stream<br>
                                CHECK_STREAM_PTR(1);<br>
-                               pixelPtr += stream->readByte() - 1;<br>
+                               pixelPtr += stream.readByte() - 1;<br>
                        } else if (rleCode < 0) {<br>
                                // decode the run length code<br>
                                rleCode = -rleCode;<br>
<br>
                                CHECK_STREAM_PTR(4);<br>
<br>
-                               byte a = stream->readByte();<br>
-                               byte r = stream->readByte();<br>
-                               byte g = stream->readByte();<br>
-                               byte b = stream->readByte();<br>
+                               byte a = stream.readByte();<br>
+                               byte r = stream.readByte();<br>
+                               byte g = stream.readByte();<br>
+                               byte b = stream.readByte();<br>
                                uint32 color = _surface->format.ARGBToColor(a, r, g, b);<br>
<br>
                                CHECK_PIXEL_PTR(rleCode);<br>
@@ -327,10 +327,10 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u<br>
<br>
                                // copy pixels directly to output<br>
                                while (rleCode--) {<br>
-                                       byte a = stream->readByte();<br>
-                                       byte r = stream->readByte();<br>
-                                       byte g = stream->readByte();<br>
-                                       byte b = stream->readByte();<br>
+                                       byte a = stream.readByte();<br>
+                                       byte r = stream.readByte();<br>
+                                       byte g = stream.readByte();<br>
+                                       byte b = stream.readByte();<br>
                                        rgb[pixelPtr++] = _surface->format.ARGBToColor(a, r, g, b);<br>
                                }<br>
                        }<br>
@@ -340,29 +340,29 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u<br>
        }<br>
 }<br>
<br>
-const Graphics::Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *QTRLEDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        uint16 startLine = 0;<br>
        uint16 height = _surface->h;<br>
<br>
        // check if this frame is even supposed to change<br>
-       if (stream->size() < 8)<br>
+       if (stream.size() < 8)<br>
                return _surface;<br>
<br>
        // start after the chunk size<br>
-       stream->readUint32BE();<br>
+       stream.readUint32BE();<br>
<br>
        // fetch the header<br>
-       uint16 header = stream->readUint16BE();<br>
+       uint16 header = stream.readUint16BE();<br>
<br>
        // if a header is present, fetch additional decoding parameters<br>
        if (header & 8) {<br>
-               if (stream->size() < 14)<br>
+               if (stream.size() < 14)<br>
                        return _surface;<br>
<br>
-               startLine = stream->readUint16BE();<br>
-               stream->readUint16BE(); // Unknown<br>
-               height = stream->readUint16BE();<br>
-               stream->readUint16BE(); // Unknown<br>
+               startLine = stream.readUint16BE();<br>
+               stream.readUint16BE(); // Unknown<br>
+               height = stream.readUint16BE();<br>
+               stream.readUint16BE(); // Unknown<br>
        }<br>
<br>
        uint32 rowPtr = _surface->w * startLine;<br>
diff --git a/image/codecs/qtrle.h b/image/codecs/qtrle.h<br>
index c16daa0..7ef8953 100644<br>
--- a/image/codecs/qtrle.h<br>
+++ b/image/codecs/qtrle.h<br>
@@ -39,7 +39,7 @@ public:<br>
        QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);<br>
        ~QTRLEDecoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const;<br>
<br>
 private:<br>
@@ -47,12 +47,12 @@ private:<br>
<br>
        Graphics::Surface *_surface;<br>
<br>
-       void decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
-       void decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp);<br>
-       void decode8(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
-       void decode16(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
-       void decode24(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
-       void decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode1(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode2_4(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange, byte bpp);<br>
+       void decode8(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode16(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode24(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange);<br>
+       void decode32(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange);<br>
 };<br>
<br>
 } // End of namespace Image<br>
diff --git a/image/codecs/rpza.cpp b/image/codecs/rpza.cpp<br>
index ecd930f..5aeee7c 100644<br>
--- a/image/codecs/rpza.cpp<br>
+++ b/image/codecs/rpza.cpp<br>
@@ -61,7 +61,7 @@ RPZADecoder::~RPZADecoder() {<br>
                WRITE_UINT16((uint16 *)_surface->getPixels() + blockPtr, color); \<br>
        blockPtr++<br>
<br>
-const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *RPZADecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        uint16 colorA = 0, colorB = 0;<br>
        uint16 color4[4];<br>
<br>
@@ -73,40 +73,40 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st<br>
        uint16 tb;<br>
<br>
        // First byte is always 0xe1. Warn if it's different<br>
-       byte firstByte = stream->readByte();<br>
+       byte firstByte = stream.readByte();<br>
        if (firstByte != 0xe1)<br>
                warning("First RPZA chunk byte is 0x%02x instead of 0xe1", firstByte);<br>
<br>
        // Get chunk size, ingnoring first byte<br>
-       uint32 chunkSize = stream->readUint16BE() << 8;<br>
-       chunkSize += stream->readByte();<br>
+       uint32 chunkSize = stream.readUint16BE() << 8;<br>
+       chunkSize += stream.readByte();<br>
<br>
        // If length mismatch use size from MOV file and try to decode anyway<br>
-       if (chunkSize != (uint32)stream->size()) {<br>
+       if (chunkSize != (uint32)stream.size()) {<br>
                warning("MOV chunk size != encoded chunk size; using MOV chunk size");<br>
-               chunkSize = stream->size();<br>
+               chunkSize = stream.size();<br>
        }<br>
<br>
        // Number of 4x4 blocks in frame<br>
        int32 totalBlocks = ((_surface->w + 3) / 4) * ((_surface->h + 3) / 4);<br>
<br>
        // Process chunk data<br>
-       while ((uint32)stream->pos() < chunkSize) {<br>
-               byte opcode = stream->readByte(); // Get opcode<br>
+       while ((uint32)stream.pos() < chunkSize) {<br>
+               byte opcode = stream.readByte(); // Get opcode<br>
                byte numBlocks = (opcode & 0x1f) + 1; // Extract block counter from opcode<br>
<br>
                // If opcode MSbit is 0, we need more data to decide what to do<br>
                if ((opcode & 0x80) == 0) {<br>
-                       colorA = (opcode << 8) | stream->readByte();<br>
+                       colorA = (opcode << 8) | stream.readByte();<br>
                        opcode = 0;<br>
-                       if (stream->readByte() & 0x80) {<br>
+                       if (stream.readByte() & 0x80) {<br>
                                // Must behave as opcode 110xxxxx, using colorA computed<br>
                                // above. Use fake opcode 0x20 to enter switch block at<br>
                                // the right place<br>
                                opcode = 0x20;<br>
                                numBlocks = 1;<br>
                        }<br>
-                       stream->seek(-1, SEEK_CUR);<br>
+                       stream.seek(-1, SEEK_CUR);<br>
                }<br>
<br>
                switch (opcode & 0xe0) {<br>
@@ -116,7 +116,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st<br>
                        }<br>
                        break;<br>
                case 0xa0: // Fill blocks with one color<br>
-                       colorA = stream->readUint16BE();<br>
+                       colorA = stream.readUint16BE();<br>
                        while (numBlocks--) {<br>
                                blockPtr = rowPtr + pixelPtr;<br>
                                for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
@@ -131,9 +131,9 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st<br>
<br>
                // Fill blocks with 4 colors<br>
                case 0xc0:<br>
-                       colorA = stream->readUint16BE();<br>
+                       colorA = stream.readUint16BE();<br>
                case 0x20:<br>
-                       colorB = stream->readUint16BE();<br>
+                       colorB = stream.readUint16BE();<br>
<br>
                        // Sort out the colors<br>
                        color4[0] = colorB;<br>
@@ -162,7 +162,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st<br>
                        while (numBlocks--) {<br>
                                blockPtr = rowPtr + pixelPtr;<br>
                                for (byte pixel_y = 0; pixel_y < 4; pixel_y++) {<br>
-                                       byte index = stream->readByte();<br>
+                                       byte index = stream.readByte();<br>
                                        for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {<br>
                                                byte idx = (index >> (2 * (3 - pixel_x))) & 0x03;<br>
                                                PUT_PIXEL(color4[idx]);<br>
@@ -180,7 +180,7 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st<br>
                                for (byte pixel_x = 0; pixel_x < 4; pixel_x++) {<br>
                                        // We already have color of upper left pixel<br>
                                        if (pixel_y != 0 || pixel_x != 0)<br>
-                                               colorA = stream->readUint16BE();<br>
+                                               colorA = stream.readUint16BE();<br>
<br>
                                        PUT_PIXEL(colorA);<br>
                                }<br>
diff --git a/image/codecs/rpza.h b/image/codecs/rpza.h<br>
index f87ee11..62f4c02 100644<br>
--- a/image/codecs/rpza.h<br>
+++ b/image/codecs/rpza.h<br>
@@ -39,7 +39,7 @@ public:<br>
        RPZADecoder(uint16 width, uint16 height);<br>
        ~RPZADecoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); }<br>
<br>
 private:<br>
diff --git a/image/codecs/smc.cpp b/image/codecs/smc.cpp<br>
index 434a105..54493d0 100644<br>
--- a/image/codecs/smc.cpp<br>
+++ b/image/codecs/smc.cpp<br>
@@ -29,7 +29,7 @@<br>
 namespace Image {<br>
<br>
 #define GET_BLOCK_COUNT() \<br>
-  (opcode & 0x10) ? (1 + stream->readByte()) : 1 + (opcode & 0x0F);<br>
+  (opcode & 0x10) ? (1 + stream.readByte()) : 1 + (opcode & 0x0F);<br>
<br>
 #define ADVANCE_BLOCK() \<br>
 { \<br>
@@ -55,7 +55,7 @@ SMCDecoder::~SMCDecoder() {<br>
        delete _surface;<br>
 }<br>
<br>
-const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *SMCDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        byte *pixels = (byte *)_surface->getPixels();<br>
<br>
        uint32 numBlocks = 0;<br>
@@ -77,9 +77,9 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
        uint32 colorOctetIndex = 0;<br>
        uint32 colorTableIndex = 0;  // indices to color pair, quad, or octet tables<br>
<br>
-       int32 chunkSize = stream->readUint32BE() & 0x00FFFFFF;<br>
-       if (chunkSize != stream->size())<br>
-               warning("MOV chunk size != SMC chunk size (%d != %d); ignoring SMC chunk size", chunkSize, stream->size());<br>
+       int32 chunkSize = stream.readUint32BE() & 0x00FFFFFF;<br>
+       if (chunkSize != stream.size())<br>
+               warning("MOV chunk size != SMC chunk size (%d != %d); ignoring SMC chunk size", chunkSize, stream.size());<br>
<br>
        int32 totalBlocks = ((_surface->w + 3) / 4) * ((_surface->h + 3) / 4);<br>
<br>
@@ -88,8 +88,8 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                // sanity checks<br>
<br>
                // make sure stream ptr hasn't gone out of bounds<br>
-               if (stream->pos() > stream->size()) {<br>
-                       warning("SMC decoder just went out of bounds (stream ptr = %d, chunk size = %d)", stream->pos(), stream->size());<br>
+               if (stream.pos() > stream.size()) {<br>
+                       warning("SMC decoder just went out of bounds (stream ptr = %d, chunk size = %d)", stream.pos(), stream.size());<br>
                        return _surface;<br>
                }<br>
<br>
@@ -99,7 +99,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                        return _surface;<br>
                }<br>
<br>
-               byte opcode = stream->readByte();<br>
+               byte opcode = stream.readByte();<br>
<br>
                switch (opcode & 0xF0) {<br>
                // skip n blocks<br>
@@ -192,7 +192,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                case 0x60:<br>
                case 0x70:<br>
                        numBlocks = GET_BLOCK_COUNT();<br>
-                       pixel = stream->readByte();<br>
+                       pixel = stream.readByte();<br>
<br>
                        while (numBlocks--) {<br>
                                blockPtr = rowPtr + pixelPtr;<br>
@@ -216,7 +216,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                // fetch the next 2 colors from bytestream and store in next<br>
                                // available entry in the color pair table<br>
                                for (byte i = 0; i < CPAIR; i++) {<br>
-                                       pixel = stream->readByte();<br>
+                                       pixel = stream.readByte();<br>
                                        colorTableIndex = CPAIR * colorPairIndex + i;<br>
                                        _colorPairs[colorTableIndex] = pixel;<br>
                                }<br>
@@ -229,10 +229,10 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                if (colorPairIndex == COLORS_PER_TABLE)<br>
                                        colorPairIndex = 0;<br>
                        } else<br>
-                               colorTableIndex = CPAIR * stream->readByte();<br>
+                               colorTableIndex = CPAIR * stream.readByte();<br>
<br>
                        while (numBlocks--) {<br>
-                               colorFlags = stream->readUint16BE();<br>
+                               colorFlags = stream.readUint16BE();<br>
                                uint16 flagMask = 0x8000;<br>
                                blockPtr = rowPtr + pixelPtr;<br>
                                for (byte y = 0; y < 4; y++) {<br>
@@ -262,7 +262,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                // fetch the next 4 colors from bytestream and store in next<br>
                                // available entry in the color quad table<br>
                                for (byte i = 0; i < CQUAD; i++) {<br>
-                                       pixel = stream->readByte();<br>
+                                       pixel = stream.readByte();<br>
                                        colorTableIndex = CQUAD * colorQuadIndex + i;<br>
                                        _colorQuads[colorTableIndex] = pixel;<br>
                                }<br>
@@ -275,10 +275,10 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                if (colorQuadIndex == COLORS_PER_TABLE)<br>
                                        colorQuadIndex = 0;<br>
                        } else<br>
-                               colorTableIndex = CQUAD * stream->readByte();<br>
+                               colorTableIndex = CQUAD * stream.readByte();<br>
<br>
                        while (numBlocks--) {<br>
-                               colorFlags = stream->readUint32BE();<br>
+                               colorFlags = stream.readUint32BE();<br>
<br>
                                // flag mask actually acts as a bit shift count here<br>
                                byte flagMask = 30;<br>
@@ -306,7 +306,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                // fetch the next 8 colors from bytestream and store in next<br>
                                // available entry in the color octet table<br>
                                for (byte i = 0; i < COCTET; i++) {<br>
-                                       pixel = stream->readByte();<br>
+                                       pixel = stream.readByte();<br>
                                        colorTableIndex = COCTET * colorOctetIndex + i;<br>
                                        _colorOctets[colorTableIndex] = pixel;<br>
                                }<br>
@@ -319,7 +319,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                if (colorOctetIndex == COLORS_PER_TABLE)<br>
                                        colorOctetIndex = 0;<br>
                        } else<br>
-                               colorTableIndex = COCTET * stream->readByte();<br>
+                               colorTableIndex = COCTET * stream.readByte();<br>
<br>
                        while (numBlocks--) {<br>
                                /*<br>
@@ -331,7 +331,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
<br>
                                // build the color flags<br>
                                byte flagData[6];<br>
-                               stream->read(flagData, 6);<br>
+                               stream.read(flagData, 6);<br>
<br>
                                colorFlagsA = ((READ_BE_UINT16(flagData) & 0xFFF0) << 8) | (READ_BE_UINT16(flagData + 2) >> 4);<br>
                                colorFlagsB = ((READ_BE_UINT16(flagData + 4) & 0xFFF0) << 8) | ((flagData[1] & 0xF) << 8) |<br>
@@ -369,7 +369,7 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str<br>
                                blockPtr = rowPtr + pixelPtr;<br>
                                for (byte y = 0; y < 4; y++) {<br>
                                        for (byte x = 0; x < 4; x++)<br>
-                                               pixels[blockPtr++] = stream->readByte();<br>
+                                               pixels[blockPtr++] = stream.readByte();<br>
<br>
                                        blockPtr += rowInc;<br>
                                }<br>
diff --git a/image/codecs/smc.h b/image/codecs/smc.h<br>
index 2de1f69..579d629 100644<br>
--- a/image/codecs/smc.h<br>
+++ b/image/codecs/smc.h<br>
@@ -45,7 +45,7 @@ public:<br>
        SMCDecoder(uint16 width, uint16 height);<br>
        ~SMCDecoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }<br>
<br>
 private:<br>
diff --git a/image/codecs/svq1.cpp b/image/codecs/svq1.cpp<br>
index 550445b..765d512 100644<br>
--- a/image/codecs/svq1.cpp<br>
+++ b/image/codecs/svq1.cpp<br>
@@ -91,10 +91,10 @@ SVQ1Decoder::~SVQ1Decoder() {<br>
<br>
 #define ALIGN(x, a) (((x)+(a)-1)&~((a)-1))<br>
<br>
-const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *SVQ1Decoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        debug(1, "SVQ1Decoder::decodeImage()");<br>
<br>
-       Common::BitStream32BEMSB frameData(*stream);<br>
+       Common::BitStream32BEMSB frameData(stream);<br>
<br>
        uint32 frameCode = frameData.getBits(22);<br>
        debug(1, " frameCode: %d", frameCode);<br>
diff --git a/image/codecs/svq1.h b/image/codecs/svq1.h<br>
index 56310a1..687f761 100644<br>
--- a/image/codecs/svq1.h<br>
+++ b/image/codecs/svq1.h<br>
@@ -44,7 +44,7 @@ public:<br>
        SVQ1Decoder(uint16 width, uint16 height);<br>
        ~SVQ1Decoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const { return _surface->format; }<br>
<br>
 private:<br>
diff --git a/image/codecs/truemotion1.cpp b/image/codecs/truemotion1.cpp<br>
index 3b8ad85..1302d72 100644<br>
--- a/image/codecs/truemotion1.cpp<br>
+++ b/image/codecs/truemotion1.cpp<br>
@@ -163,9 +163,9 @@ void TrueMotion1Decoder::genVectorTable16(const byte *selVectorTable) {<br>
        }<br>
 }<br>
<br>
-void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream *stream) {<br>
-       _buf = new byte[stream->size()];<br>
-       stream->read(_buf, stream->size());<br>
+void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream &stream) {<br>
+       _buf = new byte[stream.size()];<br>
+       stream.read(_buf, stream.size());<br>
<br>
        byte headerBuffer[128];  // logical maximum size of the header<br>
        const byte *selVectorTable;<br>
@@ -243,7 +243,7 @@ void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream *stream) {<br>
                _indexStream = _mbChangeBits + _mbChangeBitsRowSize * (_height >> 2);<br>
        }<br>
<br>
-       _indexStreamSize = stream->size() - (_indexStream - _buf);<br>
+       _indexStreamSize = stream.size() - (_indexStream - _buf);<br>
<br>
        _lastDeltaset = _header.deltaset;<br>
        _lastVectable = _header.vectable;<br>
@@ -397,7 +397,7 @@ void TrueMotion1Decoder::decode16() {<br>
        }<br>
 }<br>
<br>
-const Graphics::Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {<br>
+const Graphics::Surface *TrueMotion1Decoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
        decodeHeader(stream);<br>
<br>
        if (compressionTypes[_header.compression].algorithm == ALGO_NOP) {<br>
diff --git a/image/codecs/truemotion1.h b/image/codecs/truemotion1.h<br>
index e836ddb..bb87dbc 100644<br>
--- a/image/codecs/truemotion1.h<br>
+++ b/image/codecs/truemotion1.h<br>
@@ -43,7 +43,7 @@ public:<br>
        TrueMotion1Decoder(uint16 width, uint16 height);<br>
        ~TrueMotion1Decoder();<br>
<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
<br>
        // Always return RGB565<br>
        Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }<br>
@@ -96,7 +96,7 @@ private:<br>
        } _header;<br>
<br>
        void selectDeltaTables(int deltaTableIndex);<br>
-       void decodeHeader(Common::SeekableReadStream *stream);<br>
+       void decodeHeader(Common::SeekableReadStream &stream);<br>
        void decode16();<br>
        int makeYdt16Entry(int p1, int p2);<br>
        int makeCdt16Entry(int p1, int p2);<br>
diff --git a/image/jpeg.cpp b/image/jpeg.cpp<br>
index 3602d50..1ce45f2 100644<br>
--- a/image/jpeg.cpp<br>
+++ b/image/jpeg.cpp<br>
@@ -59,8 +59,8 @@ void JPEGDecoder::destroy() {<br>
        _surface.free();<br>
 }<br>
<br>
-const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {<br>
-       if (!loadStream(*stream))<br>
+const Graphics::Surface *JPEGDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
+       if (!loadStream(stream))<br>
                return 0;<br>
<br>
        return getSurface();<br>
diff --git a/image/jpeg.h b/image/jpeg.h<br>
index 1bf76ec..dea799c 100644<br>
--- a/image/jpeg.h<br>
+++ b/image/jpeg.h<br>
@@ -58,7 +58,7 @@ public:<br>
        virtual const Graphics::Surface *getSurface() const;<br>
<br>
        // Codec API<br>
-       const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
        Graphics::PixelFormat getPixelFormat() const;<br>
<br>
        // Special API for JPEG<br>
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp<br>
index 5e404ec..e9c6ef9 100644<br>
--- a/video/avi_decoder.cpp<br>
+++ b/video/avi_decoder.cpp<br>
@@ -711,7 +711,7 @@ AVIDecoder::AVIVideoTrack::~AVIVideoTrack() {<br>
 void AVIDecoder::AVIVideoTrack::decodeFrame(Common::SeekableReadStream *stream) {<br>
        if (stream) {<br>
                if (_videoCodec)<br>
-                       _lastFrame = _videoCodec->decodeImage(stream);<br>
+                       _lastFrame = _videoCodec->decodeFrame(*stream);<br>
        } else {<br>
                // Empty frame<br>
                _lastFrame = 0;<br>
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp<br>
index e01c5f3..21dda15 100644<br>
--- a/video/coktel_decoder.cpp<br>
+++ b/video/coktel_decoder.cpp<br>
@@ -2262,7 +2262,7 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {<br>
                        return false;<br>
<br>
                Common::MemoryReadStream frameStream(_videoBuffer[0], _videoBufferLen[0]);<br>
-               const Graphics::Surface *codecSurf = _codec->decodeImage(&frameStream);<br>
+               const Graphics::Surface *codecSurf = _codec->decodeFrame(frameStream);<br>
                if (!codecSurf)<br>
                        return false;<br>
<br>
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp<br>
index 20c20d0..cd36796 100644<br>
--- a/video/qt_decoder.cpp<br>
+++ b/video/qt_decoder.cpp<br>
@@ -725,7 +725,7 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::bufferNextFrame()<br>
                return 0;<br>
        }<br>
<br>
-       const Graphics::Surface *frame = entry->_videoCodec->decodeImage(frameData);<br>
+       const Graphics::Surface *frame = entry->_videoCodec->decodeFrame(*frameData);<br>
        delete frameData;<br>
<br>
        // Update the palette<br>
<br>
<br>
Commit: 0f07f85a948e39c286b0bbd9e9191d517108c2da<br>
    <a href="https://github.com/scummvm/scummvm/commit/0f07f85a948e39c286b0bbd9e9191d517108c2da" target="_blank">https://github.com/scummvm/scummvm/commit/0f07f85a948e39c286b0bbd9e9191d517108c2da</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:31:59-08:00<br>
<br>
Commit Message:<br>
IMAGE: Split raw bitmap decoding into a Codec<br>
<br>
Changed paths:<br>
  A image/codecs/bmp_raw.cpp<br>
  A image/codecs/bmp_raw.h<br>
    image/bmp.cpp<br>
    image/bmp.h<br>
    image/<a href="http://module.mk" target="_blank">module.mk</a><br>
<br>
<br>
<br>
diff --git a/image/bmp.cpp b/image/bmp.cpp<br>
index 113e268..eb8e300 100644<br>
--- a/image/bmp.cpp<br>
+++ b/image/bmp.cpp<br>
@@ -23,9 +23,11 @@<br>
 #include "image/bmp.h"<br>
<br>
 #include "common/stream.h"<br>
+#include "common/substream.h"<br>
 #include "common/textconsole.h"<br>
 #include "graphics/pixelformat.h"<br>
 #include "graphics/surface.h"<br>
+#include "image/codecs/bmp_raw.h"<br>
<br>
 namespace Image {<br>
<br>
@@ -33,6 +35,7 @@ BitmapDecoder::BitmapDecoder() {<br>
        _surface = 0;<br>
        _palette = 0;<br>
        _paletteColorCount = 0;<br>
+       _codec = 0;<br>
 }<br>
<br>
 BitmapDecoder::~BitmapDecoder() {<br>
@@ -40,13 +43,15 @@ BitmapDecoder::~BitmapDecoder() {<br>
 }<br>
<br>
 void BitmapDecoder::destroy() {<br>
-       if (_surface) {<br>
-               _surface->free();<br>
-               delete _surface; _surface = 0;<br>
-       }<br>
+       _surface = 0;<br>
+<br>
+       delete[] _palette;<br>
+       _palette = 0;<br>
<br>
-       delete[] _palette; _palette = 0;<br>
        _paletteColorCount = 0;<br>
+<br>
+       delete _codec;<br>
+       _codec = 0;<br>
 }<br>
<br>
 bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
@@ -95,7 +100,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
                return false;<br>
        }<br>
<br>
-       /* uint32 imageSize = */ stream.readUint32LE();<br>
+       uint32 imageSize = stream.readUint32LE();<br>
        /* uint32 pixelsPerMeterX = */ stream.readUint32LE();<br>
        /* uint32 pixelsPerMeterY = */ stream.readUint32LE();<br>
        _paletteColorCount = stream.readUint32LE();<br>
@@ -115,67 +120,12 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
                }<br>
        }<br>
<br>
-       // Start us at the beginning of the image<br>
-       stream.seek(imageOffset);<br>
-<br>
-       Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();<br>
-<br>
-       // BGRA for 24bpp and 32 bpp<br>
-       if (bitsPerPixel == 24 || bitsPerPixel == 32)<br>
-               format = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);<br>
-<br>
-       _surface = new Graphics::Surface();<br>
-       _surface->create(width, height, format);<br>
+       // Grab the frame data<br>
+       Common::SeekableSubReadStream subStream(&stream, imageOffset, imageOffset + imageSize);<br>
<br>
-       int srcPitch = width * (bitsPerPixel >> 3);<br>
-       const int extraDataLength = (srcPitch % 4) ? 4 - (srcPitch % 4) : 0;<br>
-<br>
-       if (bitsPerPixel == 8) {<br>
-               byte *dst = (byte *)_surface->getPixels();<br>
-<br>
-               for (int32 i = 0; i < height; i++) {<br>
-                       stream.read(dst + (height - i - 1) * width, width);<br>
-                       stream.skip(extraDataLength);<br>
-               }<br>
-       } else if (bitsPerPixel == 24) {<br>
-               byte *dst = (byte *)_surface->getBasePtr(0, height - 1);<br>
-<br>
-               for (int32 i = 0; i < height; i++) {<br>
-                       for (uint32 j = 0; j < width; j++) {<br>
-                               byte b = stream.readByte();<br>
-                               byte g = stream.readByte();<br>
-                               byte r = stream.readByte();<br>
-                               uint32 color = format.RGBToColor(r, g, b);<br>
-<br>
-                               *((uint32 *)dst) = color;<br>
-                               dst += format.bytesPerPixel;<br>
-                       }<br>
-<br>
-                       stream.skip(extraDataLength);<br>
-                       dst -= _surface->pitch * 2;<br>
-               }<br>
-       } else { // 32 bpp<br>
-               byte *dst = (byte *)_surface->getBasePtr(0, height - 1);<br>
-<br>
-               for (int32 i = 0; i < height; i++) {<br>
-                       for (uint32 j = 0; j < width; j++) {<br>
-                               byte b = stream.readByte();<br>
-                               byte g = stream.readByte();<br>
-                               byte r = stream.readByte();<br>
-                               // Ignore the last byte, as in v3 it is unused<br>
-                               // and should thus NOT be used as alpha.<br>
-                               // ref: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx</a><br>


-                               stream.readByte();<br>
-                               uint32 color = format.RGBToColor(r, g, b);<br>
-<br>
-                               *((uint32 *)dst) = color;<br>
-                               dst += format.bytesPerPixel;<br>
-                       }<br>
-<br>
-                       stream.skip(extraDataLength);<br>
-                       dst -= _surface->pitch * 2;<br>
-               }<br>
-       }<br>
+       // We only support raw bitmaps for now<br>
+       _codec = new BitmapRawDecoder(width, height, bitsPerPixel);<br>
+       _surface = _codec->decodeFrame(subStream);<br>
<br>
        return true;<br>
 }<br>
diff --git a/image/bmp.h b/image/bmp.h<br>
index bc4cfc3..b482cc6 100644<br>
--- a/image/bmp.h<br>
+++ b/image/bmp.h<br>
@@ -45,6 +45,8 @@ struct Surface;<br>
<br>
 namespace Image {<br>
<br>
+class Codec;<br>
+<br>
 class BitmapDecoder : public ImageDecoder {<br>
 public:<br>
        BitmapDecoder();<br>
@@ -58,7 +60,8 @@ public:<br>
        uint16 getPaletteColorCount() const { return _paletteColorCount; }<br>
<br>
 private:<br>
-       Graphics::Surface *_surface;<br>
+       Codec *_codec;<br>
+       const Graphics::Surface *_surface;<br>
        byte *_palette;<br>
        uint16 _paletteColorCount;<br>
 };<br>
diff --git a/image/codecs/bmp_raw.cpp b/image/codecs/bmp_raw.cpp<br>
new file mode 100644<br>
index 0000000..83aedc8<br>
--- /dev/null<br>
+++ b/image/codecs/bmp_raw.cpp<br>
@@ -0,0 +1,113 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "image/codecs/bmp_raw.h"<br>
+<br>
+#include "common/stream.h"<br>
+#include "common/textconsole.h"<br>
+#include "graphics/surface.h"<br>
+<br>
+namespace Image {<br>
+<br>
+BitmapRawDecoder::BitmapRawDecoder(int width, int height, int bitsPerPixel) : Codec(),<br>
+               _surface(0), _width(width), _height(height), _bitsPerPixel(bitsPerPixel) {<br>
+}<br>
+<br>
+BitmapRawDecoder::~BitmapRawDecoder() {<br>
+       if (_surface) {<br>
+               _surface->free();<br>
+               delete _surface;<br>
+       }<br>
+}<br>
+<br>
+const Graphics::Surface *BitmapRawDecoder::decodeFrame(Common::SeekableReadStream &stream) {<br>
+       Graphics::PixelFormat format = getPixelFormat();<br>
+<br>
+       _surface = new Graphics::Surface();<br>
+       _surface->create(_width, _height, format);<br>
+<br>
+       int srcPitch = _width * (_bitsPerPixel >> 3);<br>
+       const int extraDataLength = (srcPitch % 4) ? 4 - (srcPitch % 4) : 0;<br>
+<br>
+       if (_bitsPerPixel == 8) {<br>
+               byte *dst = (byte *)_surface->getPixels();<br>
+<br>
+               for (int i = 0; i < _height; i++) {<br>
+                       stream.read(dst + (_height - i - 1) * _width, _width);<br>
+                       stream.skip(extraDataLength);<br>
+               }<br>
+       } else if (_bitsPerPixel == 24) {<br>
+               byte *dst = (byte *)_surface->getBasePtr(0, _height - 1);<br>
+<br>
+               for (int i = 0; i < _height; i++) {<br>
+                       for (int j = 0; j < _width; j++) {<br>
+                               byte b = stream.readByte();<br>
+                               byte g = stream.readByte();<br>
+                               byte r = stream.readByte();<br>
+                               uint32 color = format.RGBToColor(r, g, b);<br>
+<br>
+                               *((uint32 *)dst) = color;<br>
+                               dst += format.bytesPerPixel;<br>
+                       }<br>
+<br>
+                       stream.skip(extraDataLength);<br>
+                       dst -= _surface->pitch * 2;<br>
+               }<br>
+       } else { // 32 bpp<br>
+               byte *dst = (byte *)_surface->getBasePtr(0, _height - 1);<br>
+<br>
+               for (int i = 0; i < _height; i++) {<br>
+                       for (int j = 0; j < _width; j++) {<br>
+                               byte b = stream.readByte();<br>
+                               byte g = stream.readByte();<br>
+                               byte r = stream.readByte();<br>
+                               // Ignore the last byte, as in v3 it is unused<br>
+                               // and should thus NOT be used as alpha.<br>
+                               // ref: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx</a><br>


+                               stream.readByte();<br>
+                               uint32 color = format.RGBToColor(r, g, b);<br>
+<br>
+                               *((uint32 *)dst) = color;<br>
+                               dst += format.bytesPerPixel;<br>
+                       }<br>
+<br>
+                       stream.skip(extraDataLength);<br>
+                       dst -= _surface->pitch * 2;<br>
+               }<br>
+       }<br>
+<br>
+       return _surface;<br>
+}<br>
+<br>
+Graphics::PixelFormat BitmapRawDecoder::getPixelFormat() const {<br>
+       switch (_bitsPerPixel) {<br>
+       case 8:<br>
+               return Graphics::PixelFormat::createFormatCLUT8();<br>
+       case 24:<br>
+       case 32:<br>
+               return Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);<br>
+       }<br>
+<br>
+       error("Unhandled BMP raw %dbpp", _bitsPerPixel);<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/bmp_raw.h b/image/codecs/bmp_raw.h<br>
new file mode 100644<br>
index 0000000..d589d7e<br>
--- /dev/null<br>
+++ b/image/codecs/bmp_raw.h<br>
@@ -0,0 +1,52 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+ *<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef IMAGE_CODECS_BMP_RAW_H<br>
+#define IMAGE_CODECS_BMP_RAW_H<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+namespace Image {<br>
+<br>
+/**<br>
+ * Bitmap raw image decoder.<br>
+ *<br>
+ * Used in image:<br>
+ *  - BitmapDecoder<br>
+ */<br>
+class BitmapRawDecoder : public Codec {<br>
+public:<br>
+       BitmapRawDecoder(int width, int height, int bitsPerPixel);<br>
+       ~BitmapRawDecoder();<br>
+<br>
+       const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);<br>
+       Graphics::PixelFormat getPixelFormat() const;<br>
+<br>
+private:<br>
+       Graphics::Surface *_surface;<br>
+       int _width, _height;<br>
+       int _bitsPerPixel;<br>
+};<br>
+<br>
+} // End of namespace Image<br>
+<br>
+#endif<br>
diff --git a/image/<a href="http://module.mk" target="_blank">module.mk</a> b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
index 46129cb..ab0a2a9 100644<br>
--- a/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
+++ b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
@@ -8,6 +8,7 @@ MODULE_OBJS := \<br>
        pict.o \<br>
        png.o \<br>
        tga.o \<br>
+       codecs/bmp_raw.o \<br>
        codecs/cdtoons.o \<br>
        codecs/cinepak.o \<br>
        codecs/indeo3.o \<br>
<br>
<br>
Commit: 231a02c759169a5c927018699e1533d267ea8372<br>
    <a href="https://github.com/scummvm/scummvm/commit/231a02c759169a5c927018699e1533d267ea8372" target="_blank">https://github.com/scummvm/scummvm/commit/231a02c759169a5c927018699e1533d267ea8372</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:32:06-08:00<br>
<br>
Commit Message:<br>
VIDEO: Use the bitmap header compression field for AVI codecs<br>
<br>
Changed paths:<br>
    video/avi_decoder.cpp<br>
<br>
<br>
<br>
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp<br>
index e9c6ef9..59ee72d 100644<br>
--- a/video/avi_decoder.cpp<br>
+++ b/video/avi_decoder.cpp<br>
@@ -74,18 +74,6 @@ namespace Video {<br>
 #define ID_PRMI MKTAG('P','R','M','I')<br>
 #define ID_STRN MKTAG('s','t','r','n')<br>
<br>
-// Codec tags<br>
-#define ID_RLE  MKTAG('R','L','E',' ')<br>
-#define ID_CRAM MKTAG('C','R','A','M')<br>
-#define ID_MSVC MKTAG('m','s','v','c')<br>
-#define ID_WHAM MKTAG('W','H','A','M')<br>
-#define ID_CVID MKTAG('c','v','i','d')<br>
-#define ID_IV32 MKTAG('i','v','3','2')<br>
-#define ID_DUCK MKTAG('D','U','C','K')<br>
-#define ID_DUCK2 MKTAG('d','u','c','k') // Some videos have DUCK tag in lowercase<br>
-#define ID_MPG2 MKTAG('m','p','g','2')<br>
-#define ID_MJPG MKTAG('m','j','p','g')<br>
-<br>
 // Stream Types<br>
 enum {<br>
        kStreamTypePaletteChange = MKTAG16('p', 'c'),<br>
@@ -266,9 +254,6 @@ void AVIDecoder::handleStreamHeader(uint32 size) {<br>
                if (bmInfo.clrUsed == 0)<br>
                        bmInfo.clrUsed = 256;<br>
<br>
-               if (sHeader.streamHandler == 0)<br>
-                       sHeader.streamHandler = bmInfo.compression;<br>
-<br>
                byte *initialPalette = 0;<br>
<br>
                if (bmInfo.bitCount == 8) {<br>
@@ -770,30 +755,34 @@ bool AVIDecoder::AVIVideoTrack::rewind() {<br>
 }<br>
<br>
 Image::Codec *AVIDecoder::AVIVideoTrack::createCodec() {<br>
-       switch (_vidsHeader.streamHandler) {<br>
-       case ID_CRAM:<br>
-       case ID_MSVC:<br>
-       case ID_WHAM:<br>
-               return new Image::MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount);<br>
-       case ID_RLE:<br>
+       switch (_bmInfo.compression) {<br>
+       case SWAP_CONSTANT_32(1):<br>
                return new Image::MSRLEDecoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount);<br>
-       case ID_CVID:<br>
+       case MKTAG('C','R','A','M'):<br>
+       case MKTAG('m','s','v','c'):<br>
+       case MKTAG('W','H','A','M'):<br>
+               return new Image::MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount);<br>
+       case MKTAG('c','v','i','d'):<br>
                return new Image::CinepakDecoder(_bmInfo.bitCount);<br>
-       case ID_IV32:<br>
+       case MKTAG('I','V','3','2'):<br>
                return new Image::Indeo3Decoder(_bmInfo.width, _bmInfo.height);<br>
 #ifdef VIDEO_CODECS_TRUEMOTION1_H<br>
-       case ID_DUCK:<br>
-       case ID_DUCK2:<br>
+       case MKTAG('D','U','C','K'):<br>
+       case MKTAG('d','u','c','k'):<br>
                return new Image::TrueMotion1Decoder(_bmInfo.width, _bmInfo.height);<br>
 #endif<br>
 #ifdef USE_MPEG2<br>
-       case ID_MPG2:<br>
+       case MKTAG('m','p','g','2'):<br>
                return new Image::MPEGDecoder();<br>
 #endif<br>
-       case ID_MJPG:<br>
+       case MKTAG('M','J','P','G'):<br>
+       case MKTAG('m','j','p','g'):<br>
                return new Image::MJPEGDecoder();<br>
        default:<br>
-               warning("Unknown/Unhandled compression format \'%s\'", tag2str(_vidsHeader.streamHandler));<br>
+               if (_bmInfo.compression & 0x00FFFFFF)<br>
+                       warning("Unknown/Unhandled AVI compression format \'%s\'", tag2str(_bmInfo.compression));<br>
+               else<br>
+                       warning("Unknown/Unhandled AVI compression format %d", SWAP_BYTES_32(_bmInfo.compression));<br>
        }<br>
<br>
        return 0;<br>
<br>
<br>
Commit: 05e9ff136ae059622a0262380be7bc6460d204f0<br>
    <a href="https://github.com/scummvm/scummvm/commit/05e9ff136ae059622a0262380be7bc6460d204f0" target="_blank">https://github.com/scummvm/scummvm/commit/05e9ff136ae059622a0262380be7bc6460d204f0</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:32:06-08:00<br>
<br>
Commit Message:<br>
IMAGE: Share the same pool of codecs between bitmap and AVI<br>
<br>
Changed paths:<br>
  A image/codecs/codec.cpp<br>
    image/bmp.cpp<br>
    image/codecs/codec.h<br>
    image/<a href="http://module.mk" target="_blank">module.mk</a><br>
    video/avi_decoder.cpp<br>
<br>
<br>
<br>
diff --git a/image/bmp.cpp b/image/bmp.cpp<br>
index eb8e300..cdf6e40 100644<br>
--- a/image/bmp.cpp<br>
+++ b/image/bmp.cpp<br>
@@ -27,7 +27,7 @@<br>
 #include "common/textconsole.h"<br>
 #include "graphics/pixelformat.h"<br>
 #include "graphics/surface.h"<br>
-#include "image/codecs/bmp_raw.h"<br>
+#include "image/codecs/codec.h"<br>
<br>
 namespace Image {<br>
<br>
@@ -93,13 +93,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
                return false;<br>
        }<br>
<br>
-       uint32 compression = stream.readUint32LE();<br>
-<br>
-       if (compression != 0) {<br>
-               warning("Compressed bitmaps not supported");<br>
-               return false;<br>
-       }<br>
-<br>
+       uint32 compression = stream.readUint32BE();<br>
        uint32 imageSize = stream.readUint32LE();<br>
        /* uint32 pixelsPerMeterX = */ stream.readUint32LE();<br>
        /* uint32 pixelsPerMeterY = */ stream.readUint32LE();<br>
@@ -120,11 +114,15 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
                }<br>
        }<br>
<br>
+       // Create the codec (it will warn about unhandled compression)<br>
+       _codec = createBitmapCodec(compression, width, height, bitsPerPixel);<br>
+       if (!_codec)<br>
+               return false;<br>
+<br>
        // Grab the frame data<br>
        Common::SeekableSubReadStream subStream(&stream, imageOffset, imageOffset + imageSize);<br>
<br>
        // We only support raw bitmaps for now<br>
-       _codec = new BitmapRawDecoder(width, height, bitsPerPixel);<br>
        _surface = _codec->decodeFrame(subStream);<br>
<br>
        return true;<br>
diff --git a/image/codecs/codec.cpp b/image/codecs/codec.cpp<br>
new file mode 100644<br>
index 0000000..7d4e343<br>
--- /dev/null<br>
+++ b/image/codecs/codec.cpp<br>
@@ -0,0 +1,77 @@<br>
+/* ScummVM - Graphic Adventure Engine<br>
+ *<br>
+ * ScummVM is the legal property of its developers, whose names<br>
+ * are too numerous to list here. Please refer to the COPYRIGHT<br>
+ * file distributed with this source distribution.<br>
+ *<br>
+ * This program is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU General Public License<br>
+ * as published by the Free Software Foundation; either version 2<br>
+ * of the License, or (at your option) any later version.<br>
+<br>
+ * This program is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
+ * GNU General Public License for more details.<br>
+<br>
+ * You should have received a copy of the GNU General Public License<br>
+ * along with this program; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<br>
+ *<br>
+ */<br>
+<br>
+#include "common/scummsys.h"<br>
+<br>
+#include "image/codecs/codec.h"<br>
+<br>
+#include "image/codecs/bmp_raw.h"<br>
+#include "image/codecs/cinepak.h"<br>
+#include "image/codecs/indeo3.h"<br>
+#include "image/codecs/mjpeg.h"<br>
+#include "image/codecs/mpeg.h"<br>
+#include "image/codecs/msvideo1.h"<br>
+#include "image/codecs/msrle.h"<br>
+#include "image/codecs/truemotion1.h"<br>
+<br>
+#include "common/endian.h"<br>
+#include "common/textconsole.h"<br>
+<br>
+namespace Image {<br>
+<br>
+Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel) {<br>
+       switch (tag) {<br>
+       case SWAP_CONSTANT_32(0):<br>
+               return new BitmapRawDecoder(width, height, bitsPerPixel);<br>
+       case SWAP_CONSTANT_32(1):<br>
+               return new MSRLEDecoder(width, height, bitsPerPixel);<br>
+       case MKTAG('C','R','A','M'):<br>
+       case MKTAG('m','s','v','c'):<br>
+       case MKTAG('W','H','A','M'):<br>
+               return new MSVideo1Decoder(width, height, bitsPerPixel);<br>
+       case MKTAG('c','v','i','d'):<br>
+               return new CinepakDecoder(bitsPerPixel);<br>
+       case MKTAG('I','V','3','2'):<br>
+               return new Indeo3Decoder(width, height);<br>
+#ifdef VIDEO_CODECS_TRUEMOTION1_H<br>
+       case MKTAG('D','U','C','K'):<br>
+       case MKTAG('d','u','c','k'):<br>
+               return new TrueMotion1Decoder(width, height);<br>
+#endif<br>
+#ifdef USE_MPEG2<br>
+       case MKTAG('m','p','g','2'):<br>
+               return new MPEGDecoder();<br>
+#endif<br>
+       case MKTAG('M','J','P','G'):<br>
+       case MKTAG('m','j','p','g'):<br>
+               return new MJPEGDecoder();<br>
+       default:<br>
+               if (tag & 0x00FFFFFF)<br>
+                       warning("Unknown BMP/AVI compression format \'%s\'", tag2str(tag));<br>
+               else<br>
+                       warning("Unknown BMP/AVI compression format %d", SWAP_BYTES_32(tag));<br>
+       }<br>
+<br>
+       return 0;<br>
+}<br>
+<br>
+} // End of namespace Image<br>
diff --git a/image/codecs/codec.h b/image/codecs/codec.h<br>
index 092f975..87d6d6b 100644<br>
--- a/image/codecs/codec.h<br>
+++ b/image/codecs/codec.h<br>
@@ -84,6 +84,11 @@ public:<br>
        virtual bool hasDirtyPalette() const { return false; }<br>
 };<br>
<br>
+/**<br>
+ * Create a codec given a bitmap/AVI compression tag.<br>
+ */<br>
+Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel);<br>
+<br>
 } // End of namespace Image<br>
<br>
 #endif<br>
diff --git a/image/<a href="http://module.mk" target="_blank">module.mk</a> b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
index ab0a2a9..fdf52ec 100644<br>
--- a/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
+++ b/image/<a href="http://module.mk" target="_blank">module.mk</a><br>
@@ -11,6 +11,7 @@ MODULE_OBJS := \<br>
        codecs/bmp_raw.o \<br>
        codecs/cdtoons.o \<br>
        codecs/cinepak.o \<br>
+       codecs/codec.o \<br>
        codecs/indeo3.o \<br>
        codecs/mjpeg.o \<br>
        codecs/msrle.o \<br>
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp<br>
index 59ee72d..0697d89 100644<br>
--- a/video/avi_decoder.cpp<br>
+++ b/video/avi_decoder.cpp<br>
@@ -34,13 +34,7 @@<br>
 #include "audio/decoders/raw.h"<br>
<br>
 // Video Codecs<br>
-#include "image/codecs/cinepak.h"<br>
-#include "image/codecs/indeo3.h"<br>
-#include "image/codecs/mjpeg.h"<br>
-#include "image/codecs/mpeg.h"<br>
-#include "image/codecs/msvideo1.h"<br>
-#include "image/codecs/msrle.h"<br>
-#include "image/codecs/truemotion1.h"<br>
+#include "image/codecs/codec.h"<br>
<br>
 namespace Video {<br>
<br>
@@ -755,37 +749,7 @@ bool AVIDecoder::AVIVideoTrack::rewind() {<br>
 }<br>
<br>
 Image::Codec *AVIDecoder::AVIVideoTrack::createCodec() {<br>
-       switch (_bmInfo.compression) {<br>
-       case SWAP_CONSTANT_32(1):<br>
-               return new Image::MSRLEDecoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount);<br>
-       case MKTAG('C','R','A','M'):<br>
-       case MKTAG('m','s','v','c'):<br>
-       case MKTAG('W','H','A','M'):<br>
-               return new Image::MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount);<br>
-       case MKTAG('c','v','i','d'):<br>
-               return new Image::CinepakDecoder(_bmInfo.bitCount);<br>
-       case MKTAG('I','V','3','2'):<br>
-               return new Image::Indeo3Decoder(_bmInfo.width, _bmInfo.height);<br>
-#ifdef VIDEO_CODECS_TRUEMOTION1_H<br>
-       case MKTAG('D','U','C','K'):<br>
-       case MKTAG('d','u','c','k'):<br>
-               return new Image::TrueMotion1Decoder(_bmInfo.width, _bmInfo.height);<br>
-#endif<br>
-#ifdef USE_MPEG2<br>
-       case MKTAG('m','p','g','2'):<br>
-               return new Image::MPEGDecoder();<br>
-#endif<br>
-       case MKTAG('M','J','P','G'):<br>
-       case MKTAG('m','j','p','g'):<br>
-               return new Image::MJPEGDecoder();<br>
-       default:<br>
-               if (_bmInfo.compression & 0x00FFFFFF)<br>
-                       warning("Unknown/Unhandled AVI compression format \'%s\'", tag2str(_bmInfo.compression));<br>
-               else<br>
-                       warning("Unknown/Unhandled AVI compression format %d", SWAP_BYTES_32(_bmInfo.compression));<br>
-       }<br>
-<br>
-       return 0;<br>
+       return Image::createBitmapCodec(_bmInfo.compression, _bmInfo.width, _bmInfo.height, _bmInfo.bitCount);<br>
 }<br>
<br>
 void AVIDecoder::AVIVideoTrack::forceTrackEnd() {<br>
<br>
<br>
Commit: acec700c11040320122ed86cd5f1dad20de2d2a8<br>
    <a href="https://github.com/scummvm/scummvm/commit/acec700c11040320122ed86cd5f1dad20de2d2a8" target="_blank">https://github.com/scummvm/scummvm/commit/acec700c11040320122ed86cd5f1dad20de2d2a8</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:32:06-08:00<br>
<br>
Commit Message:<br>
IMAGE: Share the same pool of codecs between PICT and QuickTime<br>
<br>
Changed paths:<br>
    image/codecs/codec.cpp<br>
    image/codecs/codec.h<br>
    image/pict.cpp<br>
    video/qt_decoder.cpp<br>
<br>
<br>
<br>
diff --git a/image/codecs/codec.cpp b/image/codecs/codec.cpp<br>
index 7d4e343..530fb3b 100644<br>
--- a/image/codecs/codec.cpp<br>
+++ b/image/codecs/codec.cpp<br>
@@ -24,13 +24,19 @@<br>
<br>
 #include "image/codecs/codec.h"<br>
<br>
+#include "image/jpeg.h"<br>
 #include "image/codecs/bmp_raw.h"<br>
+#include "image/codecs/cdtoons.h"<br>
 #include "image/codecs/cinepak.h"<br>
 #include "image/codecs/indeo3.h"<br>
 #include "image/codecs/mjpeg.h"<br>
 #include "image/codecs/mpeg.h"<br>
 #include "image/codecs/msvideo1.h"<br>
 #include "image/codecs/msrle.h"<br>
+#include "image/codecs/qtrle.h"<br>
+#include "image/codecs/rpza.h"<br>
+#include "image/codecs/smc.h"<br>
+#include "image/codecs/svq1.h"<br>
 #include "image/codecs/truemotion1.h"<br>
<br>
 #include "common/endian.h"<br>
@@ -74,4 +80,38 @@ Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel) {<br>
        return 0;<br>
 }<br>
<br>
+Codec *createQuickTimeCodec(uint32 tag, int width, int height, int bitsPerPixel) {<br>
+       switch (tag) {<br>
+       case MKTAG('c','v','i','d'):<br>
+               // Cinepak: As used by most Myst and all Riven videos as well as some Myst ME videos. "The Chief" videos also use this.<br>
+               return new CinepakDecoder(bitsPerPixel);<br>
+       case MKTAG('r','p','z','a'):<br>
+               // Apple Video ("Road Pizza"): Used by some Myst videos.<br>
+               return new RPZADecoder(width, height);<br>
+       case MKTAG('r','l','e',' '):<br>
+               // QuickTime RLE: Used by some Myst ME videos.<br>
+               return new QTRLEDecoder(width, height, bitsPerPixel);<br>
+       case MKTAG('s','m','c',' '):<br>
+               // Apple SMC: Used by some Myst videos.<br>
+               return new SMCDecoder(width, height);<br>
+       case MKTAG('S','V','Q','1'):<br>
+               // Sorenson Video 1: Used by some Myst ME videos.<br>
+               return new SVQ1Decoder(width, height);<br>
+       case MKTAG('S','V','Q','3'):<br>
+               // Sorenson Video 3: Used by some Myst ME videos.<br>
+               warning("Sorenson Video 3 not yet supported");<br>
+               break;<br>
+       case MKTAG('j','p','e','g'):<br>
+               // JPEG: Used by some Myst ME 10th Anniversary videos.<br>
+               return new JPEGDecoder();<br>
+       case MKTAG('Q','k','B','k'):<br>
+               // CDToons: Used by most of the Broderbund games.<br>
+               return new CDToonsDecoder(width, height);<br>
+       default:<br>
+               warning("Unsupported QuickTime codec \'%s\'", tag2str(tag));<br>
+       }<br>
+<br>
+       return 0;<br>
+}<br>
+<br>
 } // End of namespace Image<br>
diff --git a/image/codecs/codec.h b/image/codecs/codec.h<br>
index 87d6d6b..89c8ec9 100644<br>
--- a/image/codecs/codec.h<br>
+++ b/image/codecs/codec.h<br>
@@ -89,6 +89,11 @@ public:<br>
  */<br>
 Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel);<br>
<br>
+/**<br>
+ * Create a codec given a QuickTime compression tag.<br>
+ */<br>
+Codec *createQuickTimeCodec(uint32 tag, int width, int height, int bitsPerPixel);<br>
+<br>
 } // End of namespace Image<br>
<br>
 #endif<br>
diff --git a/image/pict.cpp b/image/pict.cpp<br>
index 07e657f..89f115d 100644<br>
--- a/image/pict.cpp<br>
+++ b/image/pict.cpp<br>
@@ -20,8 +20,8 @@<br>
  *<br>
  */<br>
<br>
-#include "image/jpeg.h"<br>
 #include "image/pict.h"<br>
+#include "image/codecs/codec.h"<br>
<br>
 #include "common/debug.h"<br>
 #include "common/endian.h"<br>
@@ -229,7 +229,7 @@ bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) {<br>
<br>
        // NOTE: This is only a subset of the full PICT format.<br>
        //     - Only V2 (Extended) Images Supported<br>
-       //     - CompressedQuickTime (JPEG) compressed data is supported<br>
+       //     - CompressedQuickTime compressed data is supported<br>
        //     - DirectBitsRect/PackBitsRect compressed data is supported<br>
        for (uint32 opNum = 0; !stream.eos() && !stream.err() && stream.pos() < stream.size() && _continueParsing; opNum++) {<br>
                // PICT v2 opcodes are two bytes<br>
@@ -550,31 +550,37 @@ void PICTDecoder::decodeCompressedQuickTime(Common::SeekableReadStream &stream)<br>
        // Now we've reached the image descriptor, so read the relevant data from that<br>
        uint32 idStart = stream.pos();<br>
        uint32 idSize = stream.readUint32BE();<br>
-       uint32 codec = stream.readUint32BE();<br>
-       stream.skip(36); // miscellaneous stuff<br>
-       uint32 jpegSize = stream.readUint32BE();<br>
+       uint32 codecTag = stream.readUint32BE();<br>
+       stream.skip(24); // miscellaneous stuff<br>
+       uint16 width = stream.readUint16BE();<br>
+       uint16 height = stream.readUint16BE();<br>
+       stream.skip(8); // resolution, dpi<br>
+       uint32 imageSize = stream.readUint32BE();<br>
+       stream.skip(34);<br>
+       uint16 bitsPerPixel = stream.readUint16BE();<br>
        stream.skip(idSize - (stream.pos() - idStart)); // more useless stuff<br>
<br>
-       if (codec != MKTAG('j', 'p', 'e', 'g'))<br>
-               error("Unhandled CompressedQuickTime format '%s'", tag2str(codec));<br>
+       Common::SeekableSubReadStream imageStream(&stream, stream.pos(), stream.pos() + imageSize);<br>
<br>
-       Common::SeekableSubReadStream jpegStream(&stream, stream.pos(), stream.pos() + jpegSize);<br>
+       Codec *codec = createQuickTimeCodec(codecTag, width, height, bitsPerPixel);<br>
+       if (!codec)<br>
+               error("Unhandled CompressedQuickTime format");<br>
<br>
-       JPEGDecoder jpeg;<br>
-       if (!jpeg.loadStream(jpegStream))<br>
-               error("PICTDecoder::decodeCompressedQuickTime(): Could not decode JPEG data");<br>
+       const Graphics::Surface *surface = codec->decodeFrame(imageStream);<br>
<br>
-       const Graphics::Surface *jpegSurface = jpeg.getSurface();<br>
+       if (!surface)<br>
+               error("PICTDecoder::decodeCompressedQuickTime(): Could not decode data");<br>
<br>
        if (!_outputSurface) {<br>
                _outputSurface = new Graphics::Surface();<br>
-               _outputSurface->create(_imageRect.width(), _imageRect.height(), jpegSurface->format);<br>
+               _outputSurface->create(_imageRect.width(), _imageRect.height(), surface->format);<br>
        }<br>
<br>
-       for (uint16 y = 0; y < jpegSurface->h; y++)<br>
-               memcpy(_outputSurface->getBasePtr(0 + xOffset, y + yOffset), jpegSurface->getBasePtr(0, y), jpegSurface->w * jpegSurface->format.bytesPerPixel);<br>
+       for (uint16 y = 0; y < surface->h; y++)<br>
+               memcpy(_outputSurface->getBasePtr(0 + xOffset, y + yOffset), surface->getBasePtr(0, y), surface->w * surface->format.bytesPerPixel);<br>
<br>
        stream.seek(startPos + dataSize);<br>
+       delete codec;<br>
 }<br>
<br>
 } // End of namespace Image<br>
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp<br>
index cd36796..0a29692 100644<br>
--- a/video/qt_decoder.cpp<br>
+++ b/video/qt_decoder.cpp<br>
@@ -39,13 +39,7 @@<br>
 #include "common/util.h"<br>
<br>
 // Video codecs<br>
-#include "image/codecs/cinepak.h"<br>
-#include "image/jpeg.h"<br>
-#include "image/codecs/qtrle.h"<br>
-#include "image/codecs/rpza.h"<br>
-#include "image/codecs/smc.h"<br>
-#include "image/codecs/cdtoons.h"<br>
-#include "image/codecs/svq1.h"<br>
+#include "image/codecs/codec.h"<br>
<br>
 namespace Video {<br>
<br>
@@ -270,42 +264,7 @@ QuickTimeDecoder::VideoSampleDesc::~VideoSampleDesc() {<br>
 }<br>
<br>
 void QuickTimeDecoder::VideoSampleDesc::initCodec() {<br>
-       switch (_codecTag) {<br>
-       case MKTAG('c','v','i','d'):<br>
-               // Cinepak: As used by most Myst and all Riven videos as well as some Myst ME videos. "The Chief" videos also use this.<br>
-               _videoCodec = new Image::CinepakDecoder(_bitsPerSample & 0x1f);<br>
-               break;<br>
-       case MKTAG('r','p','z','a'):<br>
-               // Apple Video ("Road Pizza"): Used by some Myst videos.<br>
-               _videoCodec = new Image::RPZADecoder(_parentTrack->width, _parentTrack->height);<br>
-               break;<br>
-       case MKTAG('r','l','e',' '):<br>
-               // QuickTime RLE: Used by some Myst ME videos.<br>
-               _videoCodec = new Image::QTRLEDecoder(_parentTrack->width, _parentTrack->height, _bitsPerSample & 0x1f);<br>
-               break;<br>
-       case MKTAG('s','m','c',' '):<br>
-               // Apple SMC: Used by some Myst videos.<br>
-               _videoCodec = new Image::SMCDecoder(_parentTrack->width, _parentTrack->height);<br>
-               break;<br>
-       case MKTAG('S','V','Q','1'):<br>
-               // Sorenson Video 1: Used by some Myst ME videos.<br>
-               _videoCodec = new Image::SVQ1Decoder(_parentTrack->width, _parentTrack->height);<br>
-               break;<br>
-       case MKTAG('S','V','Q','3'):<br>
-               // Sorenson Video 3: Used by some Myst ME videos.<br>
-               warning("Sorenson Video 3 not yet supported");<br>
-               break;<br>
-       case MKTAG('j','p','e','g'):<br>
-               // JPEG: Used by some Myst ME 10th Anniversary videos.<br>
-               _videoCodec = new Image::JPEGDecoder();<br>
-               break;<br>
-       case MKTAG('Q','k','B','k'):<br>
-               // CDToons: Used by most of the Broderbund games.<br>
-               _videoCodec = new Image::CDToonsDecoder(_parentTrack->width, _parentTrack->height);<br>
-               break;<br>
-       default:<br>
-               warning("Unsupported codec \'%s\'", tag2str(_codecTag));<br>
-       }<br>
+       _videoCodec = Image::createQuickTimeCodec(_codecTag, _parentTrack->width, _parentTrack->height, _bitsPerSample & 0x1f);<br>
 }<br>
<br>
 QuickTimeDecoder::AudioTrackHandler::AudioTrackHandler(QuickTimeDecoder *decoder, QuickTimeAudioTrack *audioTrack)<br>
<br>
<br>
Commit: 57aa610f0c6199fbe41fc5de495356aa29fae6b8<br>
    <a href="https://github.com/scummvm/scummvm/commit/57aa610f0c6199fbe41fc5de495356aa29fae6b8" target="_blank">https://github.com/scummvm/scummvm/commit/57aa610f0c6199fbe41fc5de495356aa29fae6b8</a><br>
Author: Matthew Hoops (<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>)<br>
Date: 2014-02-27T21:32:06-08:00<br>
<br>
Commit Message:<br>
IMAGE: Update comments<br>
<br>
Changed paths:<br>
    image/codecs/bmp_raw.h<br>
    image/codecs/cdtoons.h<br>
    image/codecs/cinepak.h<br>
    image/codecs/codec.h<br>
    image/codecs/indeo3.h<br>
    image/codecs/mjpeg.h<br>
    image/codecs/mpeg.h<br>
    image/codecs/msrle.h<br>
    image/codecs/msvideo1.h<br>
    image/codecs/qtrle.h<br>
    image/codecs/rpza.h<br>
    image/codecs/smc.h<br>
    image/codecs/svq1.h<br>
    image/codecs/truemotion1.h<br>
    image/jpeg.h<br>
<br>
<br>
<br>
diff --git a/image/codecs/bmp_raw.h b/image/codecs/bmp_raw.h<br>
index d589d7e..99509a1 100644<br>
--- a/image/codecs/bmp_raw.h<br>
+++ b/image/codecs/bmp_raw.h<br>
@@ -30,8 +30,7 @@ namespace Image {<br>
 /**<br>
  * Bitmap raw image decoder.<br>
  *<br>
- * Used in image:<br>
- *  - BitmapDecoder<br>
+ * Used by BMP/AVI.<br>
  */<br>
 class BitmapRawDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/cdtoons.h b/image/codecs/cdtoons.h<br>
index a75ce55..889ec3e 100644<br>
--- a/image/codecs/cdtoons.h<br>
+++ b/image/codecs/cdtoons.h<br>
@@ -41,8 +41,7 @@ struct CDToonsBlock {<br>
 /**<br>
  * Broderbund CDToons decoder.<br>
  *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
+ * Used by PICT/QuickTime.<br>
  */<br>
 class CDToonsDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/cinepak.h b/image/codecs/cinepak.h<br>
index 985fc91..e9cd437 100644<br>
--- a/image/codecs/cinepak.h<br>
+++ b/image/codecs/cinepak.h<br>
@@ -62,9 +62,7 @@ struct CinepakFrame {<br>
 /**<br>
  * Cinepak decoder.<br>
  *<br>
- * Used in video:<br>
- *  - AVIDecoder<br>
- *  - QuickTimeDecoder<br>
+ * Used by BMP/AVI and PICT/QuickTime.<br>
  */<br>
 class CinepakDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/codec.h b/image/codecs/codec.h<br>
index 89c8ec9..d87758e 100644<br>
--- a/image/codecs/codec.h<br>
+++ b/image/codecs/codec.h<br>
@@ -44,6 +44,10 @@ namespace Image {<br>
  * An ImageDecoder can always be a Codec, but a Codec may not necessarily<br>
  * be able to be an ImageDecoder.<br>
  *<br>
+ * Used in image:<br>
+ *  - BitmapDecoder<br>
+ *  - PICTDecoder<br>
+ *<br>
  * Used in video:<br>
  *  - AVIDecoder<br>
  *  - QuickTimeDecoder<br>
diff --git a/image/codecs/indeo3.h b/image/codecs/indeo3.h<br>
index f1b406d..0ff0265 100644<br>
--- a/image/codecs/indeo3.h<br>
+++ b/image/codecs/indeo3.h<br>
@@ -39,8 +39,9 @@ namespace Image {<br>
 /**<br>
  * Intel Indeo 3 decoder.<br>
  *<br>
+ * Used by BMP/AVI.<br>
+ *<br>
  * Used in video:<br>
- *  - AVIDecoder<br>
  *  - VMDDecoder<br>
  */<br>
 class Indeo3Decoder : public Codec {<br>
diff --git a/image/codecs/mjpeg.h b/image/codecs/mjpeg.h<br>
index 904b89d..2db736c 100644<br>
--- a/image/codecs/mjpeg.h<br>
+++ b/image/codecs/mjpeg.h<br>
@@ -39,8 +39,7 @@ namespace Image {<br>
 /**<br>
  * Motion JPEG decoder.<br>
  *<br>
- * Used in video:<br>
- *  - AVIDecoder<br>
+ * Used by BMP/AVI.<br>
  */<br>
 class MJPEGDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/mpeg.h b/image/codecs/mpeg.h<br>
index 7f231dd..6cb10f2 100644<br>
--- a/image/codecs/mpeg.h<br>
+++ b/image/codecs/mpeg.h<br>
@@ -62,10 +62,13 @@ namespace Graphics {<br>
 struct Surface;<br>
 }<br>
<br>
-namespace Image {<br>
-<br>
-// MPEG 1/2 video decoder<br>
+namespace Image {<br>
<br>
+/**<br>
+ * MPEG 1/2 video decoder.<br>
+ *<br>
+ * Used by BMP/AVI.<br>
+ */<br>
 class MPEGDecoder : public Codec {<br>
 public:<br>
        MPEGDecoder();<br>
diff --git a/image/codecs/msrle.h b/image/codecs/msrle.h<br>
index a65ef1c..116b1bc 100644<br>
--- a/image/codecs/msrle.h<br>
+++ b/image/codecs/msrle.h<br>
@@ -30,8 +30,7 @@ namespace Image {<br>
 /**<br>
  * Microsoft Run-Length Encoding decoder.<br>
  *<br>
- * Used in video:<br>
- *  - AVIDecoder<br>
+ * Used by BMP/AVI.<br>
  */<br>
 class MSRLEDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/msvideo1.h b/image/codecs/msvideo1.h<br>
index bdee5ac..2a6dcd0 100644<br>
--- a/image/codecs/msvideo1.h<br>
+++ b/image/codecs/msvideo1.h<br>
@@ -30,8 +30,7 @@ namespace Image {<br>
 /**<br>
  * Microsoft Video 1 decoder.<br>
  *<br>
- * Used in video:<br>
- *  - AVIDecoder<br>
+ * Used by BMP/AVI.<br>
  */<br>
 class MSVideo1Decoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/qtrle.h b/image/codecs/qtrle.h<br>
index 7ef8953..b44a46c 100644<br>
--- a/image/codecs/qtrle.h<br>
+++ b/image/codecs/qtrle.h<br>
@@ -31,8 +31,7 @@ namespace Image {<br>
 /**<br>
  * QuickTime Run-Length Encoding decoder.<br>
  *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
+ * Used by PICT/QuickTime.<br>
  */<br>
 class QTRLEDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/rpza.h b/image/codecs/rpza.h<br>
index 62f4c02..d1dbbdb 100644<br>
--- a/image/codecs/rpza.h<br>
+++ b/image/codecs/rpza.h<br>
@@ -31,8 +31,7 @@ namespace Image {<br>
 /**<br>
  * Apple RPZA decoder.<br>
  *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
+ * Used by PICT/QuickTime.<br>
  */<br>
 class RPZADecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/smc.h b/image/codecs/smc.h<br>
index 579d629..655ff0a 100644<br>
--- a/image/codecs/smc.h<br>
+++ b/image/codecs/smc.h<br>
@@ -37,8 +37,7 @@ enum {<br>
 /**<br>
  * Apple SMC decoder.<br>
  *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
+ * Used by PICT/QuickTime.<br>
  */<br>
 class SMCDecoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/svq1.h b/image/codecs/svq1.h<br>
index 687f761..236b810 100644<br>
--- a/image/codecs/svq1.h<br>
+++ b/image/codecs/svq1.h<br>
@@ -36,8 +36,7 @@ namespace Image {<br>
 /**<br>
  * Sorenson Vector Quantizer 1 decoder.<br>
  *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
+ * Used by PICT/QuickTime.<br>
  */<br>
 class SVQ1Decoder : public Codec {<br>
 public:<br>
diff --git a/image/codecs/truemotion1.h b/image/codecs/truemotion1.h<br>
index bb87dbc..12570f0 100644<br>
--- a/image/codecs/truemotion1.h<br>
+++ b/image/codecs/truemotion1.h<br>
@@ -35,8 +35,7 @@ namespace Image {<br>
 /**<br>
  * Duck TrueMotion 1 decoder.<br>
  *<br>
- * Used in video:<br>
- *  - AVIDecoder<br>
+ * Used by BMP/AVI.<br>
  */<br>
 class TrueMotion1Decoder : public Codec {<br>
 public:<br>
diff --git a/image/jpeg.h b/image/jpeg.h<br>
index dea799c..ac0d22d 100644<br>
--- a/image/jpeg.h<br>
+++ b/image/jpeg.h<br>
@@ -27,11 +27,7 @@<br>
  *  - mohawk<br>
  *  - wintermute<br>
  *<br>
- * Used in image:<br>
- *  - PICTDecoder<br>
- *<br>
- * Used in video:<br>
- *  - QuickTimeDecoder<br>
+ * Used by PICT/QuickTime.<br>
  */<br>
<br>
 #ifndef IMAGE_JPEG_H<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Flow-based real-time traffic analytics software. Cisco certified tool.<br>
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer<br>
Customize your own dashboards, set traffic alerts and generate reports.<br>
Network behavioral analysis & security monitoring. All-in-one tool.<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Scummvm-cvs-logs mailing list<br>
<a href="mailto:Scummvm-cvs-logs@lists.sourceforge.net">Scummvm-cvs-logs@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/scummvm-cvs-logs" target="_blank">https://lists.sourceforge.net/lists/listinfo/scummvm-cvs-logs</a><br>
</blockquote></div><br></div>