f99a951de739b6368ee5d180de4138ec94c530d3
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);
13 RGB(uint8_t a, uint8_t r, uint8_t g, uint8_t b);
14 RGB(uint32_t argb);
16 uint32_t argb8888() const;
17 uint32_t abgr8888() const;
18 uint16_t rgb565() const;
19 YUV yuv() const;
21 uint8_t b;
22 uint8_t g;
23 uint8_t r;
24 uint8_t a;
25 };
27 struct YUV
28 {
29 YUV();
30 YUV(uint8_t y, uint8_t u, uint8_t v);
31 YUV(const RGB& rgb);
33 uint8_t v;
34 uint8_t u;
35 uint8_t y;
36 uint8_t a;
37 };
38 }