38 #define RGB24_TO_Y(r,g,b) LutYr[(r)] + LutYg[(g)] + LutYb[(b)] 39 #define YR_TO_V(r,y) LutVr[(r)] + LutVrY[(y)] 40 #define YB_TO_U(b,y) LutUb[(b)] + LutUbY[(y)] 42 #define R_FROMYV(y,v) CLIP((y) + LutRv[(v)]) 43 #define G_FROMYUV(y,u,v) CLIP((y) + LutGu[(u)] + LutGv[(v)]) 44 #define B_FROMYU(y,u) CLIP((y) + LutBu[(u)]) 48 RGB24_TO_Y(
unsigned char r,
unsigned char g,
unsigned char b)
68 G_FROMYUV(
unsigned char y,
unsigned char u,
unsigned char v)
84 #define Vrcoef 711 //656 //877 85 #define Ubcoef 560 //500 //493 564 88 #define CoefGu 714 // 344 89 #define CoefGv 344 // 714 92 LutYr = malloc(256*
sizeof(
int));
93 LutYg = malloc(256*
sizeof(
int));
94 LutYb = malloc(256*
sizeof(
int));
95 LutVr = malloc(256*
sizeof(
int));
96 LutVrY = malloc(256*
sizeof(
int));
97 LutUb = malloc(256*
sizeof(
int));
98 LutUbY = malloc(256*
sizeof(
int));
100 LutRv = malloc(256*
sizeof(
int));
101 LutGu = malloc(256*
sizeof(
int));
102 LutGv = malloc(256*
sizeof(
int));
103 LutBu = malloc(256*
sizeof(
int));
104 for (i= 0;i < 256;i++){
unsigned char B_FROMYU(unsigned char y, unsigned char u)
unsigned char YB_TO_U(unsigned char b, unsigned char y)
unsigned char YR_TO_V(unsigned char r, unsigned char y)
unsigned char RGB24_TO_Y(unsigned char r, unsigned char g, unsigned char b)
unsigned char G_FROMYUV(unsigned char y, unsigned char u, unsigned char v)
unsigned char R_FROMYV(unsigned char y, unsigned char v)