ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

indeo4.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 /* Intel Indeo 4 decompressor, derived from ffmpeg.
00024  *
00025  * Original copyright note:
00026  * Intel Indeo 4 (IV31, IV32, etc.) video decoder for ffmpeg
00027  * written, produced, and directed by Alan Smithee
00028  */
00029 
00030 #ifndef IMAGE_CODECS_INDEO4_H
00031 #define IMAGE_CODECS_INDEO4_H
00032 
00033 #include "image/codecs/indeo/get_bits.h"
00034 #include "image/codecs/indeo/indeo.h"
00035 
00036 namespace Image {
00037 
00038 using namespace Indeo;
00039 
00048 class Indeo4Decoder : public IndeoDecoderBase {
00049     struct Transform {
00050         InvTransformPtr *_invTrans;
00051         DCTransformPtr *_dcTrans;
00052         bool _is2dTrans;
00053     };
00054 public:
00055     Indeo4Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16);
00056     virtual ~Indeo4Decoder() {}
00057 
00058     virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
00059 
00060     static bool isIndeo4(Common::SeekableReadStream &stream);
00061 protected:
00066     virtual int decodePictureHeader();
00067 
00071     virtual void switchBuffers();
00072 
00073     virtual bool isNonNullFrame() const;
00074 
00081     virtual int decodeBandHeader(IVIBandDesc *band);
00082 
00091     virtual int decodeMbInfo(IVIBandDesc *band, IVITile *tile);
00092 
00096     int decodeRLETransparency(VLC_TYPE (*table)[2]);
00097 
00101     virtual int decodeTransparency();
00102 private:
00103     int scaleTileSize(int defSize, int sizeFactor);
00104 
00115     int decodePlaneSubdivision();
00116 
00117 private:
00121     static const uint _ivi4_common_pic_sizes[14];
00122 
00126     static Transform _transforms[18];
00127 
00128     static const uint8 *const _scan_index_to_tab[15];
00129 
00133     static const uint16 _ivi4_quant_8x8_intra[9][64];
00134 
00135     static const uint16 _ivi4_quant_8x8_inter[9][64];
00136 
00137     static const uint16 _ivi4_quant_4x4_intra[5][16];
00138 
00139     static const uint16 _ivi4_quant_4x4_inter[5][16];
00140 
00145     static const uint8 _quant_index_to_tab[22];
00146 };
00147 
00148 } // End of namespace Image
00149 
00150 #endif


Generated on Sat Oct 12 2019 05:01:10 for ResidualVM by doxygen 1.7.1
curved edge   curved edge