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

indeo5.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_INDEO5_H
00031 #define IMAGE_CODECS_INDEO5_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 Indeo5Decoder : public IndeoDecoderBase {
00049     struct Transform {
00050         InvTransformPtr *inv_trans;
00051         DCTransformPtr  *dc_trans;
00052         int             is_2d_trans;
00053     };
00054 public:
00055     Indeo5Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16);
00056     virtual ~Indeo5Decoder() {}
00057 
00058     virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
00059 
00060     static bool isIndeo5(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 private:
00099     int decode_gop_header();
00100 
00104     int skip_hdr_extension();
00105 
00106 private:
00110     static const uint8 _commonPicSizes[30];
00111 
00121     static const uint16 _baseQuant8x8Inter[5][64];
00122     static const uint16 _baseQuant8x8Intra[5][64];
00123 
00124     static const uint16 _baseQuant4x4Inter[16];
00125     static const uint16 _baseQuant4x4Intra[16];
00126 
00127     static const uint8 _scaleQuant8x8Inter[5][24];
00128     static const uint8 _scaleQuant8x8Intra[5][24];
00129 
00130     static const uint8 _scaleQuant4x4Inter[24];
00131     static const uint8 _scaleQuant4x4Intra[24];
00132 };
00133 
00134 } // End of namespace Image
00135 
00136 #endif


Generated on Sat May 18 2019 05:01:05 for ResidualVM by doxygen 1.7.1
curved edge   curved edge