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

svq1.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 #ifndef IMAGE_CODECS_SVQ1_H
00024 #define IMAGE_CODECS_SVQ1_H
00025 
00026 #include "common/bitstream.h"
00027 #include "image/codecs/codec.h"
00028 
00029 namespace Common {
00030 class Huffman;
00031 struct Point;
00032 }
00033 
00034 namespace Image {
00035 
00041 class SVQ1Decoder : public Codec {
00042 public:
00043     SVQ1Decoder(uint16 width, uint16 height);
00044     ~SVQ1Decoder();
00045 
00046     const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
00047     Graphics::PixelFormat getPixelFormat() const { return _surface->format; }
00048 
00049 private:
00050     Graphics::Surface *_surface;
00051     uint16 _width, _height;
00052     uint16 _frameWidth, _frameHeight;
00053 
00054     byte *_last[3];
00055 
00056     Common::Huffman *_blockType;
00057     Common::Huffman *_intraMultistage[6];
00058     Common::Huffman *_interMultistage[6];
00059     Common::Huffman *_intraMean;
00060     Common::Huffman *_interMean;
00061     Common::Huffman *_motionComponent;
00062 
00063     bool svq1DecodeBlockIntra(Common::BitStream32BEMSB *s, byte *pixels, int pitch);
00064     bool svq1DecodeBlockNonIntra(Common::BitStream32BEMSB *s, byte *pixels, int pitch);
00065     bool svq1DecodeMotionVector(Common::BitStream32BEMSB *s, Common::Point *mv, Common::Point **pmv);
00066     void svq1SkipBlock(byte *current, byte *previous, int pitch, int x, int y);
00067     bool svq1MotionInterBlock(Common::BitStream32BEMSB *ss, byte *current, byte *previous, int pitch,
00068             Common::Point *motion, int x, int y);
00069     bool svq1MotionInter4vBlock(Common::BitStream32BEMSB *ss, byte *current, byte *previous, int pitch,
00070             Common::Point *motion, int x, int y);
00071     bool svq1DecodeDeltaBlock(Common::BitStream32BEMSB *ss, byte *current, byte *previous, int pitch,
00072             Common::Point *motion, int x, int y);
00073 
00074     void putPixels8C(byte *block, const byte *pixels, int lineSize, int h);
00075     void putPixels8L2(byte *dst, const byte *src1, const byte *src2, int dstStride, int srcStride1, int srcStride2, int h);
00076     void putPixels8X2C(byte *block, const byte *pixels, int lineSize, int h);
00077     void putPixels8Y2C(byte *block, const byte *pixels, int lineSize, int h);
00078     void putPixels8XY2C(byte *block, const byte *pixels, int lineSize, int h);
00079     void putPixels16C(byte *block, const byte *pixels, int lineSize, int h);
00080     void putPixels16X2C(byte *block, const byte *pixels, int lineSize, int h);
00081     void putPixels16Y2C(byte *block, const byte *pixels, int lineSize, int h);
00082     void putPixels16XY2C(byte *block, const byte *pixels, int lineSize, int h);
00083 };
00084 
00085 } // End of namespace Image
00086 
00087 #endif


Generated on Sat Mar 23 2019 05:02:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge