aboutsummaryrefslogtreecommitdiff
path: root/image/codecs/indeo/indeo.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-10 09:00:24 -0400
committerPaul Gilbert2016-09-10 10:08:22 -0400
commit4e9933d3c99d6367b04f07d2bd7499f1de999b57 (patch)
tree896219bc6b6b78acaab54e70fa2664a91455b2c2 /image/codecs/indeo/indeo.h
parent0910e642a229d8f477f35943c6845f3b5a4dea42 (diff)
downloadscummvm-rg350-4e9933d3c99d6367b04f07d2bd7499f1de999b57.tar.gz
scummvm-rg350-4e9933d3c99d6367b04f07d2bd7499f1de999b57.tar.bz2
scummvm-rg350-4e9933d3c99d6367b04f07d2bd7499f1de999b57.zip
IMAGE: Indeo4 decoder is now working
Diffstat (limited to 'image/codecs/indeo/indeo.h')
-rw-r--r--image/codecs/indeo/indeo.h46
1 files changed, 31 insertions, 15 deletions
diff --git a/image/codecs/indeo/indeo.h b/image/codecs/indeo/indeo.h
index cd6920d26c..d9801202b4 100644
--- a/image/codecs/indeo/indeo.h
+++ b/image/codecs/indeo/indeo.h
@@ -277,7 +277,12 @@ struct IVIPlaneDesc {
};
struct AVFrame {
-#define AV_NUM_DATA_POINTERS 8
+ /**
+ * Dimensions
+ */
+ int _width, _height;
+
+#define AV_NUM_DATA_POINTERS 3
/**
* pointer to the picture/channel planes.
* This might be different from the first allocated byte
@@ -290,7 +295,7 @@ struct AVFrame {
* NOTE: Except for hwaccel formats, pointers not needed by the format
* MUST be set to NULL.
*/
- uint8 *data[AV_NUM_DATA_POINTERS];
+ uint8 *_data[AV_NUM_DATA_POINTERS];
/**
* For video, size in bytes of each picture line.
@@ -307,9 +312,32 @@ struct AVFrame {
* @note The linesize may be larger than the size of usable data -- there
* may be extra padding present for performance reasons.
*/
- int linesize[AV_NUM_DATA_POINTERS];
+ int _linesize[AV_NUM_DATA_POINTERS];
+ /**
+ * Constructor
+ */
AVFrame();
+
+ /**
+ * Destructor
+ */
+ ~AVFrame() { av_frame_free(); }
+
+ /**
+ * Sets the frame dimensions
+ */
+ int ff_set_dimensions(uint16 width, uint16 height);
+
+ /**
+ * Get a buffer for a frame
+ */
+ int ff_get_buffer(int flags);
+
+ /**
+ * Frees any data loaded for the frame
+ */
+ void av_frame_free();
};
struct IVI45DecContext {
@@ -389,18 +417,6 @@ private:
int decode_band(IVIBandDesc *band);
/**
- * Sets the frame dimensions
- */
- int ff_set_dimensions(uint16 width, uint16 height);
-
- /**
- * Get a buffer for a frame. This is a wrapper around
- * AVCodecContext.get_buffer() and should be used instead calling get_buffer()
- * directly.
- */
- int ff_get_buffer(AVFrame *frame, int flags);
-
- /**
* Haar wavelet recomposition filter for Indeo 4
*
* @param[in] plane pointer to the descriptor of the plane being processed