Skip to content

hdrscope: Support SMPTE ST 2094-50 zero alternate images (Section B.4) - #66

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1014616314
Nov 5, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1014616314

Conversation

@copybara-service

Copy link
Copy Markdown

hdrscope: Support SMPTE ST 2094-50 zero alternate images (Section B.4)

When 2094-50 metadata specifies zero alternate images (N_alt = 0), Section
B.4 dictates that tone mapping evaluates to the identity transform
(ToneMap(C) = C) and the baseline image is projected/clamped to the target
color volume regardless of targeted HDR headroom.

Previously, HDRScope evaluated a single-point curve at (64, 0, 0) whose
cubic spline right-extrapolation attenuated luminance values above 64,
disabled the WASM adaptive tone mapping flag, and caused UI panels
to crash when accessing metadata.altr[0].

This change adds an identity bypass when metadata.altr is empty across
CPU adaptation, WebGL GLSL shaders, and UI curve editors, fixes zero-gain
evaluation above 64, and adds comprehensive unit tests.

@copybara-service
copybara-service Bot force-pushed the test_1014616314 branch 3 times, most recently from 03ea029 to bdfbe8e Compare November 5, 2026 14:33
When 2094-50 metadata specifies zero alternate images (N_alt = 0), Section
B.4 dictates that tone mapping evaluates to the identity transform
(ToneMap(C) = C) and the baseline image is projected/clamped to the target
color volume regardless of targeted HDR headroom.

Previously, HDRScope evaluated a single-point curve at (64, 0, 0) whose
cubic spline right-extrapolation attenuated luminance values above 64,
disabled the WASM adaptive tone mapping flag, and caused UI panels
to crash when accessing metadata.altr[0].

This change adds an identity bypass when metadata.altr is empty across
CPU adaptation, WebGL GLSL shaders, and UI curve editors, fixes zero-gain
evaluation above 64, and adds comprehensive unit tests.

PiperOrigin-RevId: 1014653774
@copybara-service
copybara-service Bot merged commit ee73fd7 into main Nov 5, 2026
8 checks passed
@copybara-service
copybara-service Bot deleted the test_1014616314 branch November 5, 2026 14:37

This branch was successfully deployed

1 active deployment
github-pages — ee73fd7a Deployed Nov 5, 2026 by copybara-service[bot] via deploy #62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant