Skip to main content

DecoderJPEG

The DecoderJPEG class provides a GPU-accelerated JPEG decoding interface capable of converting JPEG images into textures.

#include <graphics/TellusimDecoderJPEG.h>

Constructors

DecoderJPEG()

Methods

Clear decoder.

void clear()

Check decoder.

bool isCreated(Mode mode) const

YUV444 mode performs inplace YUVtoRGB conversion.

static bool isYUV(Mode mode)

Create decoder.

bool create(const Device &device, Mode mode)
bool create(const Device &device, Flags flags)

Load decoder image.

static bool load(const char *name, Image &image, Mode &mode, Size size)
static bool load(Stream &stream, Image &image, Mode &mode, Size size)
TypeNameDescription
const char*nameImage name
ImageimageDecoder image.
DecoderJPEG::ModemodeDecoding mode.
SizesizeDecoding size.

Load texture from image.

Texture loadTexture(const Device &device, const char *name, Flags flags = Texture::DefaultFlags) const
Texture loadTexture(const Device &device, Stream &stream, Flags flags = Texture::DefaultFlags) const
TypeNameDescription
DevicedeviceDevice pointer.
const char*nameImage name.
Texture::FlagsflagsTexture flags.

Dispatch decoder.

bool dispatch(Compute &compute, Mode mode, Texture &dest, Texture &src, Slice dest_slice, Slice src_slice) const
bool dispatch(Compute &compute, Mode mode, Texture &dest, Texture &src, Slice src_slice) const
bool dispatch(Compute &compute, Mode mode, Texture &dest, Texture &src) const
TypeNameDescription
DecoderJPEG::ModemodeDecoder mode.
TexturedestDestination surface.
TexturesrcSource FFT surface.
Slicedest_sliceDestination texture slice.
Slicesrc_sliceSource texture slice.

Dispatch YUV converter.

bool dispatchYUV(Compute &compute, Mode mode, Texture &dest, Texture &src, Slice dest_slice, Slice src_slice) const
bool dispatchYUV(Compute &compute, Mode mode, Texture &dest, Texture &src, Slice src_slice) const
bool dispatchYUV(Compute &compute, Mode mode, Texture &dest, Texture &src) const
TypeNameDescription
DecoderJPEG::ModemodeDecoder mode.
TexturedestDestination surface.
TexturesrcSource YUV surface.
Slicedest_sliceDestination texture slice.
Slicesrc_sliceSource texture slice.

Enums

Mode

Decoder modes.

NameValue
ModeR0
ModeRG1
ModeRGBA2
ModeYUV4443
ModeYUV422H4
ModeYUV422V5
ModeYUV4206
NumModes7

Flags

Decoder flags.

NameValue
FlagNone0
FlagR(1 << ModeR)
FlagRG(1 << ModeRG)
FlagRGBA(1 << ModeRGBA)
FlagYUV444(1 << ModeYUV444)
FlagYUV422H(1 << ModeYUV422H)
FlagYUV422V(1 << ModeYUV422V)
FlagYUV420(1 << ModeYUV420)
FlagsAll(FlagR | FlagRG | FlagRGBA | FlagYUV444 | FlagYUV422H | FlagYUV422V | FlagYUV420)