TwiceAsNice
2019-02-18
|
Colour ConVerT: going from one colour space to another. More...
Functions | |
void | ccvt_420p_bgr24 (int width, int height, const void *src, void *dst) |
4:2:0 YUV planar to RGB/BGR More... | |
void | ccvt_420p_rgb24 (int width, int height, const void *src, void *dst) |
4:2:0 YUV planar to RGB/BGR More... | |
void | ccvt_420p_bgr32 (int width, int height, const void *src, void *dst) |
4:2:0 YUV planar to RGB/BGR More... | |
void | ccvt_420p_rgb32 (int width, int height, const void *src, void *dst) |
4:2:0 YUV planar to RGB/BGR More... | |
void | ccvt_yuyv_bgr32 (int width, int height, const void *src, void *dst) |
4:2:2 YUYV interlaced to RGB/BGR More... | |
void | ccvt_yuyv_bgr24 (int width, int height, const void *src, void *dst) |
4:2:2 YUYV interlaced to BGR24 More... | |
void | ccvt_yuyv_rgb24 (int width, int height, const void *src, void *dst) |
4:2:2 YUYV interlaced to RGB24 More... | |
void | ccvt_yuyv_420p (int width, int height, const void *src, void *dsty, void *dstu, void *dstv) |
4:2:2 YUYV interlaced to 4:2:0 YUV planar More... | |
void | ccvt_rgb24_420p (int width, int height, const void *src, void *dsty, void *dstu, void *dstv) |
RGB/BGR to 4:2:0 YUV planar. More... | |
void | ccvt_bgr24_420p (int width, int height, const void *src, void *dsty, void *dstu, void *dstv) |
RGB/BGR to 4:2:0 YUV planar. More... | |
void | ccvt_bgr24_bgr32 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_bgr24_rgb32 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_bgr32_bgr24 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_bgr32_rgb24 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_rgb24_bgr32 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_rgb24_rgb32 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_rgb32_bgr24 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
void | ccvt_rgb32_rgb24 (int width, int height, const void *const src, void *const dst) |
RGB/BGR to RGB/BGR. More... | |
int | RGB2YUV (int x_dim, int y_dim, void *bmp, void *y_out, void *u_out, void *v_out, int flip) |
RGB to YUV. More... | |
int | BGR2YUV (int x_dim, int y_dim, void *bmp, void *y_out, void *u_out, void *v_out, int flip) |
BGR to YUV. More... | |
int | mjpegtoyuv420p (unsigned char *map, unsigned char *cap_map, int width, int height, unsigned int size) |
mjpegtoyuv420p MPEG to YUV 420 P More... | |
void | bayer2rgb24 (unsigned char *dst, unsigned char *src, long int WIDTH, long int HEIGHT) |
Bayer 8bit to RGB 24. More... | |
void | bayer16_2_rgb24 (unsigned short *dst, unsigned short *src, long int WIDTH, long int HEIGHT) |
Bayer 16 bit to RGB 24. More... | |
void | bayer_rggb_2rgb24 (unsigned char *dst, unsigned char *srcc, long int WIDTH, long int HEIGHT) |
Bayer RGGB to RGB 24. More... | |
void | bayer_grbg_to_rgb24 (unsigned char *dst, unsigned char *srcc, long int WIDTH, long int HEIGHT) |
Colour ConVerT: going from one colour space to another.
Format descriptions:
420i = "4:2:0 interlaced"
YYYY UU YYYY UU even lines
YYYY VV YYYY VV odd lines
U/V data is subsampled by 2 both in horizontal and vertical directions, and intermixed with the Y values.
420p = "4:2:0 planar"
YYYYYYYY N lines
UUUU N/2 lines
VVVV N/2 lines
U/V is again subsampled, but all the Ys, Us and Vs are placed together in separate buffers. The buffers may be placed in one piece of contiguous memory though, with Y buffer first, followed by U, followed by V.
yuyv = "4:2:2 interlaced"
YUYV YUYV YUYV ... N lines
The U/V data is subsampled by 2 in horizontal direction only.
bgr24 = 3 bytes per pixel, in the order Blue Green Red (whoever came up with that idea...)
rgb24 = 3 bytes per pixel, in the order Red Green Blue (which is sensible)
rgb32 = 4 bytes per pixel, in the order Red Green Blue Alpha, with Alpha really being a filler byte (0)
bgr32 = last but not least, 4 bytes per pixel, in the order Blue Green Red Alpha, Alpha again a filler byte (0)
void bayer16_2_rgb24 | ( | unsigned short * | dst, |
unsigned short * | src, | ||
long int | WIDTH, | ||
long int | HEIGHT | ||
) |
Bayer 16 bit to RGB 24.
Bayer 8bit to RGB 24.
void bayer_grbg_to_rgb24 | ( | unsigned char * | dst, |
unsigned char * | srcc, | ||
long int | WIDTH, | ||
long int | HEIGHT | ||
) |
void bayer_rggb_2rgb24 | ( | unsigned char * | dst, |
unsigned char * | srcc, | ||
long int | WIDTH, | ||
long int | HEIGHT | ||
) |
Bayer RGGB to RGB 24.
int BGR2YUV | ( | int | x_dim, |
int | y_dim, | ||
void * | bmp, | ||
void * | y_out, | ||
void * | u_out, | ||
void * | v_out, | ||
int | flip | ||
) |
BGR to YUV.
void ccvt_420p_bgr24 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:0 YUV planar to RGB/BGR
void ccvt_420p_bgr32 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:0 YUV planar to RGB/BGR
void ccvt_420p_rgb24 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:0 YUV planar to RGB/BGR
void ccvt_420p_rgb32 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:0 YUV planar to RGB/BGR
void ccvt_bgr24_420p | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dsty, | ||
void * | dstu, | ||
void * | dstv | ||
) |
RGB/BGR to 4:2:0 YUV planar.
RGB/BGR to RGB/BGR.
RGB/BGR to RGB/BGR.
RGB/BGR to RGB/BGR.
RGB/BGR to RGB/BGR.
void ccvt_rgb24_420p | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dsty, | ||
void * | dstu, | ||
void * | dstv | ||
) |
RGB/BGR to 4:2:0 YUV planar.
RGB/BGR to RGB/BGR.
RGB/BGR to RGB/BGR.
RGB/BGR to RGB/BGR.
RGB/BGR to RGB/BGR.
void ccvt_yuyv_420p | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dsty, | ||
void * | dstu, | ||
void * | dstv | ||
) |
4:2:2 YUYV interlaced to 4:2:0 YUV planar
void ccvt_yuyv_bgr24 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:2 YUYV interlaced to BGR24
void ccvt_yuyv_bgr32 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:2 YUYV interlaced to RGB/BGR
4:2:2 YUYV interlaced to RGB/BGR
void ccvt_yuyv_rgb24 | ( | int | width, |
int | height, | ||
const void * | src, | ||
void * | dst | ||
) |
4:2:2 YUYV interlaced to RGB24
int mjpegtoyuv420p | ( | unsigned char * | map, |
unsigned char * | cap_map, | ||
int | width, | ||
int | height, | ||
unsigned int | size | ||
) |
mjpegtoyuv420p MPEG to YUV 420 P
Return values -1 on fatal error 0 on success 2 if jpeg lib threw a "corrupt jpeg data" warning. in this case, "a damaged output image is likely."
Copyright 2000 by Jeroen Vreeken (pe1rx) 2006 by Krzysztof Blaszkowski ( q@am sat.o rgkb@sy) 2007 by Angel Carpinteo ( smik ro.co m.plack@t) elef onica .net
int RGB2YUV | ( | int | x_dim, |
int | y_dim, | ||
void * | bmp, | ||
void * | y_out, | ||
void * | u_out, | ||
void * | v_out, | ||
int | flip | ||
) |
RGB to YUV.