diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-06-07 16:25:22 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-02-13 13:01:56 +0100 |
commit | b0033d9310c13eee8fd8268ec0ea16af91c92e6e (patch) | |
tree | 4e93d47c0f132a181f28ff7035a78efd425aafc6 /lib/igt_color_encoding.h | |
parent | 368237db1149033d8274248489ffec671ea1f7d8 (diff) |
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 <maarten.lankhorst@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> #v1
Diffstat (limited to 'lib/igt_color_encoding.h')
-rw-r--r-- | lib/igt_color_encoding.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 <stdbool.h> +#include <stdint.h> #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__ */ |