aboutsummaryrefslogtreecommitdiff
path: root/image/codecs/indeo4.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-06 22:13:56 -0400
committerPaul Gilbert2016-09-10 10:08:14 -0400
commit9e774af4d91cb3adddfb6acc2024653620e725db (patch)
tree44eadc8766ce0f8d36e5409e323648ea39e61f54 /image/codecs/indeo4.h
parentc165826316a71b378e3493a4a5fb6a6e1740bbab (diff)
downloadscummvm-rg350-9e774af4d91cb3adddfb6acc2024653620e725db.tar.gz
scummvm-rg350-9e774af4d91cb3adddfb6acc2024653620e725db.tar.bz2
scummvm-rg350-9e774af4d91cb3adddfb6acc2024653620e725db.zip
IMAGE: Further implementation of Indeo image decoding
Diffstat (limited to 'image/codecs/indeo4.h')
-rw-r--r--image/codecs/indeo4.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/image/codecs/indeo4.h b/image/codecs/indeo4.h
index b2d89d5d55..1034f18f0c 100644
--- a/image/codecs/indeo4.h
+++ b/image/codecs/indeo4.h
@@ -35,6 +35,7 @@
#include "image/codecs/indeo/get_bits.h"
#include "image/codecs/indeo/indeo.h"
+#include "image/codecs/indeo/indeo_dsp.h"
#include "graphics/managed_surface.h"
namespace Image {
@@ -50,6 +51,11 @@ using namespace Indeo;
* - AVIDecoder
*/
class Indeo4Decoder : public IndeoDecoderBase {
+ struct Transform {
+ InvTransformPtr *inv_trans;
+ DCTransformPtr *dc_trans;
+ int is_2d_trans;
+ };
public:
Indeo4Decoder(uint16 width, uint16 height);
virtual ~Indeo4Decoder() {}
@@ -63,6 +69,31 @@ protected:
* @returns 0 = Ok, negative number = error
*/
virtual int decodePictureHeader();
+
+ /**
+ * Rearrange decoding and reference buffers.
+ */
+ virtual void switch_buffers();
+
+ virtual bool is_nonnull_frame() const;
+
+ /**
+ * Decode Indeo 4 band header.
+ *
+ * @param[in,out] band pointer to the band descriptor
+ * @return result code: 0 = OK, negative number = error
+ */
+ virtual int decode_band_hdr(IVIBandDesc *band);
+
+ /**
+ * Decode information (block type, cbp, quant delta, motion vector)
+ * for all macroblocks in the current tile.
+ *
+ * @param[in,out] band pointer to the band descriptor
+ * @param[in,out] tile pointer to the tile descriptor
+ * @return result code: 0 = OK, negative number = error
+ */
+ virtual int decode_mb_info(IVIBandDesc *band, IVITile *tile);
private:
int scaleTileSize(int def_size, int size_factor);
@@ -83,6 +114,30 @@ private:
* Standard picture dimensions
*/
static const uint _ivi4_common_pic_sizes[14];
+
+ /**
+ * Transformations list
+ */
+ static Transform _transforms[18];
+
+ static const uint8 *const _scan_index_to_tab[15];
+
+ /**
+ * Indeo 4 dequant tables
+ */
+ static const uint16 _ivi4_quant_8x8_intra[9][64];
+
+ static const uint16 _ivi4_quant_8x8_inter[9][64];
+
+ static const uint16 _ivi4_quant_4x4_intra[5][16];
+
+ static const uint16 _ivi4_quant_4x4_inter[5][16];
+
+ /**
+ * Table for mapping quant matrix index from the bitstream
+ * into internal quant table number.
+ */
+ static const uint8 _quant_index_to_tab[22];
};
} // End of namespace Image