aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/module.mk1
-rw-r--r--graphics/video/codecs/qdm2.cpp (renamed from sound/decoders/qdm2.cpp)12
-rw-r--r--graphics/video/codecs/qdm2.h (renamed from sound/decoders/qdm2.h)13
-rw-r--r--graphics/video/codecs/qdm2data.h (renamed from sound/decoders/qdm2data.h)8
-rw-r--r--graphics/video/qt_decoder.cpp8
-rw-r--r--sound/module.mk1
6 files changed, 23 insertions, 20 deletions
diff --git a/graphics/module.mk b/graphics/module.mk
index 8f916a5bcc..c7f5771420 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -32,6 +32,7 @@ MODULE_OBJS := \
video/codecs/mjpeg.o \
video/codecs/msrle.o \
video/codecs/msvideo1.o \
+ video/codecs/qdm2.o \
video/codecs/qtrle.o \
video/codecs/rpza.o \
video/codecs/smc.o \
diff --git a/sound/decoders/qdm2.cpp b/graphics/video/codecs/qdm2.cpp
index aa4eb4b40a..e12be21303 100644
--- a/sound/decoders/qdm2.cpp
+++ b/graphics/video/codecs/qdm2.cpp
@@ -25,18 +25,18 @@
// Based off ffmpeg's QDM2 decoder
-#include "sound/decoders/qdm2.h"
+#include "graphics/video/codecs/qdm2.h"
-#ifdef SOUND_QDM2_H
+#ifdef GRAPHICS_QDM2_H
#include "sound/audiostream.h"
-#include "sound/decoders/qdm2data.h"
+#include "graphics/video/codecs/qdm2data.h"
#include "common/array.h"
#include "common/stream.h"
#include "common/system.h"
-namespace Audio {
+namespace Graphics {
enum {
SOFTCLIP_THRESHOLD = 27600,
@@ -3318,10 +3318,10 @@ int QDM2Stream::readBuffer(int16 *buffer, const int numSamples) {
return decodedSamples;
}
-AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData) {
+Audio::AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData) {
return new QDM2Stream(stream, extraData);
}
-} // End of namespace Audio
+} // End of namespace Graphics
#endif
diff --git a/sound/decoders/qdm2.h b/graphics/video/codecs/qdm2.h
index 842ede3de0..c9a01a70ee 100644
--- a/sound/decoders/qdm2.h
+++ b/graphics/video/codecs/qdm2.h
@@ -26,8 +26,8 @@
// Only compile if Mohawk is enabled or if we're building dynamic modules
#if defined(ENABLE_MOHAWK) || defined(DYNAMIC_MODULES)
-#ifndef SOUND_QDM2_H
-#define SOUND_QDM2_H
+#ifndef GRAPHICS_QDM2_H
+#define GRAPHICS_QDM2_H
namespace Common {
class SeekableReadStream;
@@ -35,6 +35,9 @@ namespace Common {
namespace Audio {
class AudioStream;
+}
+
+namespace Graphics {
/**
* Create a new AudioStream from the QDM2 data in the given stream.
@@ -43,9 +46,9 @@ namespace Audio {
* @param extraData the QuickTime extra data stream
* @return a new AudioStream, or NULL, if an error occured
*/
-AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData);
+Audio::AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData);
-} // End of namespace Audio
+} // End of namespace Graphics
-#endif // SOUND_QDM2_H
+#endif // GRAPHICS_QDM2_H
#endif // Mohawk/Plugins guard
diff --git a/sound/decoders/qdm2data.h b/graphics/video/codecs/qdm2data.h
index 4c13328dd6..25ed102c4e 100644
--- a/sound/decoders/qdm2data.h
+++ b/graphics/video/codecs/qdm2data.h
@@ -23,12 +23,12 @@
*
*/
-#ifndef SOUND_QDM2DATA_H
-#define SOUND_QDM2DATA_H
+#ifndef GRAPHICS_QDM2DATA_H
+#define GRAPHICS_QDM2DATA_H
#include "common/scummsys.h"
-namespace Audio {
+namespace Graphics {
/// 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 Audio
+} // End of namespace Graphics
#endif
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp
index 05f73526eb..4a9be0b0fd 100644
--- a/graphics/video/qt_decoder.cpp
+++ b/graphics/video/qt_decoder.cpp
@@ -41,7 +41,7 @@
// Audio codecs
#include "sound/decoders/adpcm.h"
#include "sound/decoders/raw.h"
-#include "sound/decoders/qdm2.h"
+#include "graphics/video/codecs/qdm2.h"
// Video codecs
#include "graphics/video/codecs/cinepak.h"
@@ -1187,7 +1187,7 @@ bool QuickTimeDecoder::checkAudioCodecSupport(uint32 tag) {
if (tag == MKID_BE('twos') || tag == MKID_BE('raw ') || tag == MKID_BE('ima4'))
return true;
-#ifdef SOUND_QDM2_H
+#ifdef GRAPHICS_QDM2_H
if (tag == MKID_BE('QDM2'))
return true;
#endif
@@ -1218,10 +1218,10 @@ Audio::AudioStream *QuickTimeDecoder::createAudioStream(Common::SeekableReadStre
} else if (_streams[_audioStreamIndex]->codec_tag == MKID_BE('ima4')) {
// Riven uses this codec (as do some Myst ME videos)
return Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMApple, _streams[_audioStreamIndex]->sample_rate, _streams[_audioStreamIndex]->channels, 34);
-#ifdef SOUND_QDM2_H
+#ifdef GRAPHICS_QDM2_H
} else if (_streams[_audioStreamIndex]->codec_tag == MKID_BE('QDM2')) {
// Several Myst ME videos use this codec
- return Audio::makeQDM2Stream(stream, _streams[_audioStreamIndex]->extradata);
+ return makeQDM2Stream(stream, _streams[_audioStreamIndex]->extradata);
#endif
}
diff --git a/sound/module.mk b/sound/module.mk
index cd1ff0df8e..df593d8e1f 100644
--- a/sound/module.mk
+++ b/sound/module.mk
@@ -18,7 +18,6 @@ MODULE_OBJS := \
decoders/flac.o \
decoders/iff_sound.o \
decoders/mp3.o \
- decoders/qdm2.o \
decoders/raw.o \
decoders/vag.o \
decoders/voc.o \