diff options
author | Marisa-Chan | 2014-11-12 16:38:28 +0600 |
---|---|---|
committer | Marisa-Chan | 2014-11-12 16:38:28 +0600 |
commit | e6f66877627ff4ef03ad8d1ea8a64c4278593d22 (patch) | |
tree | b3f3815c2b43e711108ea74750487738053fa7b7 /image/codecs | |
parent | f43326a533faec014fb1987f9ba3729127c46487 (diff) | |
parent | 54a4b2fa863b5fd9469e360ecd7c4b0717b373fe (diff) | |
download | scummvm-rg350-e6f66877627ff4ef03ad8d1ea8a64c4278593d22.tar.gz scummvm-rg350-e6f66877627ff4ef03ad8d1ea8a64c4278593d22.tar.bz2 scummvm-rg350-e6f66877627ff4ef03ad8d1ea8a64c4278593d22.zip |
ZVISION: Merge upstream
Diffstat (limited to 'image/codecs')
-rw-r--r-- | image/codecs/cinepak.cpp | 9 | ||||
-rw-r--r-- | image/codecs/mpeg.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp index 8d5dbceb4a..8464aa3889 100644 --- a/image/codecs/cinepak.cpp +++ b/image/codecs/cinepak.cpp @@ -52,11 +52,16 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() { _curFrame.strips = NULL; _y = 0; - if (bitsPerPixel == 8) + if (bitsPerPixel == 8) { _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); - else + } else { _pixelFormat = g_system->getScreenFormat(); + // Default to a 32bpp format, if in 8bpp mode + if (_pixelFormat.bytesPerPixel == 1) + _pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); + } + // Create a lookup for the clip function // This dramatically improves the performance of the color conversion _clipTableBuf = new byte[1024]; diff --git a/image/codecs/mpeg.h b/image/codecs/mpeg.h index 6cb10f21ac..82c3ad19ac 100644 --- a/image/codecs/mpeg.h +++ b/image/codecs/mpeg.h @@ -62,7 +62,7 @@ namespace Graphics { struct Surface; } -namespace Image { +namespace Image { /** * MPEG 1/2 video decoder. |