Repository navigation
Decode non-grid HEIC images in bounded decoding - #21
laurens-pilot wants to merge 1 commit into
Conversation
A single hvc1/hev1 primary is decoded as a grid with one tile. Its reconstruction workspace is reserved during preflight, so an image that does not fit the budget is refused before decoding, and its payload is bounded by the budget instead of the 16 MiB grid tile cap. The bounded path also accepts a one-channel 8-bit pixi.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Superseded by ente#33. |
decode_boundedonly accepted grid primaries, so non-grid HEICs, including some iPhone exports, failed with "primary item must be a HEIC grid". A singlehvc1/hev1primary is now decoded as a grid with one tile, with the same orientation, Exif and colour handling as a grid.Unlike a grid, a single image is reconstructed all at once. Its workspace is reserved during preflight from the coded size, so an image that doesn't fit the budget is refused before any decoding. Its payload is bounded by the budget rather than the 16 MiB grid tile cap. At a 512 MiB budget this admits single images up to roughly 55 MP (an estimate); grids are unaffected. The bounded path also now accepts a one-channel 8-bit
pixi, which only the incremental experiment allowed before.Measured through
ente_image::decode_boundedat a 512 MiB budget and max side 6000, against an area downsample of the full decode:1718_rotate_90_cw.HEIC7949_mirror_horizontal_rotate_270_cw.HEICAt a 32 MiB budget,
1718is refused with a 9.5 MiB peak. 119 of 172 single-image HEVC files in the local corpora now decode; the rest are 10/12-bit, 4:2:2/4:4:4, alpha or malformed. Grid output is byte-identical tomainon all 36 grid files compared.Ente's
non_grid_heic_fixtures_are_rejected_when_presenttest will need updating when it picks this up, since1718and7949now decode.