diff options
-rw-r--r-- | image/codecs/cdtoons.cpp (renamed from video/codecs/cdtoons.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/cdtoons.h (renamed from video/codecs/cdtoons.h) | 10 | ||||
-rw-r--r-- | image/codecs/cinepak.cpp (renamed from video/codecs/cinepak.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/cinepak.h (renamed from video/codecs/cinepak.h) | 10 | ||||
-rw-r--r-- | image/codecs/codec.h (renamed from video/codecs/codec.h) | 8 | ||||
-rw-r--r-- | image/codecs/indeo3.cpp (renamed from video/codecs/indeo3.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/indeo3.h (renamed from video/codecs/indeo3.h) | 12 | ||||
-rw-r--r-- | image/codecs/jpeg.cpp (renamed from video/codecs/jpeg.cpp) | 14 | ||||
-rw-r--r-- | image/codecs/jpeg.h (renamed from video/codecs/jpeg.h) | 16 | ||||
-rw-r--r-- | image/codecs/mjpeg.cpp (renamed from video/codecs/mjpeg.cpp) | 8 | ||||
-rw-r--r-- | image/codecs/mjpeg.h (renamed from video/codecs/mjpeg.h) | 10 | ||||
-rw-r--r-- | image/codecs/mpeg.cpp (renamed from video/codecs/mpeg.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/mpeg.h (renamed from video/codecs/mpeg.h) | 12 | ||||
-rw-r--r-- | image/codecs/msrle.cpp (renamed from video/codecs/msrle.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/msrle.h (renamed from video/codecs/msrle.h) | 10 | ||||
-rw-r--r-- | image/codecs/msvideo1.cpp (renamed from video/codecs/msvideo1.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/msvideo1.h (renamed from video/codecs/msvideo1.h) | 10 | ||||
-rw-r--r-- | image/codecs/qtrle.cpp (renamed from video/codecs/qtrle.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/qtrle.h (renamed from video/codecs/qtrle.h) | 10 | ||||
-rw-r--r-- | image/codecs/rpza.cpp (renamed from video/codecs/rpza.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/rpza.h (renamed from video/codecs/rpza.h) | 10 | ||||
-rw-r--r-- | image/codecs/smc.cpp (renamed from video/codecs/smc.cpp) | 6 | ||||
-rw-r--r-- | image/codecs/smc.h (renamed from video/codecs/smc.h) | 10 | ||||
-rw-r--r-- | image/codecs/svq1.cpp (renamed from video/codecs/svq1.cpp) | 10 | ||||
-rw-r--r-- | image/codecs/svq1.h (renamed from video/codecs/svq1.h) | 10 | ||||
-rw-r--r-- | image/codecs/svq1_cb.h (renamed from video/codecs/svq1_cb.h) | 8 | ||||
-rw-r--r-- | image/codecs/svq1_vlc.h (renamed from video/codecs/svq1_vlc.h) | 8 | ||||
-rw-r--r-- | image/codecs/truemotion1.cpp (renamed from video/codecs/truemotion1.cpp) | 10 | ||||
-rw-r--r-- | image/codecs/truemotion1.h (renamed from video/codecs/truemotion1.h) | 12 | ||||
-rw-r--r-- | image/codecs/truemotion1data.h (renamed from video/codecs/truemotion1data.h) | 8 | ||||
-rw-r--r-- | image/module.mk | 19 | ||||
-rw-r--r-- | video/avi_decoder.cpp | 30 | ||||
-rw-r--r-- | video/avi_decoder.h | 10 | ||||
-rw-r--r-- | video/coktel_decoder.cpp | 5 | ||||
-rw-r--r-- | video/coktel_decoder.h | 8 | ||||
-rw-r--r-- | video/module.mk | 19 | ||||
-rw-r--r-- | video/qt_decoder.cpp | 28 | ||||
-rw-r--r-- | video/qt_decoder.h | 8 |
38 files changed, 201 insertions, 196 deletions
diff --git a/video/codecs/cdtoons.cpp b/image/codecs/cdtoons.cpp index 8f69d52f74..e1246a034f 100644 --- a/video/codecs/cdtoons.cpp +++ b/image/codecs/cdtoons.cpp @@ -20,13 +20,13 @@ * */ -#include "video/codecs/cdtoons.h" +#include "image/codecs/cdtoons.h" #include "common/rect.h" #include "common/stream.h" #include "common/textconsole.h" #include "common/array.h" -namespace Video { +namespace Image { struct CDToonsAction { uint16 blockId; @@ -445,4 +445,4 @@ void CDToonsDecoder::setPalette(byte *data) { _palette[0] = _palette[1] = _palette[2] = 0; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/cdtoons.h b/image/codecs/cdtoons.h index 9fec370d1c..ac569b5307 100644 --- a/video/codecs/cdtoons.h +++ b/image/codecs/cdtoons.h @@ -20,14 +20,14 @@ * */ -#ifndef VIDEO_CODECS_CDTOONS_H -#define VIDEO_CODECS_CDTOONS_H +#ifndef IMAGE_CODECS_CDTOONS_H +#define IMAGE_CODECS_CDTOONS_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" #include "common/hashmap.h" -namespace Video { +namespace Image { struct CDToonsBlock { uint16 flags; @@ -67,6 +67,6 @@ private: void setPalette(byte *data); }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/cinepak.cpp b/image/codecs/cinepak.cpp index 229a0aed99..6af7ab08ff 100644 --- a/video/codecs/cinepak.cpp +++ b/image/codecs/cinepak.cpp @@ -20,7 +20,7 @@ * */ -#include "video/codecs/cinepak.h" +#include "image/codecs/cinepak.h" #include "common/debug.h" #include "common/stream.h" @@ -32,7 +32,7 @@ // Code here partially based off of ffmpeg ;) -namespace Video { +namespace Image { #define PUT_PIXEL(offset, lum, u, v) \ if (_pixelFormat.bytesPerPixel != 1) { \ @@ -306,4 +306,4 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st } } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/cinepak.h b/image/codecs/cinepak.h index 1286077cb9..99a316e428 100644 --- a/video/codecs/cinepak.h +++ b/image/codecs/cinepak.h @@ -20,20 +20,20 @@ * */ -#ifndef VIDEO_CODECS_CINEPAK_H -#define VIDEO_CODECS_CINEPAK_H +#ifndef IMAGE_CODECS_CINEPAK_H +#define IMAGE_CODECS_CINEPAK_H #include "common/scummsys.h" #include "common/rect.h" #include "graphics/pixelformat.h" -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" namespace Common { class SeekableReadStream; } -namespace Video { +namespace Image { struct CinepakCodebook { // These are not in the normal YUV colorspace, but in the Cinepak YUV colorspace instead. @@ -84,6 +84,6 @@ private: void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize); }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/codec.h b/image/codecs/codec.h index f9bed15ee0..c84f3e3308 100644 --- a/video/codecs/codec.h +++ b/image/codecs/codec.h @@ -20,8 +20,8 @@ * */ -#ifndef VIDEO_CODECS_CODEC_H -#define VIDEO_CODECS_CODEC_H +#ifndef IMAGE_CODECS_CODEC_H +#define IMAGE_CODECS_CODEC_H #include "graphics/surface.h" #include "graphics/pixelformat.h" @@ -30,7 +30,7 @@ namespace Common { class SeekableReadStream; } -namespace Video { +namespace Image { /** * An abstract representation of a video codec used for decoding @@ -77,6 +77,6 @@ public: virtual bool hasDirtyPalette() const { return false; } }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/indeo3.cpp b/image/codecs/indeo3.cpp index fc36b4c2d9..77bcec09bb 100644 --- a/video/codecs/indeo3.cpp +++ b/image/codecs/indeo3.cpp @@ -36,9 +36,9 @@ #include "graphics/yuv_to_rgb.h" -#include "video/codecs/indeo3.h" +#include "image/codecs/indeo3.h" -namespace Video { +namespace Image { Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _corrector_type(0) { _iv_frame[0].the_buf = 0; @@ -3484,4 +3484,4 @@ const uint32 Indeo3Decoder::correctionhighorder[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/indeo3.h b/image/codecs/indeo3.h index 2a0c453292..275cbc1654 100644 --- a/video/codecs/indeo3.h +++ b/image/codecs/indeo3.h @@ -29,12 +29,12 @@ * written, produced, and directed by Alan Smithee */ -#ifndef VIDEO_CODECS_INDEO3_H -#define VIDEO_CODECS_INDEO3_H +#ifndef IMAGE_CODECS_INDEO3_H +#define IMAGE_CODECS_INDEO3_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { /** * Intel Indeo 3 decoder. @@ -89,6 +89,6 @@ private: const byte *buf2, int min_width_160); }; -} // End of namespace Video +} // End of namespace Image -#endif // VIDEO_CODECS_INDEO3_H +#endif diff --git a/video/codecs/jpeg.cpp b/image/codecs/jpeg.cpp index 77917f37a2..9e8ba5a7d3 100644 --- a/video/codecs/jpeg.cpp +++ b/image/codecs/jpeg.cpp @@ -25,28 +25,28 @@ #include "graphics/surface.h" #include "image/jpeg.h" -#include "video/codecs/jpeg.h" +#include "image/codecs/jpeg.h" namespace Common { class SeekableReadStream; } -namespace Video { +namespace Image { -JPEGDecoder::JPEGDecoder() : Codec() { +JPEGCodec::JPEGCodec() : Codec() { _pixelFormat = g_system->getScreenFormat(); _surface = NULL; } -JPEGDecoder::~JPEGDecoder() { +JPEGCodec::~JPEGCodec() { if (_surface) { _surface->free(); delete _surface; } } -const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream *stream) { - Image::JPEGDecoder jpeg; +const Graphics::Surface *JPEGCodec::decodeImage(Common::SeekableReadStream *stream) { + JPEGDecoder jpeg; if (!jpeg.loadStream(*stream)) { warning("Failed to decode JPEG frame"); @@ -63,4 +63,4 @@ const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream *st return _surface; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/jpeg.h b/image/codecs/jpeg.h index 965d54dd29..d48604b067 100644 --- a/video/codecs/jpeg.h +++ b/image/codecs/jpeg.h @@ -20,10 +20,10 @@ * */ -#ifndef VIDEO_CODECS_JPEG_H -#define VIDEO_CODECS_JPEG_H +#ifndef IMAGE_CODECS_JPEG_H +#define IMAGE_CODECS_JPEG_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" #include "graphics/pixelformat.h" namespace Common { @@ -34,7 +34,7 @@ namespace Graphics { struct Surface; } -namespace Video { +namespace Image { /** * JPEG decoder. @@ -42,10 +42,10 @@ namespace Video { * Used in video: * - QuickTimeDecoder */ -class JPEGDecoder : public Codec { +class JPEGCodec : public Codec { public: - JPEGDecoder(); - ~JPEGDecoder(); + JPEGCodec(); + ~JPEGCodec(); const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream); Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; } @@ -55,6 +55,6 @@ private: Graphics::Surface *_surface; }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/mjpeg.cpp b/image/codecs/mjpeg.cpp index 16fb4f369e..aa7e1d0ec4 100644 --- a/video/codecs/mjpeg.cpp +++ b/image/codecs/mjpeg.cpp @@ -31,13 +31,13 @@ #include "graphics/surface.h" #include "image/jpeg.h" -#include "video/codecs/mjpeg.h" +#include "image/codecs/mjpeg.h" namespace Common { class SeekableReadStream; } -namespace Video { +namespace Image { MJPEGDecoder::MJPEGDecoder() : Codec() { _pixelFormat = g_system->getScreenFormat(); @@ -197,7 +197,7 @@ const Graphics::Surface *MJPEGDecoder::decodeImage(Common::SeekableReadStream *s stream->read(data + dataOffset, stream->size() - inputSkip); Common::MemoryReadStream convertedStream(data, outputSize, DisposeAfterUse::YES); - Image::JPEGDecoder jpeg; + JPEGDecoder jpeg; if (!jpeg.loadStream(convertedStream)) { warning("Failed to decode MJPEG frame"); @@ -214,4 +214,4 @@ const Graphics::Surface *MJPEGDecoder::decodeImage(Common::SeekableReadStream *s return _surface; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/mjpeg.h b/image/codecs/mjpeg.h index 10bb948901..b34b84b225 100644 --- a/video/codecs/mjpeg.h +++ b/image/codecs/mjpeg.h @@ -20,10 +20,10 @@ * */ -#ifndef VIDEO_CODECS_MJPEG_H -#define VIDEO_CODECS_MJPEG_H +#ifndef IMAGE_CODECS_MJPEG_H +#define IMAGE_CODECS_MJPEG_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" #include "graphics/pixelformat.h" namespace Common { @@ -34,7 +34,7 @@ namespace Graphics { struct Surface; } -namespace Video { +namespace Image { /** * Motion JPEG decoder. @@ -55,6 +55,6 @@ private: Graphics::Surface *_surface; }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/mpeg.cpp b/image/codecs/mpeg.cpp index 6fd7abb512..d81123f26d 100644 --- a/video/codecs/mpeg.cpp +++ b/image/codecs/mpeg.cpp @@ -27,9 +27,9 @@ #include "graphics/surface.h" #include "graphics/yuv_to_rgb.h" -#include "video/codecs/mpeg.h" +#include "image/codecs/mpeg.h" -namespace Video { +namespace Image { MPEGDecoder::MPEGDecoder() : Codec() { _pixelFormat = g_system->getScreenFormat(); @@ -104,4 +104,4 @@ bool MPEGDecoder::decodePacket(Common::SeekableReadStream *packet, uint32 &frame return foundFrame; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/mpeg.h b/image/codecs/mpeg.h index 0704a05fca..b9e961cf24 100644 --- a/video/codecs/mpeg.h +++ b/image/codecs/mpeg.h @@ -22,10 +22,10 @@ #ifdef USE_MPEG2 -#ifndef VIDEO_CODECS_MPEG_H -#define VIDEO_CODECS_MPEG_H +#ifndef IMAGE_CODECS_MPEG_H +#define IMAGE_CODECS_MPEG_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" #include "graphics/pixelformat.h" #if defined(__PLAYSTATION2__) @@ -62,7 +62,7 @@ namespace Graphics { struct Surface; } -namespace Video { +namespace Image { // MPEG 1/2 video decoder @@ -91,8 +91,8 @@ private: const mpeg2_info_t *_mpegInfo; }; -} // End of namespace Video +} // End of namespace Image -#endif // VIDEO_CODECS_MPEG_H +#endif // IMAGE_CODECS_MPEG_H #endif // USE_MPEG2 diff --git a/video/codecs/msrle.cpp b/image/codecs/msrle.cpp index f0c0e8cf65..951de83c31 100644 --- a/video/codecs/msrle.cpp +++ b/image/codecs/msrle.cpp @@ -22,11 +22,11 @@ // Based off ffmpeg's msrledec.c -#include "video/codecs/msrle.h" +#include "image/codecs/msrle.h" #include "common/stream.h" #include "common/textconsole.h" -namespace Video { +namespace Image { MSRLEDecoder::MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) { _surface = new Graphics::Surface(); @@ -129,4 +129,4 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) { warning("MS RLE Codec: No end-of-picture code"); } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/msrle.h b/image/codecs/msrle.h index edbd263756..10e3531c07 100644 --- a/video/codecs/msrle.h +++ b/image/codecs/msrle.h @@ -20,12 +20,12 @@ * */ -#ifndef VIDEO_CODECS_MSRLE_H -#define VIDEO_CODECS_MSRLE_H +#ifndef IMAGE_CODECS_MSRLE_H +#define IMAGE_CODECS_MSRLE_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { /** * Microsoft Run-Length Encoding decoder. @@ -49,6 +49,6 @@ private: void decode8(Common::SeekableReadStream *stream); }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/msvideo1.cpp b/image/codecs/msvideo1.cpp index fd381756e7..e94afedb2d 100644 --- a/video/codecs/msvideo1.cpp +++ b/image/codecs/msvideo1.cpp @@ -22,11 +22,11 @@ // Based off ffmpeg's msvideo.cpp -#include "video/codecs/msvideo1.h" +#include "image/codecs/msvideo1.h" #include "common/stream.h" #include "common/textconsole.h" -namespace Video { +namespace Image { #define CHECK_STREAM_PTR(n) \ if ((stream->pos() + n) > stream->size() ) { \ @@ -136,4 +136,4 @@ const Graphics::Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream return _surface; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/msvideo1.h b/image/codecs/msvideo1.h index 4e406e70cb..517936d35b 100644 --- a/video/codecs/msvideo1.h +++ b/image/codecs/msvideo1.h @@ -20,12 +20,12 @@ * */ -#ifndef VIDEO_CODECS_MSVIDEO1_H -#define VIDEO_CODECS_MSVIDEO1_H +#ifndef IMAGE_CODECS_MSVIDEO1_H +#define IMAGE_CODECS_MSVIDEO1_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { /** * Microsoft Video 1 decoder. @@ -50,6 +50,6 @@ private: //void decode16(Common::SeekableReadStream *stream); }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/qtrle.cpp b/image/codecs/qtrle.cpp index 91c6b97386..a609e9bba9 100644 --- a/video/codecs/qtrle.cpp +++ b/image/codecs/qtrle.cpp @@ -23,7 +23,7 @@ // QuickTime RLE Decoder // Based off ffmpeg's QuickTime RLE decoder (written by Mike Melanson) -#include "video/codecs/qtrle.h" +#include "image/codecs/qtrle.h" #include "common/debug.h" #include "common/scummsys.h" @@ -33,7 +33,7 @@ #include "graphics/colormasks.h" #include "graphics/surface.h" -namespace Video { +namespace Image { QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() { _bitsPerPixel = bitsPerPixel; @@ -428,4 +428,4 @@ Graphics::PixelFormat QTRLEDecoder::getPixelFormat() const { return Graphics::PixelFormat(); } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/qtrle.h b/image/codecs/qtrle.h index 5354346957..c16daa0349 100644 --- a/video/codecs/qtrle.h +++ b/image/codecs/qtrle.h @@ -20,13 +20,13 @@ * */ -#ifndef VIDEO_CODECS_QTRLE_H -#define VIDEO_CODECS_QTRLE_H +#ifndef IMAGE_CODECS_QTRLE_H +#define IMAGE_CODECS_QTRLE_H #include "graphics/pixelformat.h" -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { /** * QuickTime Run-Length Encoding decoder. @@ -55,6 +55,6 @@ private: void decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange); }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/rpza.cpp b/image/codecs/rpza.cpp index 298dcfc2cd..ecd930f785 100644 --- a/video/codecs/rpza.cpp +++ b/image/codecs/rpza.cpp @@ -22,14 +22,14 @@ // Based off ffmpeg's RPZA decoder -#include "video/codecs/rpza.h" +#include "image/codecs/rpza.h" #include "common/debug.h" #include "common/system.h" #include "common/stream.h" #include "common/textconsole.h" -namespace Video { +namespace Image { RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() { // We need to increase the surface size to a multiple of 4 @@ -198,4 +198,4 @@ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *st return _surface; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/rpza.h b/image/codecs/rpza.h index 630b5875df..f87ee1113a 100644 --- a/video/codecs/rpza.h +++ b/image/codecs/rpza.h @@ -20,13 +20,13 @@ * */ -#ifndef VIDEO_CODECS_RPZA_H -#define VIDEO_CODECS_RPZA_H +#ifndef IMAGE_CODECS_RPZA_H +#define IMAGE_CODECS_RPZA_H #include "graphics/pixelformat.h" -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { /** * Apple RPZA decoder. @@ -46,6 +46,6 @@ private: Graphics::Surface *_surface; }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/smc.cpp b/image/codecs/smc.cpp index d751bbcde4..434a1058b7 100644 --- a/video/codecs/smc.cpp +++ b/image/codecs/smc.cpp @@ -22,11 +22,11 @@ // Based off ffmpeg's SMC decoder -#include "video/codecs/smc.h" +#include "image/codecs/smc.h" #include "common/stream.h" #include "common/textconsole.h" -namespace Video { +namespace Image { #define GET_BLOCK_COUNT() \ (opcode & 0x10) ? (1 + stream->readByte()) : 1 + (opcode & 0x0F); @@ -386,4 +386,4 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str return _surface; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/smc.h b/image/codecs/smc.h index 2532a85856..2de1f69ce4 100644 --- a/video/codecs/smc.h +++ b/image/codecs/smc.h @@ -20,12 +20,12 @@ * */ -#ifndef VIDEO_CODECS_SMC_H -#define VIDEO_CODECS_SMC_H +#ifndef IMAGE_CODECS_SMC_H +#define IMAGE_CODECS_SMC_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { enum { CPAIR = 2, @@ -57,6 +57,6 @@ private: byte _colorOctets[COLORS_PER_TABLE * COCTET]; }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/svq1.cpp b/image/codecs/svq1.cpp index 562e5369e3..550445bc64 100644 --- a/video/codecs/svq1.cpp +++ b/image/codecs/svq1.cpp @@ -23,9 +23,9 @@ // Sorenson Video 1 Codec // Based off FFmpeg's SVQ1 decoder (written by Arpi and Nick Kurshev) -#include "video/codecs/svq1.h" -#include "video/codecs/svq1_cb.h" -#include "video/codecs/svq1_vlc.h" +#include "image/codecs/svq1.h" +#include "image/codecs/svq1_cb.h" +#include "image/codecs/svq1_vlc.h" #include "common/stream.h" #include "common/bitstream.h" @@ -37,7 +37,7 @@ #include "graphics/yuv_to_rgb.h" -namespace Video { +namespace Image { #define SVQ1_BLOCK_SKIP 0 #define SVQ1_BLOCK_INTER 1 @@ -794,4 +794,4 @@ bool SVQ1Decoder::svq1DecodeDeltaBlock(Common::BitStream *ss, byte *current, byt return resultValid; } -} // End of namespace Video +} // End of namespace Image diff --git a/video/codecs/svq1.h b/image/codecs/svq1.h index 22fa382a71..56310a1a38 100644 --- a/video/codecs/svq1.h +++ b/image/codecs/svq1.h @@ -20,10 +20,10 @@ * */ -#ifndef VIDEO_CODECS_SVQ1_H -#define VIDEO_CODECS_SVQ1_H +#ifndef IMAGE_CODECS_SVQ1_H +#define IMAGE_CODECS_SVQ1_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" namespace Common { class BitStream; @@ -31,7 +31,7 @@ class Huffman; struct Point; } -namespace Video { +namespace Image { /** * Sorenson Vector Quantizer 1 decoder. @@ -83,6 +83,6 @@ private: void putPixels16XY2C(byte *block, const byte *pixels, int lineSize, int h); }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/svq1_cb.h b/image/codecs/svq1_cb.h index da92ae4c98..27408a7472 100644 --- a/video/codecs/svq1_cb.h +++ b/image/codecs/svq1_cb.h @@ -23,12 +23,12 @@ // These tables are modified from their FFmpeg counterparts so that // they work on both little and big endian systems. -#ifndef VIDEO_CODECS_SVQ1_CB_H -#define VIDEO_CODECS_SVQ1_CB_H +#ifndef IMAGE_CODECS_SVQ1_CB_H +#define IMAGE_CODECS_SVQ1_CB_H #include "common/scummsys.h" -namespace Video { +namespace Image { static const int8 s_svq1InterCodebook4x2[768] = { 7, 2, -6, -7, 7, 3, -3, -4, -7, -2, 7, 8, -8, -4, 3, 4, @@ -1506,6 +1506,6 @@ static const int8 *const s_svq1IntraCodebooks[6] = { 0, 0 }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/svq1_vlc.h b/image/codecs/svq1_vlc.h index 01c33fc04f..19cfb3418c 100644 --- a/video/codecs/svq1_vlc.h +++ b/image/codecs/svq1_vlc.h @@ -23,12 +23,12 @@ // These tables are modified versions of the FFmpeg ones so that they // will work with our BitStream class directly. -#ifndef VIDEO_CODECS_SVQ1_VLC_H -#define VIDEO_CODECS_SVQ1_VLC_H +#ifndef IMAGE_CODECS_SVQ1_VLC_H +#define IMAGE_CODECS_SVQ1_VLC_H #include "common/scummsys.h" -namespace Video { +namespace Image { static const byte s_svq1BlockTypeLengths[4] = { 1, 2, 3, 3 @@ -336,6 +336,6 @@ static const uint32 s_svq1MotionComponentCodes[33] = { 2, 3, 2 }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/truemotion1.cpp b/image/codecs/truemotion1.cpp index f4cda83afe..3b8ad85606 100644 --- a/video/codecs/truemotion1.cpp +++ b/image/codecs/truemotion1.cpp @@ -23,16 +23,16 @@ // Based on the TrueMotion 1 decoder by Alex Beregszaszi & Mike Melanson in FFmpeg #include "common/scummsys.h" -#include "video/codecs/truemotion1.h" +#include "image/codecs/truemotion1.h" -#ifdef VIDEO_CODECS_TRUEMOTION1_H +#ifdef IMAGE_CODECS_TRUEMOTION1_H -#include "video/codecs/truemotion1data.h" +#include "image/codecs/truemotion1data.h" #include "common/stream.h" #include "common/textconsole.h" #include "common/util.h" -namespace Video { +namespace Image { enum { FLAG_SPRITE = (1 << 5), @@ -417,6 +417,6 @@ const Graphics::Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStr return _surface; } -} // End of namespace Video +} // End of namespace Image #endif diff --git a/video/codecs/truemotion1.h b/image/codecs/truemotion1.h index c5ee18006c..e836ddb0e4 100644 --- a/video/codecs/truemotion1.h +++ b/image/codecs/truemotion1.h @@ -25,12 +25,12 @@ // Only compile if SCI32 is enabled, ZVISION is enabled, or if we're building dynamic modules #if defined(ENABLE_SCI32) || defined(ENABLE_ZVISION) || defined(DYNAMIC_MODULES) -#ifndef VIDEO_CODECS_TRUEMOTION1_H -#define VIDEO_CODECS_TRUEMOTION1_H +#ifndef IMAGE_CODECS_TRUEMOTION1_H +#define IMAGE_CODECS_TRUEMOTION1_H -#include "video/codecs/codec.h" +#include "image/codecs/codec.h" -namespace Video { +namespace Image { /** * Duck TrueMotion 1 decoder. @@ -103,7 +103,7 @@ private: void genVectorTable16(const byte *selVectorTable); }; -} // End of namespace Video +} // End of namespace Image -#endif // VIDEO_CODECS_TRUEMOTION1_H +#endif // IMAGE_CODECS_TRUEMOTION1_H #endif // SCI32/Plugins guard diff --git a/video/codecs/truemotion1data.h b/image/codecs/truemotion1data.h index d988a624d3..c73047211e 100644 --- a/video/codecs/truemotion1data.h +++ b/image/codecs/truemotion1data.h @@ -23,12 +23,12 @@ // Based on the TrueMotion 1 decoder by Alex Beregszaszi & Mike Melanson in FFmpeg // These tables were originally part of VpVision from On2 -#ifndef VIDEO_CODECS_TRUEMOTION1DATA_H -#define VIDEO_CODECS_TRUEMOTION1DATA_H +#ifndef IMAGE_CODECS_TRUEMOTION1DATA_H +#define IMAGE_CODECS_TRUEMOTION1DATA_H #include "common/scummsys.h" -namespace Video { +namespace Image { // Y delta tables, skinny and fat static const int16 ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 }; @@ -824,6 +824,6 @@ static const byte pc_tbl4[] = { static const byte * const tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 }; -} // End of namespace Video +} // End of namespace Image #endif diff --git a/image/module.mk b/image/module.mk index 22febe1460..28d750358d 100644 --- a/image/module.mk +++ b/image/module.mk @@ -7,7 +7,24 @@ MODULE_OBJS := \ pcx.o \ pict.o \ png.o \ - tga.o + tga.o \ + codecs/cdtoons.o \ + codecs/cinepak.o \ + codecs/indeo3.o \ + codecs/jpeg.o \ + codecs/mjpeg.o \ + codecs/msrle.o \ + codecs/msvideo1.o \ + codecs/qtrle.o \ + codecs/rpza.o \ + codecs/smc.o \ + codecs/svq1.o \ + codecs/truemotion1.o + +ifdef USE_MPEG2 +MODULE_OBJS += \ + codecs/mpeg.o +endif # Include common rules include $(srcdir)/rules.mk diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index c6463269d3..5e404ecaac 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -34,13 +34,13 @@ #include "audio/decoders/raw.h" // Video Codecs -#include "video/codecs/cinepak.h" -#include "video/codecs/indeo3.h" -#include "video/codecs/mjpeg.h" -#include "video/codecs/mpeg.h" -#include "video/codecs/msvideo1.h" -#include "video/codecs/msrle.h" -#include "video/codecs/truemotion1.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/truemotion1.h" namespace Video { @@ -769,29 +769,29 @@ bool AVIDecoder::AVIVideoTrack::rewind() { return true; } -Codec *AVIDecoder::AVIVideoTrack::createCodec() { +Image::Codec *AVIDecoder::AVIVideoTrack::createCodec() { switch (_vidsHeader.streamHandler) { case ID_CRAM: case ID_MSVC: case ID_WHAM: - return new MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); + return new Image::MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); case ID_RLE: - return new MSRLEDecoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); + return new Image::MSRLEDecoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); case ID_CVID: - return new CinepakDecoder(_bmInfo.bitCount); + return new Image::CinepakDecoder(_bmInfo.bitCount); case ID_IV32: - return new Indeo3Decoder(_bmInfo.width, _bmInfo.height); + return new Image::Indeo3Decoder(_bmInfo.width, _bmInfo.height); #ifdef VIDEO_CODECS_TRUEMOTION1_H case ID_DUCK: case ID_DUCK2: - return new TrueMotion1Decoder(_bmInfo.width, _bmInfo.height); + return new Image::TrueMotion1Decoder(_bmInfo.width, _bmInfo.height); #endif #ifdef USE_MPEG2 case ID_MPG2: - return new MPEGDecoder(); + return new Image::MPEGDecoder(); #endif case ID_MJPG: - return new MJPEGDecoder(); + return new Image::MJPEGDecoder(); default: warning("Unknown/Unhandled compression format \'%s\'", tag2str(_vidsHeader.streamHandler)); } diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 2efe0e19c2..2f7b267d36 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -43,9 +43,11 @@ namespace Graphics { struct PixelFormat; } -namespace Video { - +namespace Image { class Codec; +} + +namespace Video { /** * Decoder for AVI videos. @@ -197,9 +199,9 @@ protected: mutable bool _dirtyPalette; int _frameCount, _curFrame; - Codec *_videoCodec; + Image::Codec *_videoCodec; const Graphics::Surface *_lastFrame; - Codec *createCodec(); + Image::Codec *createCodec(); }; class AVIAudioTrack : public AudioTrack { diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index aeb2b75cb5..e01c5f3827 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -31,8 +31,7 @@ #include "video/coktel_decoder.h" -#include "video/codecs/codec.h" -#include "video/codecs/indeo3.h" +#include "image/codecs/indeo3.h" #ifdef VIDEO_COKTELDECODER_H @@ -1692,7 +1691,7 @@ bool VMDDecoder::openExternalCodec() { if (_videoCodec == kVideoCodecIndeo3) { _isPaletted = false; - _codec = new Indeo3Decoder(_width, _height); + _codec = new Image::Indeo3Decoder(_width, _height); } else { warning("VMDDecoder::openExternalCodec(): Unknown video codec FourCC \"%s\"", diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index e99c8a25b8..a72f76eb9d 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -53,9 +53,11 @@ namespace Graphics { struct PixelFormat; } -namespace Video { - +namespace Image { class Codec; +} + +namespace Video { /** * Decoder for Coktel videos. @@ -516,7 +518,7 @@ private: Graphics::Surface _8bppSurface[3]; ///< Fake 8bpp surfaces over the video buffers. bool _externalCodec; - Codec *_codec; + Image::Codec *_codec; int32 _subtitle; diff --git a/video/module.mk b/video/module.mk index d836371182..5754350e42 100644 --- a/video/module.mk +++ b/video/module.mk @@ -8,19 +8,7 @@ MODULE_OBJS := \ psx_decoder.o \ qt_decoder.o \ smk_decoder.o \ - video_decoder.o \ - codecs/cdtoons.o \ - codecs/cinepak.o \ - codecs/indeo3.o \ - codecs/jpeg.o \ - codecs/mjpeg.o \ - codecs/msrle.o \ - codecs/msvideo1.o \ - codecs/qtrle.o \ - codecs/rpza.o \ - codecs/smc.o \ - codecs/svq1.o \ - codecs/truemotion1.o + video_decoder.o ifdef USE_BINK MODULE_OBJS += \ @@ -32,10 +20,5 @@ MODULE_OBJS += \ theora_decoder.o endif -ifdef USE_MPEG2 -MODULE_OBJS += \ - codecs/mpeg.o -endif - # Include common rules include $(srcdir)/rules.mk diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 20c9b29452..25ac05c2b6 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -39,13 +39,13 @@ #include "common/util.h" // Video codecs -#include "video/codecs/cinepak.h" -#include "video/codecs/jpeg.h" -#include "video/codecs/qtrle.h" -#include "video/codecs/rpza.h" -#include "video/codecs/smc.h" -#include "video/codecs/cdtoons.h" -#include "video/codecs/svq1.h" +#include "image/codecs/cinepak.h" +#include "image/codecs/jpeg.h" +#include "image/codecs/qtrle.h" +#include "image/codecs/rpza.h" +#include "image/codecs/smc.h" +#include "image/codecs/cdtoons.h" +#include "image/codecs/svq1.h" namespace Video { @@ -273,23 +273,23 @@ void QuickTimeDecoder::VideoSampleDesc::initCodec() { switch (_codecTag) { 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. - _videoCodec = new CinepakDecoder(_bitsPerSample & 0x1f); + _videoCodec = new Image::CinepakDecoder(_bitsPerSample & 0x1f); break; case MKTAG('r','p','z','a'): // Apple Video ("Road Pizza"): Used by some Myst videos. - _videoCodec = new RPZADecoder(_parentTrack->width, _parentTrack->height); + _videoCodec = new Image::RPZADecoder(_parentTrack->width, _parentTrack->height); break; case MKTAG('r','l','e',' '): // QuickTime RLE: Used by some Myst ME videos. - _videoCodec = new QTRLEDecoder(_parentTrack->width, _parentTrack->height, _bitsPerSample & 0x1f); + _videoCodec = new Image::QTRLEDecoder(_parentTrack->width, _parentTrack->height, _bitsPerSample & 0x1f); break; case MKTAG('s','m','c',' '): // Apple SMC: Used by some Myst videos. - _videoCodec = new SMCDecoder(_parentTrack->width, _parentTrack->height); + _videoCodec = new Image::SMCDecoder(_parentTrack->width, _parentTrack->height); break; case MKTAG('S','V','Q','1'): // Sorenson Video 1: Used by some Myst ME videos. - _videoCodec = new SVQ1Decoder(_parentTrack->width, _parentTrack->height); + _videoCodec = new Image::SVQ1Decoder(_parentTrack->width, _parentTrack->height); break; case MKTAG('S','V','Q','3'): // Sorenson Video 3: Used by some Myst ME videos. @@ -297,11 +297,11 @@ void QuickTimeDecoder::VideoSampleDesc::initCodec() { break; case MKTAG('j','p','e','g'): // JPEG: Used by some Myst ME 10th Anniversary videos. - _videoCodec = new JPEGDecoder(); + _videoCodec = new Image::JPEGCodec(); break; case MKTAG('Q','k','B','k'): // CDToons: Used by most of the Broderbund games. - _videoCodec = new CDToonsDecoder(_parentTrack->width, _parentTrack->height); + _videoCodec = new Image::CDToonsDecoder(_parentTrack->width, _parentTrack->height); break; default: warning("Unsupported codec \'%s\'", tag2str(_codecTag)); diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 53b7c523c1..7e87d21ae7 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -44,9 +44,11 @@ namespace Graphics { struct PixelFormat; } -namespace Video { - +namespace Image { class Codec; +} + +namespace Video { /** * Decoder for QuickTime videos. @@ -95,7 +97,7 @@ private: char _codecName[32]; uint16 _colorTableId; byte *_palette; - Codec *_videoCodec; + Image::Codec *_videoCodec; }; // The AudioTrackHandler is currently just a wrapper around some |