Home | History | Annotate | Download | only in camera

Lines Matching defs:rgb

29  * NOTE: RGB and big/little endian considerations. Wherewer in this code RGB
34 * const uint32_t rgb = *reinterpret_cast<const uint32_t*>(framebuffer);
36 * So, if this code runs on the little endian CPU, red color in 'rgb' would be
38 * the code runs on a big endian CPU, the red color in 'rgb' would be masked as
77 * Extracting, and saving color bytes from / to WORD / DWORD RGB.
82 #define R16(rgb) static_cast<uint8_t>(rgb & kRed5)
83 #define G16(rgb) static_cast<uint8_t>((rgb & kGreen6) >> 5)
84 #define B16(rgb) static_cast<uint8_t>((rgb & kBlue5) >> 11)
86 #define R16_32(rgb) static_cast<uint8_t>(((rgb & kRed5) << 3) | ((rgb & kRed5) >> 2))
87 #define G16_32(rgb) static_cast<uint8_t>(((rgb & kGreen6) >> 3) | ((rgb & kGreen6) >> 9))
88 #define B16_32(rgb) static_cast<uint8_t>(((rgb & kBlue5) >> 8) | ((rgb & kBlue5) >> 14))
90 #define R32(rgb) static_cast<uint8_t>(rgb & kRed8)
91 #define G32(rgb) static_cast<uint8_t>(((rgb & kGreen8) >> 8) & 0xff)
92 #define B32(rgb) static_cast<uint8_t>(((rgb & kBlue8) >> 16) & 0xff)
99 #define R16(rgb) static_cast<uint8_t>((rgb & kRed5) >> 11)
100 #define G16(rgb) static_cast<uint8_t>((rgb & kGreen6) >> 5)
101 #define B16(rgb) static_cast<uint8_t>(rgb & kBlue5)
103 #define R16_32(rgb) static_cast<uint8_t>(((rgb & kRed5) >> 8) | ((rgb & kRed5) >> 14))
104 #define G16_32(rgb) static_cast<uint8_t>(((rgb & kGreen6) >> 3) | ((rgb & kGreen6) >> 9))
105 #define B16_32(rgb) static_cast<uint8_t>(((rgb & kBlue5) << 3) | ((rgb & kBlue5) >> 2))
107 #define R32(rgb) static_cast<uint8_t>((rgb & kRed8) >> 16)
108 #define G32(rgb) static_cast<uint8_t>((rgb & kGreen8) >> 8)
109 #define B32(rgb) static_cast<uint8_t>(rgb & kBlue8)
116 /* An union that simplifies breaking 32 bit RGB into separate R, G, and B colors.
141 * Basics of RGB -> YUV conversion
145 * RGB -> YUV conversion macros
162 RGB565ToYUV(uint16_t rgb, uint8_t* y, uint8_t* u, uint8_t* v)
164 R8G8B8ToYUV(R16_32(rgb), G16_32(rgb), B16_32(rgb), y, u, v);
169 RGB32ToYUV(uint32_t rgb, uint8_t* y, uint8_t* u, uint8_t* v)
172 rgb_c.color = rgb;
177 * Basics of YUV -> RGB conversion.
178 * Note that due to the fact that guest uses RGB only on preview window, and the
179 * RGB format that is used is RGB565, we can limit YUV -> RGB conversions to
184 * YUV -> RGB conversion macros
222 RGB32_t rgb;
223 rgb.r = YUV2RO(y,u,v) & 0xff;
224 rgb.g = YUV2GO(y,u,v) & 0xff;
225 rgb.b = YUV2BO(y,u,v) & 0xff;
226 return rgb.color;
259 * rgb - RGB565 framebuffer.
262 void YV12ToRGB565(const void* yv12, void* rgb, int width, int height);
267 * rgb - RGB32 framebuffer.
270 void YV12ToRGB32(const void* yv12, void* rgb, int width, int height);
275 * rgb - RGB32 framebuffer.
278 void YU12ToRGB32(const void* yu12, void* rgb, int width, int height);
283 * rgb - RGB565 framebuffer.
286 void NV12ToRGB565(const void* nv12, void* rgb, int width, int height);
291 * rgb - RGB32 framebuffer.
294 void NV12ToRGB32(const void* nv12, void* rgb, int width, int height);
299 * rgb - RGB565 framebuffer.
302 void NV21ToRGB565(const void* nv21, void* rgb, int width, int height);
307 * rgb - RGB32 framebuffer.
310 void NV21ToRGB32(const void* nv21, void* rgb, int width, int height);