diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-06-02 12:14:11 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-06-02 12:14:11 +0300 |
commit | cb0786049f960f2bd383617151b01318e02e9ff9 (patch) | |
tree | 8dbce2679b0b87e9edf971efc87a05c1550d0ffb /kms++util/inc | |
parent | 719f72a065f07c59e77a25b1f23daccb5369cf81 (diff) | |
parent | 7450c364a57ec7d9e2abd61ac6e025c53e9e7a42 (diff) |
Merge branch 'color-features' of git://github.com/jsarha/kmsxx
Diffstat (limited to 'kms++util/inc')
-rw-r--r-- | kms++util/inc/kms++util/color.h | 12 | ||||
-rw-r--r-- | kms++util/inc/kms++util/kms++util.h | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/kms++util/inc/kms++util/color.h b/kms++util/inc/kms++util/color.h index ba2ed25..f378433 100644 --- a/kms++util/inc/kms++util/color.h +++ b/kms++util/inc/kms++util/color.h @@ -6,6 +6,14 @@ namespace kms { struct YUV; +enum class YUVType { + BT601_Lim = 0, + BT601_Full, + BT709_Lim, + BT709_Full, + MAX, +}; + struct RGB { RGB(); @@ -19,7 +27,7 @@ struct RGB uint32_t abgr8888() const; uint16_t rgb565() const; uint16_t bgr565() const; - YUV yuv() const; + YUV yuv(YUVType type = YUVType::BT601_Lim) const; uint8_t b; uint8_t g; @@ -31,7 +39,7 @@ struct YUV { YUV(); YUV(uint8_t y, uint8_t u, uint8_t v); - YUV(const RGB& rgb); + YUV(const RGB& rgb, YUVType type = YUVType::BT601_Lim); uint8_t v; uint8_t u; diff --git a/kms++util/inc/kms++util/kms++util.h b/kms++util/inc/kms++util/kms++util.h index c1e3c8c..d45497e 100644 --- a/kms++util/inc/kms++util/kms++util.h +++ b/kms++util/inc/kms++util/kms++util.h @@ -26,7 +26,7 @@ void draw_text(IMappedFramebuffer& buf, uint32_t x, uint32_t y, const std::strin void draw_color_bar(IMappedFramebuffer& buf, int old_xpos, int xpos, int width); -void draw_test_pattern(IMappedFramebuffer &fb); +void draw_test_pattern(IMappedFramebuffer &fb, YUVType yuvt = YUVType::BT601_Lim); } #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) |