Commit 15dba50
HEIF export: write HDR10 content light level (clli) for PQ
darktable's HEIF exporter already tags PQ/HLG Rec.2020 (and P3) output with the
correct nclx colour information, but never wrote the HDR10 content-light-level
box, which players and displays use to tone-map (and which platforms such as
iOS/Instagram expect on HDR stills).
For PQ (SMPTE ST 2084) output the float samples are absolute-luminance encoded,
so derive the values from the pixels via the PQ EOTF:
- MaxCLL = brightest single sample (max RGB component), in nits,
- MaxFALL = mean per-sample peak light level, in nits.
Written via heif_image_set_content_light_level(). HLG is relative, so skipped.
This mirrors the equivalent AVIF change and rounds out HDR10 HEIF output.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent b3c41a1 commit 15dba50
1 file changed
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| |||
324 | 344 | | |
325 | 345 | | |
326 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
327 | 385 | | |
328 | 386 | | |
329 | 387 | | |
| |||
0 commit comments