Skip to content

Accept BT.601 HEVC colour in bounded decoding - #20

Closed
laurens-pilot wants to merge 1 commit into
mainfrom
fix/bounded-bt601-vui-color
Closed

laurens-pilot wants to merge 1 commit into
mainfrom
fix/bounded-bt601-vui-color

Conversation

@laurens-pilot

Copy link
Copy Markdown
Owner

Samsung HEICs have no colr box and signal BT.601 colour (primaries 5, transfer 6, matrix 5, full range) only in the HEVC stream. The full decoder returns these as untagged RGB, but decode_bounded rejected them with Unsupported("unprofiled HEVC color"). It now treats stream-signalled BT.601 primaries (5 and 6) like sRGB, as it already did for 1 and 2. Images whose stream signals a wide gamut (BT.2020, P3) with no colr box are still rejected.

On a Galaxy S22 motion-photo HEIC (3000×4000), decode_bounded now matches decode_bytes_to_rgb8 exactly. Apple's ImageIO also reports this file as sRGB. Converting the BT.601 primaries to sRGB instead would have moved the output away from both: it differs from the full decoder by up to 14 levels, and agreement with ImageIO within ±1 drops from 97.3% to 90.2% of samples.

Samsung HEICs carry no colr box and signal BT.601 primaries in the HEVC
VUI. The full decoder renders these as untagged sRGB, but the bounded
path rejected them as unprofiled colour. Treat VUI primaries 5 and 6 like
1 and 2 so bounded output matches the full decoder; wide-gamut VUI-only
colour is still rejected.
@laurens-pilot

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T12:07:16.189179Z d3b1925 Manual request
🔒 Security Review ✅ Completed 2026-11-03T12:08:18.689918Z d3b1925 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: d3b192535e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: d3b192535e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@laurens-pilot

Copy link
Copy Markdown
Owner Author

Superseded by ente#31.

@laurens-pilot
laurens-pilot deleted the fix/bounded-bt601-vui-color branch November 3, 2026 12:53
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.

2 participants