ScummVM API documentation
Image::DitherCodec Class Reference
Inheritance diagram for Image::DitherCodec:
Image::Codec

Public Member Functions

 DitherCodec (Codec *codec, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
const Graphics::SurfacedecodeFrame (Common::SeekableReadStream &stream) override
 
Graphics::PixelFormat getPixelFormat () const override
 
bool setOutputPixelFormat (const Graphics::PixelFormat &format) override
 
bool containsPalette () const override
 
const byte * getPalette () override
 
bool hasDirtyPalette () const override
 
bool canDither (DitherType type) const override
 
void setDither (DitherType type, const byte *palette) override
 
void setCodecAccuracy (CodecAccuracy accuracy) override
 
void setPalette (const byte *palette)
 

Static Public Member Functions

static byte * createQuickTimeDitherTable (const byte *palette, uint colorCount)
 
- Static Public Member Functions inherited from Image::Codec
static Graphics::PixelFormat getDefaultYUVFormat ()
 

Additional Inherited Members

- Public Types inherited from Image::Codec
enum  DitherType { kDitherTypeUnknown, kDitherTypeVFW, kDitherTypeQT }
 

Member Function Documentation

◆ decodeFrame()

const Graphics::Surface* Image::DitherCodec::decodeFrame ( Common::SeekableReadStream stream)
overridevirtual

Decode the frame for the given data and return a pointer to a surface containing the decoded frame.

Returns
a pointer to the decoded frame

Implements Image::Codec.

◆ getPixelFormat()

Graphics::PixelFormat Image::DitherCodec::getPixelFormat ( ) const
overridevirtual

Get the format that the surface returned from decodeImage() will be in.

Implements Image::Codec.

◆ setOutputPixelFormat()

bool Image::DitherCodec::setOutputPixelFormat ( const Graphics::PixelFormat format)
overridevirtual

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 from Image::Codec.

◆ containsPalette()

bool Image::DitherCodec::containsPalette ( ) const
overridevirtual

Can this codec's frames contain a palette?

Reimplemented from Image::Codec.

◆ getPalette()

const byte* Image::DitherCodec::getPalette ( )
overridevirtual

Get the palette last decoded from decodeImage

Reimplemented from Image::Codec.

◆ hasDirtyPalette()

bool Image::DitherCodec::hasDirtyPalette ( ) const
overridevirtual

Does the codec have a dirty palette?

Reimplemented from Image::Codec.

◆ canDither()

bool Image::DitherCodec::canDither ( DitherType  type) const
overridevirtual

Can the codec dither down to 8bpp?

Reimplemented from Image::Codec.

◆ setDither()

void Image::DitherCodec::setDither ( DitherType  type,
const byte *  palette 
)
overridevirtual

Activate dithering mode with a palette

Reimplemented from Image::Codec.

◆ setCodecAccuracy()

void Image::DitherCodec::setCodecAccuracy ( CodecAccuracy  accuracy)
overridevirtual

Set the decoding accuracy of the codec, if supported

Reimplemented from Image::Codec.

◆ setPalette()

void Image::DitherCodec::setPalette ( const byte *  palette)
inline

Specify the source palette when dithering from CLUT8 to CLUT8.

◆ createQuickTimeDitherTable()

static byte* Image::DitherCodec::createQuickTimeDitherTable ( const byte *  palette,
uint  colorCount 
)
static

Create a dither table, as used by QuickTime codecs.


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