From b0033d9310c13eee8fd8268ec0ea16af91c92e6e Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Thu, 7 Jun 2018 16:25:22 +0200 Subject: lib/color_encoding: Prepare support for HDR modes, v2. We're starting to add support for 10, 12 and 16-bits formats that all have different values for the Y offset and range. Some 10 bits formats go from [0...1023], others go to [0...1023] shifted left by 6. To accomodate all formats add a struct definition for all various formats, this can be extended further when we add new formats. Changes since v1: - Rebase on top of added yuv changes. - Add commit description (swatish) - Add missing newline. (swatish) Signed-off-by: Maarten Lankhorst Reviewed-by: Juha-Pekka Heikkila #v1 --- lib/igt_color_encoding.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/igt_color_encoding.h') diff --git a/lib/igt_color_encoding.h b/lib/igt_color_encoding.h index 3884e493..db45b16d 100644 --- a/lib/igt_color_encoding.h +++ b/lib/igt_color_encoding.h @@ -25,6 +25,7 @@ #define __IGT_COLOR_ENCODING_H__ #include +#include #include "igt_matrix.h" @@ -44,9 +45,13 @@ enum igt_color_range { const char *igt_color_encoding_to_str(enum igt_color_encoding encoding); const char *igt_color_range_to_str(enum igt_color_range range); -struct igt_mat4 igt_ycbcr_to_rgb_matrix(enum igt_color_encoding color_encoding, +struct igt_mat4 igt_ycbcr_to_rgb_matrix(uint32_t ycbcr_fourcc, + uint32_t rgb_fourcc, + enum igt_color_encoding color_encoding, enum igt_color_range color_range); -struct igt_mat4 igt_rgb_to_ycbcr_matrix(enum igt_color_encoding color_encoding, +struct igt_mat4 igt_rgb_to_ycbcr_matrix(uint32_t rgb_fourcc, + uint32_t ycbcr_fourcc, + enum igt_color_encoding color_encoding, enum igt_color_range color_range); #endif /* __IGT_COLOR_ENCODING_H__ */ -- cgit v1.2.3