[PATCH V11 31/47] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

Qu Shengyu wiagn233 at outlook.com
Fri Aug 15 17:54:41 UTC 2025


Hello,

What actually is this OETF? Is it power 1/2.4? Or reversed BT.1886?

Best regards,
Shengyu

________________________________
发件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Alex Hung <alex.hung at amd.com>
发送时间: Friday, August 15, 2025 11:50:20 AM
收件人: dri-devel at lists.freedesktop.org <dri-devel at lists.freedesktop.org>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
抄送: wayland-devel at lists.freedesktop.org <wayland-devel at lists.freedesktop.org>; harry.wentland at amd.com <harry.wentland at amd.com>; alex.hung at amd.com <alex.hung at amd.com>; leo.liu at amd.com <leo.liu at amd.com>; ville.syrjala at linux.intel.com <ville.syrjala at linux.intel.com>; pekka.paalanen at collabora.com <pekka.paalanen at collabora.com>; contact at emersion.fr <contact at emersion.fr>; mwen at igalia.com <mwen at igalia.com>; jadahl at redhat.com <jadahl at redhat.com>; sebastian.wick at redhat.com <sebastian.wick at redhat.com>; shashank.sharma at amd.com <shashank.sharma at amd.com>; agoins at nvidia.com <agoins at nvidia.com>; joshua at froggi.es <joshua at froggi.es>; mdaenzer at redhat.com <mdaenzer at redhat.com>; aleixpol at kde.org <aleixpol at kde.org>; xaver.hugl at gmail.com <xaver.hugl at gmail.com>; victoria at system76.com <victoria at system76.com>; daniel at ffwll.ch <daniel at ffwll.ch>; uma.shankar at intel.com <uma.shankar at intel.com>; quic_naseer at quicinc.com <quic_naseer at quicinc.com>; quic_cbraga at quicinc.com <quic_cbraga at quicinc.com>; quic_abhinavk at quicinc.com <quic_abhinavk at quicinc.com>; marcan at marcan.st <marcan at marcan.st>; Liviu.Dudau at arm.com <Liviu.Dudau at arm.com>; sashamcintosh at google.com <sashamcintosh at google.com>; chaitanya.kumar.borah at intel.com <chaitanya.kumar.borah at intel.com>; louis.chauvet at bootlin.com <louis.chauvet at bootlin.com>; mcanal at igalia.com <mcanal at igalia.com>; nfraprado at collabora.com <nfraprado at collabora.com>; Daniel Stone <daniels at collabora.com>
主题: [PATCH V11 31/47] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

From: Harry Wentland <harry.wentland at amd.com>

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 at amd.com>
Signed-off-by: Harry Wentland <harry.wentland at amd.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Simon Ser <contact at emersion.fr>
---
v9:
 - Move DRM_COLOROP_1D_CURVE_BT2020_* from middle to end (Simon Ser)

 drivers/gpu/drm/drm_colorop.c |  2 ++
 include/drm/drm_colorop.h     | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
index 5bb45963fa1f..c245a3ff45d3 100644
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -72,6 +72,8 @@ static const char * const colorop_curve_1d_type_names[] = {
         [DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF] = "sRGB Inverse EOTF",
         [DRM_COLOROP_1D_CURVE_PQ_125_EOTF] = "PQ 125 EOTF",
         [DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF] = "PQ 125 Inverse EOTF",
+       [DRM_COLOROP_1D_CURVE_BT2020_INV_OETF] = "BT.2020 Inverse OETF",
+       [DRM_COLOROP_1D_CURVE_BT2020_OETF] = "BT.2020 OETF",
 };


diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
index a38c90f61dc6..c6d2b289e3cf 100644
--- a/include/drm/drm_colorop.h
+++ b/include/drm/drm_colorop.h
@@ -83,6 +83,29 @@ enum drm_colorop_curve_1d_type {
          */
         DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF,

+       /**
+        * @DRM_COLOROP_1D_CURVE_BT2020_INV_OETF:
+        *
+        * enum string "BT.2020 Inverse OETF"
+        *
+        * The inverse of &DRM_COLOROP_1D_CURVE_BT2020_OETF
+        */
+       DRM_COLOROP_1D_CURVE_BT2020_INV_OETF,
+
+       /**
+        * @DRM_COLOROP_1D_CURVE_BT2020_OETF:
+        *
+        * enum string "BT.2020 OETF"
+        *
+        * The BT.2020/BT.709 transfer function. The BT.709 and BT.2020
+        * transfer functions are the same, the only difference is that
+        * BT.2020 is defined with more precision for 10 and 12-bit
+        * encodings.
+        *
+        *
+        */
+       DRM_COLOROP_1D_CURVE_BT2020_OETF,
+
         /**
          * @DRM_COLOROP_1D_CURVE_COUNT:
          *
--
2.43.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20250815/d5a5c9c7/attachment-0001.htm>


More information about the amd-gfx mailing list