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

An abstract representation of a image codec. More...

#include <codec.h>

Inheritance diagram for Image::Codec:

List of all members.

Public Types

enum  DitherType { kDitherTypeUnknown, kDitherTypeVFW, kDitherTypeQT }
 

A type of dithering.

More...

Public Member Functions

 Codec ()
virtual ~Codec ()
virtual const Graphics::SurfacedecodeFrame (Common::SeekableReadStream &stream)=0
 Decode the frame for the given data and return a pointer to a surface containing the decoded frame.
virtual Graphics::PixelFormat getPixelFormat () const =0
 Get the format that the surface returned from decodeImage() will be in.
virtual bool containsPalette () const
 Can this codec's frames contain a palette?
virtual const bytegetPalette ()
 Get the palette last decoded from decodeImage.
virtual bool hasDirtyPalette () const
 Does the codec have a dirty palette?
virtual bool canDither (DitherType type) const
 Can the codec dither down to 8bpp?
virtual void setDither (DitherType type, const byte *palette)
 Activate dithering mode with a palette.

Static Public Member Functions

static bytecreateQuickTimeDitherTable (const byte *palette, uint colorCount)
 Create a dither table, as used by QuickTime codecs.

Detailed Description

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:

  • AVIDecoder
  • QuickTimeDecoder
  • VMDDecoder

Definition at line 56 of file codec.h.


Member Enumeration Documentation

A type of dithering.

Enumerator:
kDitherTypeUnknown 

Unknown.

kDitherTypeVFW 

Video for Windows dithering.

kDitherTypeQT 

QuickTime dithering.

Definition at line 64 of file codec.h.


Constructor & Destructor Documentation

Image::Codec::Codec (  )  [inline]

Definition at line 58 of file codec.h.

virtual Image::Codec::~Codec (  )  [inline, virtual]

Definition at line 59 of file codec.h.


Member Function Documentation

virtual bool Image::Codec::canDither ( DitherType  type  )  const [inline, virtual]

Can the codec dither down to 8bpp?

Reimplemented in Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.

Definition at line 107 of file codec.h.

virtual bool Image::Codec::containsPalette (  )  const [inline, virtual]

Can this codec's frames contain a palette?

Reimplemented in Image::CDToonsDecoder, Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.

Definition at line 92 of file codec.h.

byte * Image::Codec::createQuickTimeDitherTable ( const byte palette,
uint  colorCount 
) [static]

Create a dither table, as used by QuickTime codecs.

Definition at line 75 of file codec.cpp.

virtual const Graphics::Surface* Image::Codec::decodeFrame ( Common::SeekableReadStream stream  )  [pure virtual]
virtual const byte* Image::Codec::getPalette (  )  [inline, virtual]

Get the palette last decoded from decodeImage.

Reimplemented in Image::CDToonsDecoder, Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.

Definition at line 97 of file codec.h.

virtual bool Image::Codec::hasDirtyPalette (  )  const [inline, virtual]

Does the codec have a dirty palette?

Reimplemented in Image::CDToonsDecoder, Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.

Definition at line 102 of file codec.h.

virtual void Image::Codec::setDither ( DitherType  type,
const byte palette 
) [inline, virtual]

Activate dithering mode with a palette.

Reimplemented in Image::CinepakDecoder, Image::QTRLEDecoder, and Image::RPZADecoder.

Definition at line 112 of file codec.h.


The documentation for this class was generated from the following files:


Generated on Sat Jul 13 2019 05:04:31 for ResidualVM by doxygen 1.7.1
curved edge   curved edge