ScummVM API documentation
indeo4.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22/* Intel Indeo 4 decompressor, derived from ffmpeg.
23 *
24 * Original copyright note:
25 * Intel Indeo 4 (IV31, IV32, etc.) video decoder for ffmpeg
26 * written, produced, and directed by Alan Smithee
27 */
28
29#ifndef IMAGE_CODECS_INDEO4_H
30#define IMAGE_CODECS_INDEO4_H
31
32#include "image/codecs/indeo/get_bits.h"
33#include "image/codecs/indeo/indeo.h"
34
35namespace Image {
36
37using namespace Indeo;
38
48 struct Transform {
49 InvTransformPtr *_invTrans;
50 DCTransformPtr *_dcTrans;
51 bool _is2dTrans;
52 };
53public:
54 Indeo4Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16);
55 ~Indeo4Decoder() override {}
56
58
59 static bool isIndeo4(Common::SeekableReadStream &stream);
60protected:
65 int decodePictureHeader() override;
66
70 void switchBuffers() override;
71
72 bool isNonNullFrame() const override;
73
80 int decodeBandHeader(IVIBandDesc *band) override;
81
90 int decodeMbInfo(IVIBandDesc *band, IVITile *tile) override;
91
95 int decodeRLETransparency(VLC_TYPE (*table)[2]);
96
100 int decodeTransparency() override;
101private:
102 int scaleTileSize(int defSize, int sizeFactor);
103
114 int decodePlaneSubdivision();
115
116private:
120 static const uint _ivi4_common_pic_sizes[14];
121
125 static const Transform _transforms[18];
126
127 static const uint8 *const _scan_index_to_tab[15];
128
132 static const uint16 _ivi4_quant_8x8_intra[9][64];
133
134 static const uint16 _ivi4_quant_8x8_inter[9][64];
135
136 static const uint16 _ivi4_quant_4x4_intra[5][16];
137
138 static const uint16 _ivi4_quant_4x4_inter[5][16];
139
144 static const uint8 _quant_index_to_tab[22];
145};
146
147} // End of namespace Image
148
149#endif
Definition: stream.h:745
Definition: indeo4.h:47
int decodePictureHeader() override
int decodeRLETransparency(VLC_TYPE(*table)[2])
int decodeTransparency() override
void switchBuffers() override
const Graphics::Surface * decodeFrame(Common::SeekableReadStream &stream) override
int decodeMbInfo(IVIBandDesc *band, IVITile *tile) override
int decodeBandHeader(IVIBandDesc *band) override
Definition: indeo.h:435
Definition: surface.h:67
Definition: indeo.h:201
Definition: indeo.h:183