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

indeo3.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 #include "common/scummsys.h"
00024 
00025 /* Intel Indeo 3 decompressor, derived from ffmpeg.
00026  *
00027  * Original copyright note:
00028  * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg
00029  * written, produced, and directed by Alan Smithee
00030  */
00031 
00032 #ifndef IMAGE_CODECS_INDEO3_H
00033 #define IMAGE_CODECS_INDEO3_H
00034 
00035 #include "image/codecs/codec.h"
00036 
00037 namespace Image {
00038 
00047 class Indeo3Decoder : public Codec {
00048 public:
00049     Indeo3Decoder(uint16 width, uint16 height, uint bitsPerPixel = 24);
00050     ~Indeo3Decoder();
00051 
00052     const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
00053     Graphics::PixelFormat getPixelFormat() const;
00054 
00055     static bool isIndeo3(Common::SeekableReadStream &stream);
00056 
00057 private:
00058     Graphics::Surface *_surface;
00059 
00060     Graphics::PixelFormat _pixelFormat;
00061 
00062     static const int _corrector_type_0[24];
00063     static const int _corrector_type_2[8];
00064     static const uint32 correction[];
00065     static const uint32 correctionloworder[];
00066     static const uint32 correctionhighorder[];
00067 
00068     struct YUVBufs {
00069         byte *Ybuf;
00070         byte *Ubuf;
00071         byte *Vbuf;
00072         byte *the_buf;
00073         uint32 the_buf_size;
00074         uint16 y_w, y_h;
00075         uint16 uv_w, uv_h;
00076     };
00077 
00078     YUVBufs _iv_frame[2];
00079     YUVBufs *_cur_frame;
00080     YUVBufs *_ref_frame;
00081 
00082     byte *_ModPred;
00083     uint16 *_corrector_type;
00084 
00085     void buildModPred();
00086     void allocFrames();
00087 
00088     void decodeChunk(byte *cur, byte *ref, int width, int height,
00089             const byte *buf1, uint32 fflags2, const byte *hdr,
00090             const byte *buf2, int min_width_160);
00091 };
00092 
00093 } // End of namespace Image
00094 
00095 #endif


Generated on Sat Aug 24 2019 05:01:04 for ResidualVM by doxygen 1.7.1
curved edge   curved edge