Commit 3930e906 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] vivid-tpg-colors: add AdobeRGB and BT.2020 support

This extends the precalculated tpg_csc_colors matrix with AdobeRGB and BT.2020
colorspace support.

It also adds two precalculated tables that convert between linear RGB and non-linear
Rec.709 R'G'B' values, i.e. the Rec. 709 transfer function. This is needed to
efficiently handle the BT.2020 Constant Luminance Yc'CbcCrc encoding and decoding.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1afed883
...@@ -59,6 +59,8 @@ enum tpg_color { ...@@ -59,6 +59,8 @@ enum tpg_color {
}; };
extern const struct color tpg_colors[TPG_COLOR_MAX]; extern const struct color tpg_colors[TPG_COLOR_MAX];
extern const struct color16 tpg_csc_colors[V4L2_COLORSPACE_SRGB + 1][TPG_COLOR_CSC_BLACK + 1]; extern const unsigned short tpg_rec709_to_linear[255 * 16 + 1];
extern const unsigned short tpg_linear_to_rec709[255 * 16 + 1];
extern const struct color16 tpg_csc_colors[V4L2_COLORSPACE_BT2020 + 1][TPG_COLOR_CSC_BLACK + 1];
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment