Skip to content

Add opt-in incremental bounded HEIC decoding - #12

Merged
laurenspriem merged 1 commit into
ente:mainfrom
laurens-pilot:feat/incremental-bounded-decode
Oct 1, 2026
Merged

laurenspriem merged 1 commit into
ente:mainfrom
laurens-pilot:feat/incremental-bounded-decode

Conversation

@laurens-pilot

@laurens-pilot laurens-pilot commented Oct 1, 2026 •

Copy link
Copy Markdown

Add feature-gated incremental reconstruction for supported opaque 8-bit 4:2:0 HEVC still images, including non-grid images and grids with oversized tiles. Complete prediction and filtering in rolling bands before conversion and downsampling, so source raster storage grows with width rather than total pixels. Existing APIs and production callers retain their behavior.

A 199.8 MP photograph re-encoded as a single HEIC item produces 6000×4500 output with 103.3 MiB measured peak heap under a 128 MiB budget; all 299,635,200 reconstructed YUV samples match FFmpeg. This is host evidence for the supported subset, not native camera compatibility or a universal RSS guarantee. WPP, alpha, higher bit depths and other coding structures remain follow-up work.

Keep native reference samples exact and allow at most one RGB8 code value for display rounding. Tests use the existing external libheif/stress corpus and locally generated regression variants in ignored directories, with live strict libheif references and allocation ceilings. No new binary fixtures or golden PNGs are tracked. The existing exact normal-decoder comparison policy stays intact.

An additional high-frequency odd-crop probe has one green sample differing by two values despite exact native YUV agreement. The strict one-value RGB gate remains unchanged; that display-conversion discrepancy is recorded for the compatibility follow-up and is not counted as a passing comparison.

Source fork PR: laurens-pilot#2

@laurenspriem

@laurens-pilot
laurens-pilot force-pushed the feat/incremental-bounded-decode branch from d26ac40 to 37cf033 Compare October 1, 2026 05:40
@laurens-pilot

Copy link
Copy Markdown
Author

@codex review

@laurenspriem
laurenspriem merged commit 89aea8b into ente:main Oct 1, 2026
3 checks passed
@laurens-pilot
laurens-pilot deleted the feat/incremental-bounded-decode branch October 1, 2026 09:23
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