aboutsummaryrefslogtreecommitdiff
path: root/video/codecs
diff options
context:
space:
mode:
authorEugene Sandulenko2011-01-23 19:08:09 +0000
committerEugene Sandulenko2011-01-23 19:08:09 +0000
commitcaa6684752a310e916b179125a4125a8b3be36f0 (patch)
treedc364d58619b297194bc5d0673b694c34fb51b6c /video/codecs
parent3d15871ee2d6a9c0ce4819a6ab5925638bafa8b9 (diff)
downloadscummvm-rg350-caa6684752a310e916b179125a4125a8b3be36f0.tar.gz
scummvm-rg350-caa6684752a310e916b179125a4125a8b3be36f0.tar.bz2
scummvm-rg350-caa6684752a310e916b179125a4125a8b3be36f0.zip
VIDEO: Move video classes to Video:: namespace
svn-id: r55479
Diffstat (limited to 'video/codecs')
-rw-r--r--video/codecs/cdtoons.cpp4
-rw-r--r--video/codecs/cdtoons.h10
-rw-r--r--video/codecs/cinepak.cpp10
-rw-r--r--video/codecs/cinepak.h12
-rw-r--r--video/codecs/codec.h10
-rw-r--r--video/codecs/indeo3.cpp12
-rw-r--r--video/codecs/indeo3.h12
-rw-r--r--video/codecs/mjpeg.cpp10
-rw-r--r--video/codecs/mjpeg.h14
-rw-r--r--video/codecs/msrle.cpp12
-rw-r--r--video/codecs/msrle.h10
-rw-r--r--video/codecs/msvideo1.cpp6
-rw-r--r--video/codecs/msvideo1.h10
-rw-r--r--video/codecs/qdm2.cpp4
-rw-r--r--video/codecs/qdm2.h4
-rw-r--r--video/codecs/qdm2data.h4
-rw-r--r--video/codecs/qtrle.cpp12
-rw-r--r--video/codecs/qtrle.h12
-rw-r--r--video/codecs/rpza.cpp10
-rw-r--r--video/codecs/rpza.h12
-rw-r--r--video/codecs/smc.cpp4
-rw-r--r--video/codecs/smc.h10
-rw-r--r--video/codecs/truemotion1.cpp8
-rw-r--r--video/codecs/truemotion1.h10
-rw-r--r--video/codecs/truemotion1data.h4
25 files changed, 113 insertions, 113 deletions
diff --git a/video/codecs/cdtoons.cpp b/video/codecs/cdtoons.cpp
index cd43f744e6..eaa8f53602 100644
--- a/video/codecs/cdtoons.cpp
+++ b/video/codecs/cdtoons.cpp
@@ -28,7 +28,7 @@
#include "common/system.h"
-namespace Graphics {
+namespace Video {
struct CDToonsAction {
uint16 blockId;
@@ -447,4 +447,4 @@ void CDToonsDecoder::setPalette(byte *data) {
_palette[0] = _palette[1] = _palette[2] = 0;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/cdtoons.h b/video/codecs/cdtoons.h
index bb6fefa5de..dafe5e56ef 100644
--- a/video/codecs/cdtoons.h
+++ b/video/codecs/cdtoons.h
@@ -30,7 +30,7 @@
#include "common/hashmap.h"
-namespace Graphics {
+namespace Video {
struct CDToonsBlock {
uint16 flags;
@@ -46,14 +46,14 @@ public:
CDToonsDecoder(uint16 width, uint16 height);
~CDToonsDecoder();
- Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
bool containsPalette() const { return true; }
const byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
byte _palette[256 * 3];
bool _dirtyPalette;
uint16 _currentPaletteId;
@@ -65,6 +65,6 @@ private:
void setPalette(byte *data);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/cinepak.cpp b/video/codecs/cinepak.cpp
index 27be2d05ff..2f5cb73561 100644
--- a/video/codecs/cinepak.cpp
+++ b/video/codecs/cinepak.cpp
@@ -29,7 +29,7 @@
// Code here partially based off of ffmpeg ;)
-namespace Graphics {
+namespace Video {
// Convert a color from YUV to RGB colorspace, Cinepak style.
inline static void CPYUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) {
@@ -54,7 +54,7 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() {
_y = 0;
if (bitsPerPixel == 8)
- _pixelFormat = PixelFormat::createFormatCLUT8();
+ _pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
else
_pixelFormat = g_system->getScreenFormat();
}
@@ -68,7 +68,7 @@ CinepakDecoder::~CinepakDecoder() {
delete[] _curFrame.strips;
}
-const Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
_curFrame.flags = stream->readByte();
_curFrame.length = (stream->readByte() << 16) + stream->readUint16BE();
_curFrame.width = stream->readUint16BE();
@@ -88,7 +88,7 @@ const Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
}
if (!_curFrame.surface) {
- _curFrame.surface = new Surface();
+ _curFrame.surface = new Graphics::Surface();
_curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat.bytesPerPixel);
}
@@ -289,4 +289,4 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st
}
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/cinepak.h b/video/codecs/cinepak.h
index c200c75e8c..8b4c0216a3 100644
--- a/video/codecs/cinepak.h
+++ b/video/codecs/cinepak.h
@@ -34,7 +34,7 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
struct CinepakCodebook {
byte y[4];
@@ -56,7 +56,7 @@ struct CinepakFrame {
uint16 stripCount;
CinepakStrip *strips;
- Surface *surface;
+ Graphics::Surface *surface;
};
class CinepakDecoder : public Codec {
@@ -64,18 +64,18 @@ public:
CinepakDecoder(int bitsPerPixel = 24);
~CinepakDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
CinepakFrame _curFrame;
int32 _y;
- PixelFormat _pixelFormat;
+ Graphics::PixelFormat _pixelFormat;
void loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);
void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/codec.h b/video/codecs/codec.h
index 380f087d40..4a33d83138 100644
--- a/video/codecs/codec.h
+++ b/video/codecs/codec.h
@@ -29,25 +29,25 @@
#include "graphics/surface.h"
#include "graphics/pixelformat.h"
-namespace Common{
+namespace Common {
class SeekableReadStream;
}
-namespace Graphics {
+namespace Video {
class Codec {
public:
Codec() {}
virtual ~Codec() {}
- virtual const Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
- virtual PixelFormat getPixelFormat() const = 0;
+ virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
+ virtual Graphics::PixelFormat getPixelFormat() const = 0;
virtual bool containsPalette() const { return false; }
virtual const byte *getPalette() { return 0; }
virtual bool hasDirtyPalette() const { return false; }
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/indeo3.cpp b/video/codecs/indeo3.cpp
index 8fa4a2d530..cc87d26e2b 100644
--- a/video/codecs/indeo3.cpp
+++ b/video/codecs/indeo3.cpp
@@ -42,7 +42,7 @@
#include "video/codecs/indeo3.h"
-namespace Graphics {
+namespace Video {
Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _corrector_type(0) {
_iv_frame[0].the_buf = 0;
@@ -50,7 +50,7 @@ Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _correc
_pixelFormat = g_system->getScreenFormat();
- _surface = new Surface;
+ _surface = new Graphics::Surface;
_surface->create(width, height, _pixelFormat.bytesPerPixel);
buildModPred();
@@ -66,7 +66,7 @@ Indeo3Decoder::~Indeo3Decoder() {
delete[] _corrector_type;
}
-PixelFormat Indeo3Decoder::getPixelFormat() const {
+Graphics::PixelFormat Indeo3Decoder::getPixelFormat() const {
return _pixelFormat;
}
@@ -169,7 +169,7 @@ void Indeo3Decoder::allocFrames() {
}
}
-const Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {
// Not Indeo 3? Fail
if (!isIndeo3(*stream))
return 0;
@@ -318,7 +318,7 @@ const Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *stream) {
}
byte r = 0, g = 0, b = 0;
- YUV2RGB(cY, cU, cV, r, g, b);
+ Graphics::YUV2RGB(cY, cU, cV, r, g, b);
const uint32 color = _pixelFormat.RGBToColor(r, g, b);
@@ -3490,6 +3490,6 @@ const uint32 Indeo3Decoder::correctionhighorder[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // USE_INDEO3
diff --git a/video/codecs/indeo3.h b/video/codecs/indeo3.h
index 1e5d45f742..a9ae480f17 100644
--- a/video/codecs/indeo3.h
+++ b/video/codecs/indeo3.h
@@ -39,22 +39,22 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class Indeo3Decoder : public Codec {
public:
Indeo3Decoder(uint16 width, uint16 height);
~Indeo3Decoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const;
static bool isIndeo3(Common::SeekableReadStream &stream);
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
- PixelFormat _pixelFormat;
+ Graphics::PixelFormat _pixelFormat;
static const int _corrector_type_0[24];
static const int _corrector_type_2[8];
@@ -87,7 +87,7 @@ private:
const byte *buf2, int min_width_160);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_CODECS_INDEO3_H
diff --git a/video/codecs/mjpeg.cpp b/video/codecs/mjpeg.cpp
index 5f41699e10..d6ec391a84 100644
--- a/video/codecs/mjpeg.cpp
+++ b/video/codecs/mjpeg.cpp
@@ -28,10 +28,10 @@
#include "video/codecs/mjpeg.h"
-namespace Graphics {
+namespace Video {
JPEGDecoder::JPEGDecoder() : Codec() {
- _jpeg = new JPEG();
+ _jpeg = new Graphics::JPEG();
_pixelFormat = g_system->getScreenFormat();
_surface = NULL;
}
@@ -45,14 +45,14 @@ JPEGDecoder::~JPEGDecoder() {
}
}
-const Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* stream) {
+const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* stream) {
if (!_jpeg->read(stream)) {
warning("Failed to decode JPEG frame");
return 0;
}
if (!_surface) {
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_surface->create(_jpeg->getWidth(), _jpeg->getHeight(), _pixelFormat.bytesPerPixel);
}
@@ -67,4 +67,4 @@ const Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* stream) {
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/mjpeg.h b/video/codecs/mjpeg.h
index da3719ea84..c9f931f091 100644
--- a/video/codecs/mjpeg.h
+++ b/video/codecs/mjpeg.h
@@ -32,7 +32,7 @@
#include "graphics/jpeg.h"
#include "graphics/pixelformat.h"
-namespace Graphics {
+namespace Video {
// Motion JPEG Decoder
// Basically a wrapper around JPEG which converts to RGB and also functions
@@ -43,15 +43,15 @@ public:
JPEGDecoder();
~JPEGDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
- PixelFormat _pixelFormat;
- JPEG *_jpeg;
- Surface *_surface;
+ Graphics::PixelFormat _pixelFormat;
+ Graphics::JPEG *_jpeg;
+ Graphics::Surface *_surface;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/msrle.cpp b/video/codecs/msrle.cpp
index 556f0ee670..46158c49d7 100644
--- a/video/codecs/msrle.cpp
+++ b/video/codecs/msrle.cpp
@@ -28,7 +28,7 @@
#include "video/codecs/msrle.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
MSRLEDecoder::MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) {
_surface = new Graphics::Surface();
@@ -41,7 +41,7 @@ MSRLEDecoder::~MSRLEDecoder() {
delete _surface;
}
-const Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *MSRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
if (_bitsPerPixel == 8) {
decode8(stream);
} else
@@ -75,7 +75,7 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {
output = data + (y * width);
if (y < 0) {
- warning("Next line is beyond picture bounds");
+ warning("MS RLE Codec: Next line is beyond picture bounds");
return;
}
@@ -93,7 +93,7 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {
x += count;
if (y < 0) {
- warning("Skip beyond picture bounds");
+ warning("MS RLE Codec: Skip beyond picture bounds");
return;
}
@@ -128,7 +128,7 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream *stream) {
}
- warning("No end-of-picture code");
+ warning("MS RLE Codec: No end-of-picture code");
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/msrle.h b/video/codecs/msrle.h
index e710c25ae8..130bb8c4ef 100644
--- a/video/codecs/msrle.h
+++ b/video/codecs/msrle.h
@@ -28,24 +28,24 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class MSRLEDecoder : public Codec {
public:
MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
~MSRLEDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
byte _bitsPerPixel;
- Surface *_surface;
+ Graphics::Surface *_surface;
void decode8(Common::SeekableReadStream *stream);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/msvideo1.cpp b/video/codecs/msvideo1.cpp
index 94537e1f9f..2075d7f013 100644
--- a/video/codecs/msvideo1.cpp
+++ b/video/codecs/msvideo1.cpp
@@ -28,7 +28,7 @@
#include "video/codecs/msvideo1.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
#define CHECK_STREAM_PTR(n) \
if ((stream->pos() + n) > stream->size() ) { \
@@ -126,7 +126,7 @@ void MSVideo1Decoder::decode8(Common::SeekableReadStream *stream) {
}
}
-const Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream) {
if (_bitsPerPixel == 8)
decode8(stream);
else {
@@ -137,4 +137,4 @@ const Surface *MSVideo1Decoder::decodeImage(Common::SeekableReadStream *stream)
return _surface;
}
-} // End of namespace JMP
+} // End of namespace Video
diff --git a/video/codecs/msvideo1.h b/video/codecs/msvideo1.h
index 8dadf311fe..c476538a8e 100644
--- a/video/codecs/msvideo1.h
+++ b/video/codecs/msvideo1.h
@@ -28,25 +28,25 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class MSVideo1Decoder : public Codec {
public:
MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);
~MSVideo1Decoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
byte _bitsPerPixel;
- Surface *_surface;
+ Graphics::Surface *_surface;
void decode8(Common::SeekableReadStream *stream);
//void decode16(Common::SeekableReadStream *stream);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/qdm2.cpp b/video/codecs/qdm2.cpp
index 6721788d8c..eac1954435 100644
--- a/video/codecs/qdm2.cpp
+++ b/video/codecs/qdm2.cpp
@@ -37,7 +37,7 @@
#include "common/stream.h"
#include "common/system.h"
-namespace Graphics {
+namespace Video {
enum {
SOFTCLIP_THRESHOLD = 27600,
@@ -3282,6 +3282,6 @@ Audio::AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::S
return new QDM2Stream(stream, extraData);
}
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/qdm2.h b/video/codecs/qdm2.h
index 98e0fa54b6..a6acf3a83e 100644
--- a/video/codecs/qdm2.h
+++ b/video/codecs/qdm2.h
@@ -37,7 +37,7 @@ namespace Audio {
class AudioStream;
}
-namespace Graphics {
+namespace Video {
/**
* Create a new AudioStream from the QDM2 data in the given stream.
@@ -48,7 +48,7 @@ namespace Graphics {
*/
Audio::AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData);
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_CODECS_QDM2_H
#endif // Mohawk/Plugins guard
diff --git a/video/codecs/qdm2data.h b/video/codecs/qdm2data.h
index 17d3948eb1..e1a690bd2b 100644
--- a/video/codecs/qdm2data.h
+++ b/video/codecs/qdm2data.h
@@ -28,7 +28,7 @@
#include "common/scummsys.h"
-namespace Graphics {
+namespace Video {
/// VLC TABLES
@@ -526,6 +526,6 @@ static const float type34_delta[10] = { // FIXME: covers 8 entries..
0.138071194291115f,0.333333343267441f,0.60947573184967f,1.0f,0.0f,
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/qtrle.cpp b/video/codecs/qtrle.cpp
index 1dcc94e417..26b2f02ce1 100644
--- a/video/codecs/qtrle.cpp
+++ b/video/codecs/qtrle.cpp
@@ -34,7 +34,7 @@
#include "graphics/colormasks.h"
#include "graphics/surface.h"
-namespace Graphics {
+namespace Video {
QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {
_bitsPerPixel = bitsPerPixel;
@@ -47,7 +47,7 @@ QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Cod
debug(2, "QTRLE corrected width: %d", width);
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_surface->create(width, height, _bitsPerPixel <= 8 ? 1 : _pixelFormat.bytesPerPixel);
}
@@ -239,7 +239,7 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u
while (rleCode--) {
// Convert from RGB555 to the format specified by the Overlay
byte r = 0, g = 0, b = 0;
- colorToRGB<ColorMasks<555> >(rgb16, r, g, b);
+ Graphics::colorToRGB<Graphics::ColorMasks<555> >(rgb16, r, g, b);
rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b);
}
} else {
@@ -252,7 +252,7 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u
// Convert from RGB555 to the format specified by the Overlay
byte r = 0, g = 0, b = 0;
- colorToRGB<ColorMasks<555> >(rgb16, r, g, b);
+ Graphics::colorToRGB<Graphics::ColorMasks<555> >(rgb16, r, g, b);
rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b);
}
}
@@ -354,7 +354,7 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u
}
}
-const Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) {
uint16 start_line = 0;
uint16 height = _surface->h;
@@ -418,4 +418,4 @@ QTRLEDecoder::~QTRLEDecoder() {
delete _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/qtrle.h b/video/codecs/qtrle.h
index d40404ecb7..20fe2c3242 100644
--- a/video/codecs/qtrle.h
+++ b/video/codecs/qtrle.h
@@ -29,21 +29,21 @@
#include "graphics/pixelformat.h"
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class QTRLEDecoder : public Codec {
public:
QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
~QTRLEDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
byte _bitsPerPixel;
- Surface *_surface;
- PixelFormat _pixelFormat;
+ Graphics::Surface *_surface;
+ Graphics::PixelFormat _pixelFormat;
void decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);
void decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp);
@@ -53,6 +53,6 @@ private:
void decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/rpza.cpp b/video/codecs/rpza.cpp
index 95cffb4015..cc9739b673 100644
--- a/video/codecs/rpza.cpp
+++ b/video/codecs/rpza.cpp
@@ -31,7 +31,7 @@
#include "common/stream.h"
#include "graphics/colormasks.h"
-namespace Graphics {
+namespace Video {
RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() {
_pixelFormat = g_system->getScreenFormat();
@@ -43,7 +43,7 @@ RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() {
debug(2, "RPZA corrected width: %d", width);
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_surface->create(width, height, _pixelFormat.bytesPerPixel);
}
@@ -66,7 +66,7 @@ RPZADecoder::~RPZADecoder() {
#define PUT_PIXEL(color) \
if ((int32)blockPtr < _surface->w * _surface->h) { \
byte r = 0, g = 0, b = 0; \
- colorToRGB<ColorMasks<555> >(color, r, g, b); \
+ Graphics::colorToRGB<Graphics::ColorMasks<555> >(color, r, g, b); \
if (_pixelFormat.bytesPerPixel == 2) \
*((uint16 *)_surface->pixels + blockPtr) = _pixelFormat.RGBToColor(r, g, b); \
else \
@@ -74,7 +74,7 @@ RPZADecoder::~RPZADecoder() {
} \
blockPtr++
-const Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {
uint16 colorA = 0, colorB = 0;
uint16 color4[4];
@@ -211,4 +211,4 @@ const Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) {
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/rpza.h b/video/codecs/rpza.h
index bc82465a1e..c6b1f43a9a 100644
--- a/video/codecs/rpza.h
+++ b/video/codecs/rpza.h
@@ -29,21 +29,21 @@
#include "graphics/pixelformat.h"
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class RPZADecoder : public Codec {
public:
RPZADecoder(uint16 width, uint16 height);
~RPZADecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
private:
- Surface *_surface;
- PixelFormat _pixelFormat;
+ Graphics::Surface *_surface;
+ Graphics::PixelFormat _pixelFormat;
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/smc.cpp b/video/codecs/smc.cpp
index 017fe04ab6..d03c60490f 100644
--- a/video/codecs/smc.cpp
+++ b/video/codecs/smc.cpp
@@ -28,7 +28,7 @@
#include "video/codecs/smc.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
#define GET_BLOCK_COUNT() \
(opcode & 0x10) ? (1 + stream->readByte()) : 1 + (opcode & 0x0F);
@@ -388,4 +388,4 @@ const Graphics::Surface *SMCDecoder::decodeImage(Common::SeekableReadStream *str
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
diff --git a/video/codecs/smc.h b/video/codecs/smc.h
index 35fd76f76b..b2bc612857 100644
--- a/video/codecs/smc.h
+++ b/video/codecs/smc.h
@@ -28,7 +28,7 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
enum {
CPAIR = 2,
@@ -42,11 +42,11 @@ public:
SMCDecoder(uint16 width, uint16 height);
~SMCDecoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
- PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
// SMC color tables
byte _colorPairs[COLORS_PER_TABLE * CPAIR];
@@ -54,6 +54,6 @@ private:
byte _colorOctets[COLORS_PER_TABLE * COCTET];
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/truemotion1.cpp b/video/codecs/truemotion1.cpp
index e9a790924e..a0456869ab 100644
--- a/video/codecs/truemotion1.cpp
+++ b/video/codecs/truemotion1.cpp
@@ -33,7 +33,7 @@
#include "video/codecs/truemotion1data.h"
#include "common/stream.h"
-namespace Graphics {
+namespace Video {
enum {
FLAG_SPRITE = (1 << 5),
@@ -88,7 +88,7 @@ struct {
};
TrueMotion1Decoder::TrueMotion1Decoder(uint16 width, uint16 height) {
- _surface = new Surface();
+ _surface = new Graphics::Surface();
_width = width;
_height = height;
@@ -396,7 +396,7 @@ void TrueMotion1Decoder::decode16() {
}
}
-const Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {
decodeHeader(stream);
if (compressionTypes[_header.compression].algorithm == ALGO_NOP)
@@ -413,6 +413,6 @@ const Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *strea
return _surface;
}
-} // End of namespace Graphics
+} // End of namespace Video
#endif
diff --git a/video/codecs/truemotion1.h b/video/codecs/truemotion1.h
index c80598afdc..4a51fcb33a 100644
--- a/video/codecs/truemotion1.h
+++ b/video/codecs/truemotion1.h
@@ -33,20 +33,20 @@
#include "video/codecs/codec.h"
-namespace Graphics {
+namespace Video {
class TrueMotion1Decoder : public Codec {
public:
TrueMotion1Decoder(uint16 width, uint16 height);
~TrueMotion1Decoder();
- const Surface *decodeImage(Common::SeekableReadStream *stream);
+ const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream);
// Always return RGB565
- PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
+ Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
private:
- Surface *_surface;
+ Graphics::Surface *_surface;
int _mbChangeBitsRowSize;
byte *_buf, *_mbChangeBits, *_indexStream;
@@ -100,7 +100,7 @@ private:
void genVectorTable16(const byte *selVectorTable);
};
-} // End of namespace Graphics
+} // End of namespace Video
#endif // VIDEO_CODECS_TRUEMOTION1_H
#endif // SCI32/Plugins guard
diff --git a/video/codecs/truemotion1data.h b/video/codecs/truemotion1data.h
index 8199135a29..06d30c4436 100644
--- a/video/codecs/truemotion1data.h
+++ b/video/codecs/truemotion1data.h
@@ -31,7 +31,7 @@
#include "common/scummsys.h"
-namespace Graphics {
+namespace Video {
// Y delta tables, skinny and fat
static const int16 ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
@@ -827,6 +827,6 @@ static const byte pc_tbl4[] = {
static const byte * const tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
-} // End of namespace Graphics
+} // End of namespace Video
#endif