summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2017-07-27 05:22:29 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-08 06:09:41 -0400
commitc795e7d0900fa815bc7df72bd1db816764132935 (patch)
tree34b2360aa662d8b5465066d88224c64a53b4a67b /Documentation
parentfb98531e8916c65c1db0434b343d335574431843 (diff)
downloadlinux-c795e7d0900fa815bc7df72bd1db816764132935.tar.bz2
media: media/doc: improve the SMPTE 2084 documentation
Make note of the different luminance ranges between HDR and SDR. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/media/uapi/v4l/colorspaces-details.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/media/uapi/v4l/colorspaces-details.rst b/Documentation/media/uapi/v4l/colorspaces-details.rst
index 47d7d1915284..b5d551b9cc8f 100644
--- a/Documentation/media/uapi/v4l/colorspaces-details.rst
+++ b/Documentation/media/uapi/v4l/colorspaces-details.rst
@@ -793,3 +793,15 @@ Transfer function:
Inverse Transfer function:
L = (max(L':sup:`1/m2` - c1, 0) / (c2 - c3 *
L'\ :sup:`1/m2`))\ :sup:`1/m1`
+
+Take care when converting between this transfer function and non-HDR transfer
+functions: the linear RGB values [0…1] of HDR content map to a luminance range
+of 0 to 10000 cd/m\ :sup:`2` whereas the linear RGB values of non-HDR (aka
+Standard Dynamic Range or SDR) map to a luminance range of 0 to 100 cd/m\ :sup:`2`.
+
+To go from SDR to HDR you will have to divide L by 100 first. To go in the other
+direction you will have to multiply L by 100. Of course, this clamps all
+luminance values over 100 cd/m\ :sup:`2` to 100 cd/m\ :sup:`2`.
+
+There are better methods, see e.g. :ref:`colimg` for more in-depth information
+about this.