Skip to content

Commit a355b3d

Browse files
Harry Wentlandemersion
authored andcommitted
drm/colorop: add BT2020/BT709 OETF and Inverse OETF
The BT.709 and BT.2020 OETFs are the same, the only difference being that the BT.2020 variant is defined with more precision for 10 and 12-bit per color encodings. Both are used as encoding functions for video content, and are therefore defined as OETF (opto-electronic transfer function) instead of as EOTF (electro-optical transfer function). Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patch.msgid.link/20251115000237.3561250-34-alex.hung@amd.com
1 parent ef3d703 commit a355b3d

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

drivers/gpu/drm/drm_colorop.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ static const char * const colorop_curve_1d_type_names[] = {
7272
[DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF] = "sRGB Inverse EOTF",
7373
[DRM_COLOROP_1D_CURVE_PQ_125_EOTF] = "PQ 125 EOTF",
7474
[DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF] = "PQ 125 Inverse EOTF",
75+
[DRM_COLOROP_1D_CURVE_BT2020_INV_OETF] = "BT.2020 Inverse OETF",
76+
[DRM_COLOROP_1D_CURVE_BT2020_OETF] = "BT.2020 OETF",
7577
};
7678

7779
/* Init Helpers */

include/drm/drm_colorop.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,29 @@ enum drm_colorop_curve_1d_type {
8282
*/
8383
DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF,
8484

85+
/**
86+
* @DRM_COLOROP_1D_CURVE_BT2020_INV_OETF:
87+
*
88+
* enum string "BT.2020 Inverse OETF"
89+
*
90+
* The inverse of &DRM_COLOROP_1D_CURVE_BT2020_OETF
91+
*/
92+
DRM_COLOROP_1D_CURVE_BT2020_INV_OETF,
93+
94+
/**
95+
* @DRM_COLOROP_1D_CURVE_BT2020_OETF:
96+
*
97+
* enum string "BT.2020 OETF"
98+
*
99+
* The BT.2020/BT.709 transfer function. The BT.709 and BT.2020
100+
* transfer functions are the same, the only difference is that
101+
* BT.2020 is defined with more precision for 10 and 12-bit
102+
* encodings.
103+
*
104+
*
105+
*/
106+
DRM_COLOROP_1D_CURVE_BT2020_OETF,
107+
85108
/**
86109
* @DRM_COLOROP_1D_CURVE_COUNT:
87110
*

0 commit comments

Comments
 (0)