aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/fmv/theora_decoder.h
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-30 20:39:02 +0000
committerFilippos Karapetis2011-01-30 20:39:02 +0000
commitd4e1260b7e8363fba9e920ba2f3e301a26b86239 (patch)
treeef2facca65e12900106b5e4df289b6c2cfa398f8 /engines/sword25/fmv/theora_decoder.h
parent77d2110101c06022e80968d0e01c5d664b2ef0a6 (diff)
downloadscummvm-rg350-d4e1260b7e8363fba9e920ba2f3e301a26b86239.tar.gz
scummvm-rg350-d4e1260b7e8363fba9e920ba2f3e301a26b86239.tar.bz2
scummvm-rg350-d4e1260b7e8363fba9e920ba2f3e301a26b86239.zip
SWORD25: Some optimizations to the Theora decoder
- Optimized and cleaned up translateYUVtoRGBA() - Disabled a lot of seeking-related functionality - Replaced some calloc() calls, used for audio buffer creation with malloc() svn-id: r55666
Diffstat (limited to 'engines/sword25/fmv/theora_decoder.h')
-rw-r--r--engines/sword25/fmv/theora_decoder.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h
index 0faed4fdef..34349c9088 100644
--- a/engines/sword25/fmv/theora_decoder.h
+++ b/engines/sword25/fmv/theora_decoder.h
@@ -41,6 +41,8 @@ namespace Common {
class SeekableReadStream;
}
+//#define ENABLE_THEORA_SEEKING // enables the extra calculations used for video seeking
+
namespace Sword25 {
/**
@@ -105,7 +107,7 @@ private:
void queuePage(ogg_page *page);
int bufferData();
Audio::QueuingAudioStream *createAudioStream();
- void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer, const th_info &theoraInfo, byte *pixelData, int pixelsSize);
+ void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer, byte *pixelData);
private:
Common::SeekableReadStream *_fileStream;
@@ -142,14 +144,17 @@ private:
// single frame video buffering
bool _videobufReady;
- ogg_int64_t _videobufGranulePos;
- double _videobufTime;
// single audio fragment audio buffering
int _audiobufFill;
bool _audiobufReady;
ogg_int16_t *_audiobuf;
+
+#if ENABLE_THEORA_SEEKING
+ double _videobufTime;
+ ogg_int64_t _videobufGranulePos;
ogg_int64_t _audiobufGranulePos; // time position of last sample
+#endif
};
} // End of namespace Sword25