#include <codec.h>
Public Types | |
enum | DitherType { kDitherTypeUnknown, kDitherTypeVFW, kDitherTypeQT } |
Public Member Functions | |
virtual const Graphics::Surface * | decodeFrame (Common::SeekableReadStream &stream)=0 |
virtual Graphics::PixelFormat | getPixelFormat () const =0 |
virtual bool | setOutputPixelFormat (const Graphics::PixelFormat &format) |
virtual bool | containsPalette () const |
virtual const byte * | getPalette () |
virtual bool | hasDirtyPalette () const |
virtual bool | canDither (DitherType type) const |
virtual void | setDither (DitherType type, const byte *palette) |
virtual void | setCodecAccuracy (CodecAccuracy accuracy) |
Static Public Member Functions | |
static byte * | createQuickTimeDitherTable (const byte *palette, uint colorCount) |
An abstract representation of a image codec.
Unlike ImageDecoder, the entire info for a frame may not be present within the stream. The codec may rely on the supporting container for parameters and can also rely on a previous (or future) frame. When decoding, the previous frame may not destroyed and could be maintained for use in the next one.
An ImageDecoder can always be a Codec, but a Codec may not necessarily be able to be an ImageDecoder.
Used in image:
Used in video:
|
pure virtual |
Decode the frame for the given data and return a pointer to a surface containing the decoded frame.
Implemented in Image::CinepakDecoder, Image::JPEGDecoder, Image::Indeo4Decoder, Image::Indeo5Decoder, Image::Indeo3Decoder, Image::CDToonsDecoder, Image::MJPEGDecoder, Image::XanDecoder, Image::SMCDecoder, Image::SVQ1Decoder, Image::QTRLEDecoder, Image::RPZADecoder, Image::BitmapRawDecoder, Image::HLZDecoder, Image::JYV1Decoder, Image::MSRLEDecoder, Image::MSRLE4Decoder, and Image::MSVideo1Decoder.
|
pure virtual |
Get the format that the surface returned from decodeImage() will be in.
Implemented in Image::Indeo::IndeoDecoderBase, Image::CinepakDecoder, Image::JPEGDecoder, Image::Indeo3Decoder, Image::CDToonsDecoder, Image::MJPEGDecoder, Image::XanDecoder, Image::SMCDecoder, Image::SVQ1Decoder, Image::QTRLEDecoder, Image::RPZADecoder, Image::BitmapRawDecoder, Image::HLZDecoder, Image::JYV1Decoder, Image::MSRLEDecoder, Image::MSRLE4Decoder, Image::MSVideo1Decoder, and Image::HNM6Decoder.
|
inlinevirtual |
Select the preferred format to use, for codecs where this is faster than converting the image afterwards. Returns true if supported, and false otherwise.
Reimplemented in Image::Indeo::IndeoDecoderBase, Image::CinepakDecoder, Image::JPEGDecoder, Image::Indeo3Decoder, Image::MJPEGDecoder, Image::XanDecoder, and Image::SVQ1Decoder.
|
inlinevirtual |
Can this codec's frames contain a palette?
Reimplemented in Image::CinepakDecoder, Image::CDToonsDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.
|
inlinevirtual |
Get the palette last decoded from decodeImage
Reimplemented in Image::CinepakDecoder, Image::CDToonsDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.
|
inlinevirtual |
Does the codec have a dirty palette?
Reimplemented in Image::CinepakDecoder, Image::CDToonsDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.
|
inlinevirtual |
Can the codec dither down to 8bpp?
Reimplemented in Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.
|
inlinevirtual |
Activate dithering mode with a palette
Reimplemented in Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.
|
inlinevirtual |
Set the decoding accuracy of the codec, if supported
Reimplemented in Image::JPEGDecoder, and Image::MJPEGDecoder.
|
static |
Create a dither table, as used by QuickTime codecs.