aboutsummaryrefslogtreecommitdiff
path: root/image/codecs
diff options
context:
space:
mode:
authorMatthew Hoops2014-02-27 21:27:25 -0500
committerMatthew Hoops2014-02-28 00:32:06 -0500
commitacec700c11040320122ed86cd5f1dad20de2d2a8 (patch)
tree501426eba2b1b2c8aa66748d8152db6e703d94d0 /image/codecs
parent05e9ff136ae059622a0262380be7bc6460d204f0 (diff)
downloadscummvm-rg350-acec700c11040320122ed86cd5f1dad20de2d2a8.tar.gz
scummvm-rg350-acec700c11040320122ed86cd5f1dad20de2d2a8.tar.bz2
scummvm-rg350-acec700c11040320122ed86cd5f1dad20de2d2a8.zip
IMAGE: Share the same pool of codecs between PICT and QuickTime
Diffstat (limited to 'image/codecs')
-rw-r--r--image/codecs/codec.cpp40
-rw-r--r--image/codecs/codec.h5
2 files changed, 45 insertions, 0 deletions
diff --git a/image/codecs/codec.cpp b/image/codecs/codec.cpp
index 7d4e34320f..530fb3b836 100644
--- a/image/codecs/codec.cpp
+++ b/image/codecs/codec.cpp
@@ -24,13 +24,19 @@
#include "image/codecs/codec.h"
+#include "image/jpeg.h"
#include "image/codecs/bmp_raw.h"
+#include "image/codecs/cdtoons.h"
#include "image/codecs/cinepak.h"
#include "image/codecs/indeo3.h"
#include "image/codecs/mjpeg.h"
#include "image/codecs/mpeg.h"
#include "image/codecs/msvideo1.h"
#include "image/codecs/msrle.h"
+#include "image/codecs/qtrle.h"
+#include "image/codecs/rpza.h"
+#include "image/codecs/smc.h"
+#include "image/codecs/svq1.h"
#include "image/codecs/truemotion1.h"
#include "common/endian.h"
@@ -74,4 +80,38 @@ Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel) {
return 0;
}
+Codec *createQuickTimeCodec(uint32 tag, int width, int height, int bitsPerPixel) {
+ switch (tag) {
+ case MKTAG('c','v','i','d'):
+ // Cinepak: As used by most Myst and all Riven videos as well as some Myst ME videos. "The Chief" videos also use this.
+ return new CinepakDecoder(bitsPerPixel);
+ case MKTAG('r','p','z','a'):
+ // Apple Video ("Road Pizza"): Used by some Myst videos.
+ return new RPZADecoder(width, height);
+ case MKTAG('r','l','e',' '):
+ // QuickTime RLE: Used by some Myst ME videos.
+ return new QTRLEDecoder(width, height, bitsPerPixel);
+ case MKTAG('s','m','c',' '):
+ // Apple SMC: Used by some Myst videos.
+ return new SMCDecoder(width, height);
+ case MKTAG('S','V','Q','1'):
+ // Sorenson Video 1: Used by some Myst ME videos.
+ return new SVQ1Decoder(width, height);
+ case MKTAG('S','V','Q','3'):
+ // Sorenson Video 3: Used by some Myst ME videos.
+ warning("Sorenson Video 3 not yet supported");
+ break;
+ case MKTAG('j','p','e','g'):
+ // JPEG: Used by some Myst ME 10th Anniversary videos.
+ return new JPEGDecoder();
+ case MKTAG('Q','k','B','k'):
+ // CDToons: Used by most of the Broderbund games.
+ return new CDToonsDecoder(width, height);
+ default:
+ warning("Unsupported QuickTime codec \'%s\'", tag2str(tag));
+ }
+
+ return 0;
+}
+
} // End of namespace Image
diff --git a/image/codecs/codec.h b/image/codecs/codec.h
index 87d6d6b998..89c8ec9bf5 100644
--- a/image/codecs/codec.h
+++ b/image/codecs/codec.h
@@ -89,6 +89,11 @@ public:
*/
Codec *createBitmapCodec(uint32 tag, int width, int height, int bitsPerPixel);
+/**
+ * Create a codec given a QuickTime compression tag.
+ */
+Codec *createQuickTimeCodec(uint32 tag, int width, int height, int bitsPerPixel);
+
} // End of namespace Image
#endif