Skip to content

Commit 0557fcc

Browse files
committed
[css-color-hdr] Explain where the eps factor comes from, and what it is for #11788
1 parent 91ea6d1 commit 0557fcc

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

css-color-hdr-1/Overview.bs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ WPT Display: open
126126
"abstract": "This standard specifies an EOTF characterizing high-dynamic-range reference displays used primarily for mastering non-broadcast content. This standard also specifies an Inverse-EOTF derived from the EOTF.",
127127
"isbn": "978-1-61482-829-7"
128128
},
129+
"SMPTE-ST-2094-50": {
130+
"href": "https://github.com/SMPTE/st2094-50",
131+
"title": "Dynamic Metadata for Color Volume Transform - Application #5 (Broadcast)",
132+
"publisher": "SMPTE",
133+
"date": "2025"
134+
},
129135
"What_is_ICtCp": {
130136
"href": "https://professional.dolby.com/siteassets/pdfs/ictcp_dolbywhitepaper_v071.pdf",
131137
"title": "What is ICtCp, v7.1",
@@ -611,7 +617,7 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
611617
by multiplying each color component by 203 [[Rpt_BT.2408]]
612618
to convert from relative units (Y of white is 1, regardless of actual brightness)
613619
to absolute units of cd/m², also called "nits".
614-
In the <a href="#scolor-conversion-code">sample code</a>,
620+
In the <a href="#color-conversion-code">sample code</a>,
615621
this constant is denoted <var ignore=''>Yw</var>,
616622
the luminance of HDR Reference White.
617623

@@ -637,11 +643,16 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
637643
3. Let <var> w1</var> = clamp((<var>H</var> - <var>H2</var>) / (<var>H1</var> - <var>H2</var>), 0, 1)
638644
4. Let <var> w2</var> = clamp((<var>H</var> - <var>H1</var>) / (<var>H2</var> - <var>H1</var>), 0, 1)
639645
Note that <var> w2</var> = 1 - <var> w1</var>
640-
5. Let <var>eps</var> = 0.001 (one JND in linear-light space)
646+
5. Let <var>eps</var> = 0.001
641647
6. Let <var>cxyz</var> = Array(3)
642648
7. For i from 0 to 2:
643649
Let <var>cxyz</var>[i] = pow(<var>c1xyz</var>[i] + <var>eps</var>, <var>w1</var> ) * pow(<var>c2xyz</var>[i] + <var>eps</var>, <var>w2</var> ) - <var>eps</var>
644650

651+
Note: The factor <var>eps</var> is to prevent division by zero,
652+
and the value is chosen to match that used in
653+
[[SMPTE-ST-2094-50]].
654+
655+
645656
<div class="example" id="ex-hdr-interpolate">
646657
For example, given c1 = color(rec2100-linear 0.9 1.0 0.8),
647658
c2 = color(rec2100-linear 1.8 2.0 1.5),

0 commit comments

Comments
 (0)