MythTV  master
Macros | Typedefs | Functions | Variables
yuv2rgb.h File Reference
#include <cinttypes>
Include dependency graph for yuv2rgb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MODE_RGB   0x1
 
#define MODE_BGR   0x2
 

Typedefs

typedef void(* yuv2rgb_fun) (uint8_t *image, uint8_t *py, uint8_t *pu, uint8_t *pv, int h_size, int v_size, int rgb_stride, int y_stride, int uv_stride, int alphaones)
 
typedef void(* conv_i420_2vuy_fun) (uint8_t *image, int vuy_stride, const uint8_t *py, const uint8_t *pu, const uint8_t *pv, int y_stride, int u_stride, int v_stride, int h_size, int v_size)
 
typedef void(* conv_2vuy_i420_fun) (uint8_t *py, uint8_t *pu, uint8_t *pv, int y_stride, int u_stride, int v_stride, const uint8_t *image, int vuy_stride, int h_size, int v_size)
 

Functions

void yuv2rgb_init (int bpp, int mode)
 
yuv2rgb_fun yuv2rgb_init_mmxext (int bpp, int mode)
 This returns a yuv to rgba converter, using mmxext if MMX was compiled in. More...
 
yuv2rgb_fun yuv2rgb_init_mmx (int bpp, int mode)
 This returns a yuv to rgba converter, using mmx if MMX was compiled in. More...
 
void rgb32_to_yuv420p (unsigned char *lum, unsigned char *cb, unsigned char *cr, unsigned char *alpha, unsigned char *src, int width, int height, int srcwidth)
 Convert planar RGB to YUV420. More...
 
conv_i420_2vuy_fun get_i420_2vuy_conv (void)
 Returns I420 to 2VUY conversion function. More...
 
conv_2vuy_i420_fun get_2vuy_i420_conv (void)
 Returns 2VUY to I420 conversion function. More...
 

Variables

yuv2rgb_fun yuv2rgb
 

Macro Definition Documentation

◆ MODE_RGB

#define MODE_RGB   0x1

Definition at line 29 of file yuv2rgb.h.

◆ MODE_BGR

#define MODE_BGR   0x2

Definition at line 30 of file yuv2rgb.h.

Typedef Documentation

◆ yuv2rgb_fun

typedef void(* yuv2rgb_fun) (uint8_t *image, uint8_t *py, uint8_t *pu, uint8_t *pv, int h_size, int v_size, int rgb_stride, int y_stride, int uv_stride, int alphaones)

Definition at line 32 of file yuv2rgb.h.

◆ conv_i420_2vuy_fun

typedef void(* conv_i420_2vuy_fun) (uint8_t *image, int vuy_stride, const uint8_t *py, const uint8_t *pu, const uint8_t *pv, int y_stride, int u_stride, int v_stride, int h_size, int v_size)

Definition at line 53 of file yuv2rgb.h.

◆ conv_2vuy_i420_fun

typedef void(* conv_2vuy_i420_fun) (uint8_t *py, uint8_t *pu, uint8_t *pv, int y_stride, int u_stride, int v_stride, const uint8_t *image, int vuy_stride, int h_size, int v_size)

Definition at line 62 of file yuv2rgb.h.

Function Documentation

◆ yuv2rgb_init()

void yuv2rgb_init ( int  bpp,
int  mode 
)

◆ yuv2rgb_init_mmxext()

yuv2rgb_fun yuv2rgb_init_mmxext ( int  bpp,
int  mode 
)

This returns a yuv to rgba converter, using mmxext if MMX was compiled in.

Parameters
modemust be MODE_RGB
bppmust be 32
Returns
function pointer or nullptr if converter could not be found.

Definition at line 360 of file yuv2rgb.cpp.

◆ yuv2rgb_init_mmx()

yuv2rgb_fun yuv2rgb_init_mmx ( int  bpp,
int  mode 
)

This returns a yuv to rgba converter, using mmx if MMX was compiled in.

Parameters
modemust be MODE_RGB
bppmust be 32
Returns
function pointer or nullptr if converter could not be found.

Definition at line 384 of file yuv2rgb.cpp.

◆ rgb32_to_yuv420p()

void rgb32_to_yuv420p ( unsigned char *  lum,
unsigned char *  cb,
unsigned char *  cr,
unsigned char *  alpha,
unsigned char *  src,
int  width,
int  height,
int  srcwidth 
)

Convert planar RGB to YUV420.

Despite the name, this actually converts to i420

Definition at line 499 of file yuv2rgb.cpp.

◆ get_i420_2vuy_conv()

conv_i420_2vuy_fun get_i420_2vuy_conv ( void  )

Returns I420 to 2VUY conversion function.

See http://developer.apple.com/quicktime/icefloe/dispatch019.html for a complete description of 2VUY and fourcc.org for YUV 4:2:0.

2vuy is a like a 8-bit per component YUV 4:2:2, but it's actually a Y'Cb'Cr sampling. 2vuy is packed with bytes [Cb, Y, Cr, Y] representing two pixels.

Returns
A pointer to a I420 to 2VUY conversion function, which uses Altivec or MMX when supported.

Definition at line 1017 of file yuv2rgb.cpp.

◆ get_2vuy_i420_conv()

conv_2vuy_i420_fun get_2vuy_i420_conv ( void  )

Returns 2VUY to I420 conversion function.

See http://developer.apple.com/quicktime/icefloe/dispatch019.html for a complete description of 2VUY and fourcc.org for YUV 4:2:0.

2vuy is a like a 8-bit per component YUV 4:2:2, but it's actually a Y'Cb'Cr sampling. 2vuy is packed with bytes [Cb, Y, Cr, Y] representing two pixels.

Returns
A pointer to a 2VUY to I420 conversion function, which uses Altivec when supported.

Definition at line 1211 of file yuv2rgb.cpp.

Variable Documentation

◆ yuv2rgb

yuv2rgb_fun yuv2rgb