diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-10-16 11:35:44 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-10-17 11:09:49 +0300 |
commit | 47e808023f98f74673906ef7de34e774cd26f52b (patch) | |
tree | 61692a33768f49d508ac92f8b64af2f8c4e8c0dc /kms++util/src/color.cpp | |
parent | ff9de1ab494ee5d48dba7aa84dfa1ce114464f09 (diff) |
Add AR12 & AR15 support
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++util/src/color.cpp')
-rw-r--r-- | kms++util/src/color.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kms++util/src/color.cpp b/kms++util/src/color.cpp index 2e6f217..2a41502 100644 --- a/kms++util/src/color.cpp +++ b/kms++util/src/color.cpp @@ -59,6 +59,16 @@ uint16_t RGB::bgr565() const return ((b >> 3) << 11) | ((g >> 2) << 5) | ((r >> 3) << 0); } +uint16_t RGB::argb4444() const +{ + return ((a >> 4) << 12) | ((r >> 4) << 8) | ((g >> 4) << 4) | ((b >> 4) << 0); +} + +uint16_t RGB::argb1555() const +{ + return ((!!a) << 15) | ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3) << 0); +} + YUV RGB::yuv(YUVType type) const { return YUV(*this, type); |