f84fc689d6c0d28406b6acfac2d55a87977648bb
[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 }