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

Graphics::YUVToRGBManager Class Reference

#include <yuv_to_rgb.h>

Inheritance diagram for Graphics::YUVToRGBManager:
Collaboration diagram for Graphics::YUVToRGBManager:

List of all members.

Public Types

enum  LuminanceScale { kScaleFull, kScaleITU }
 

The scale of the luminance values.

More...

Public Member Functions

void convert444 (Graphics::Surface *dst, LuminanceScale scale, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch)
 Convert a YUV444 image to an RGB surface.
void convert420 (Graphics::Surface *dst, LuminanceScale scale, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch)
 Convert a YUV420 image to an RGB surface.
void convert410 (Graphics::Surface *dst, LuminanceScale scale, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch)
 Convert a YUV410 image to an RGB surface.

Private Member Functions

 YUVToRGBManager ()
 ~YUVToRGBManager ()
const YUVToRGBLookupgetLookup (Graphics::PixelFormat format, LuminanceScale scale)

Private Attributes

YUVToRGBLookup_lookup
int16 _colorTab [4 *256]

Friends

class Common::Singleton< SingletonBaseType >

Detailed Description

Definition at line 46 of file yuv_to_rgb.h.


Member Enumeration Documentation

The scale of the luminance values.

Enumerator:
kScaleFull 
kScaleITU 

Luminance values range from [0, 255].

Luminance values range from [16, 235], the range from ITU-R BT.601

Definition at line 49 of file yuv_to_rgb.h.


Constructor & Destructor Documentation

Graphics::YUVToRGBManager::YUVToRGBManager (  )  [private]

Definition at line 160 of file yuv_to_rgb.cpp.

Graphics::YUVToRGBManager::~YUVToRGBManager (  )  [private]

Definition at line 182 of file yuv_to_rgb.cpp.


Member Function Documentation

void Graphics::YUVToRGBManager::convert410 ( Graphics::Surface dst,
YUVToRGBManager::LuminanceScale  scale,
const byte ySrc,
const byte uSrc,
const byte vSrc,
int  yWidth,
int  yHeight,
int  yPitch,
int  uvPitch 
)

Convert a YUV410 image to an RGB surface.

Since the chroma has a very low resolution in 410, we perform bilinear scaling on the two chroma planes to produce the image. The chroma planes must have at least one extra row and one extra column that can be read from in order to produce a proper image. It is suggested that you fill these in with the previous row and column's data. This is required in order to speed up this function.

Parameters:
dst the destination surface
scale the scale of the luminance values
ySrc the source of the y component
uSrc the source of the u component
vSrc the source of the v component
yWidth the width of the y surface (must be divisible by 4)
yHeight the height of the y surface (must be divisible by 4)
yPitch the pitch of the y surface
uvPitch the pitch of the u and v surfaces

Definition at line 369 of file yuv_to_rgb.cpp.

void Graphics::YUVToRGBManager::convert420 ( Graphics::Surface dst,
YUVToRGBManager::LuminanceScale  scale,
const byte ySrc,
const byte uSrc,
const byte vSrc,
int  yWidth,
int  yHeight,
int  yPitch,
int  uvPitch 
)

Convert a YUV420 image to an RGB surface.

Parameters:
dst the destination surface
scale the scale of the luminance values
ySrc the source of the y component
uSrc the source of the u component
vSrc the source of the v component
yWidth the width of the y surface (must be divisible by 2)
yHeight the height of the y surface (must be divisible by 2)
yPitch the pitch of the y surface
uvPitch the pitch of the u and v surfaces

Definition at line 284 of file yuv_to_rgb.cpp.

void Graphics::YUVToRGBManager::convert444 ( Graphics::Surface dst,
YUVToRGBManager::LuminanceScale  scale,
const byte ySrc,
const byte uSrc,
const byte vSrc,
int  yWidth,
int  yHeight,
int  yPitch,
int  uvPitch 
)

Convert a YUV444 image to an RGB surface.

Parameters:
dst the destination surface
scale the scale of the luminance values
ySrc the source of the y component
uSrc the source of the u component
vSrc the source of the v component
yWidth the width of the y surface
yHeight the height of the y surface
yPitch the pitch of the y surface
uvPitch the pitch of the u and v surfaces

Definition at line 230 of file yuv_to_rgb.cpp.

const YUVToRGBLookup * Graphics::YUVToRGBManager::getLookup ( Graphics::PixelFormat  format,
YUVToRGBManager::LuminanceScale  scale 
) [private]

Definition at line 186 of file yuv_to_rgb.cpp.


Friends And Related Function Documentation

friend class Common::Singleton< SingletonBaseType > [friend]

Definition at line 106 of file yuv_to_rgb.h.


Member Data Documentation

Definition at line 113 of file yuv_to_rgb.h.

Definition at line 112 of file yuv_to_rgb.h.


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


Generated on Sat Sep 21 2019 05:03:40 for ResidualVM by doxygen 1.7.1
curved edge   curved edge