]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/blob - libkmstest/color.h
libkmstest: cleanup colors and add xbgr8888 support
[android/external-libkmsxx.git] / libkmstest / color.h
1 #pragma once
3 #include <cstdint>
5 namespace kms
6 {
7 struct YUV;
9 struct RGB
10 {
11         RGB();
12         RGB(uint8_t r, uint8_t g, uint8_t b);
14         uint32_t rgb888() const;
15         uint32_t bgr888() const;
16         uint16_t rgb565() const;
17         YUV yuv() const;
19         struct
20         {
21                 uint8_t b;
22                 uint8_t g;
23                 uint8_t r;
24                 uint8_t a;
25         };
26 };
28 struct YUV
29 {
30         YUV();
31         YUV(uint8_t y, uint8_t u, uint8_t v);
32         YUV(const RGB& rgb);
34         struct
35         {
36                 uint8_t v;
37                 uint8_t u;
38                 uint8_t y;
39                 uint8_t a;
40         };
41 };
42 }