From c5acb6ace97815a3d5628af85cc136320df926c1 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sun, 30 Aug 2026 06:27:36 +1000 Subject: [PATCH] Record HEVC parallel slice verification --- HEIF_IMPLEMENTATION_PLAN.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/HEIF_IMPLEMENTATION_PLAN.md b/HEIF_IMPLEMENTATION_PLAN.md index 55e8660bc5..fe8c19285c 100644 --- a/HEIF_IMPLEMENTATION_PLAN.md +++ b/HEIF_IMPLEMENTATION_PLAN.md @@ -79,15 +79,15 @@ Status meanings: - **Not started:** supporting primitives may exist, but the production format path is absent. - **Current:** the only work item that should be advanced before taking the next queued item. -Current development stage: **Stage 4 — complete HEVC still-image decoding.** The AV1 still-image exit gate is complete across the exact 12-profile matrix, layered reference-dependent items, every connected normative reconstruction tool, official quantizer and size boundaries, constrained allocation, and pinned native and presentation output. The bounded HEVC item-local syntax, allocator-backed decoder lifecycle, CABAC arithmetic and context state, coding-tree traversal, and intra prediction are implemented and verified through pinned-HM tables and analysis, official native-plane output, real HEIC payloads, constrained allocation, constructor failure, public presentation cases, and SIMD/scalar feature isolation. The next dependency is scaling-list selection, effective component quantization, residual-tool selection, inverse transforms, and lossless reconstruction through the complete production transform-unit path. Neither AV1 nor HEVC production encoding is implemented. +Current development stage: **Stage 4 — complete HEVC still-image decoding.** The AV1 still-image exit gate is complete across the exact 12-profile matrix, layered reference-dependent items, every connected normative reconstruction tool, official quantizer and size boundaries, constrained allocation, and pinned native and presentation output. The bounded HEVC item-local syntax, allocator-backed decoder lifecycle, CABAC arithmetic and context state, coding-tree traversal, intra prediction, residual reconstruction, in-loop filtering, tiles, wavefront entry points, dependent slices, and entry-point offset handling are implemented and verified through pinned-HM tables and analysis, official native-plane output, real HEIC payloads, constrained allocation, constructor failure, public presentation cases, and SIMD/scalar feature isolation. The next dependency is supplemental enhancement information that changes ImageSharp presentation or metadata, followed by the remaining exact HEVC profile and Range Extensions matrix. Neither AV1 nor HEVC production encoding is implemented. -Immediate checkpoint: **current — complete Phase 4 HEVC residual reconstruction.** Reconcile effective luma and chroma QP derivation, chroma-adjustment-list selection, scaling-list selection, inverse quantization, transform skip, coefficient rotation, residual DPCM, transquant bypass, inverse transforms, reusable scratch ownership, and prediction addition with pinned HM, then retain exact native-plane and focused scalar/SIMD evidence before advancing to in-loop filtering. +Immediate checkpoint: **current — complete presentation-changing HEVC supplemental enhancement information.** Reconcile the bounded still-image SEI syntax with pinned HM, connect only messages that change ImageSharp presentation or exposed metadata, and retain exact native-plane, presentation, malformed-input, constrained-allocation, and scalar/SIMD evidence before completing the remaining profile and Range Extensions matrix. | Order | Delivery stage | State | Delivered state | Gate that remains open | | --- | --- | --- | --- | --- | | 1 | Baseline, provenance, documentation, and public contract | In progress | Pinned codec references, a bounded image-only scope, encoder options, typed bit depth, decoder-option propagation, and extensive HEIF documentation exist. | Complete the all-file documentation audit, record a fresh Release baseline, finish distinct public HEIC/AVIF save boundaries, and close API review. | | 2 | Bounded HEIF item and image-sequence container | In progress | Still-item parsing, grids, auxiliary alpha, metadata properties, bounded image-sequence tracks, Identify, and all-sync AV1 sequence presentation are connected. | Complete adversarial boundary coverage, remaining item/property behavior, reference-dependent sequence reconstruction, and the bounded sequence writer. | -| 3 | Still-image AV1 and HEVC decoding | **Current** | AV1 still-image decoding has passed its complete exact native/presentation profile, layered-item, normative-tool, official-sequence, constrained-allocation, and SIMD-fallback exit gate. HEVC item-local syntax, lifecycle, CABAC, coding-tree traversal, intra prediction, and reconstruction pass exact HM/libheif fixtures across the recorded 8/10/12-bit and chroma cases. | Complete residual reconstruction, then the remaining normative-tool, profile, and Range Extensions matrix in dependency order. | +| 3 | Still-image AV1 and HEVC decoding | **Current** | AV1 still-image decoding has passed its complete exact native/presentation profile, layered-item, normative-tool, official-sequence, constrained-allocation, and SIMD-fallback exit gate. HEVC item-local syntax, lifecycle, CABAC, coding-tree traversal, intra prediction, residual reconstruction, in-loop filtering, tiles, wavefront entry points, dependent slices, and entry-point offsets pass exact pinned-HM native-plane evidence across the recorded 8/10/12-bit and chroma cases. | Complete presentation-changing HEVC SEI, then close the remaining exact profile and Range Extensions matrix. | | 4 | Complete decoded presentation and animation | In progress | Shared SIMD-first AV1/HEVC color conversion, ICC application, grids, transforms, direct planar alpha composition, frame metadata, repetition, and independently decodable AV1 sequence samples exist. | Close the full color/ICC cross-product, HEVC sequence decoding, AV1/HEVC reference-dependent samples, frame-local metadata/alpha behavior, and independent animated decode vectors. | | 5 | AV1/AVIF encoding | Not started | RGB-to-planar conversion, forward transforms, OBU writer foundations, options, and container-writing infrastructure exist. | `HeifEncoderCore` still rejects AV1. Implement a real independently decodable lossy/lossless AV1 payload and the complete AVIF item/metadata matrix. | | 6 | HEVC/HEIC encoding | Not started | Shared input color conversion, options, and HEIF writer infrastructure exist. | `HeifEncoderCore` still rejects HEVC. Implement a real independently decodable lossy/lossless HEVC payload and the complete HEIC item/metadata matrix. | @@ -147,7 +147,7 @@ Immediate checkpoint: **current — complete Phase 4 HEVC residual reconstructio - [x] Verify HEVC CABAC arithmetic and every required context transition against pinned HM tables and complete production slices. - [x] Complete coding-tree, coding-unit, prediction-unit, and transform-unit traversal across every permitted size and partition mode. Eight official ITU first pictures compare exactly with pinned-HM native planes, pinned HM matches every archive complete-sequence MD5 and every RQT decoded-picture hash SEI, analyser output proves the recorded coding and transform sizes and partition alternatives, and all 150 focused HEVC decoder cases pass in Release. Commit `66d1f3c41b0baeaa98726b57d5feaeba50874f16` records the checkpoint. - [x] Complete HEVC intra prediction for every luma and chroma mode, including strong intra smoothing and constrained prediction rules. The official `IPRED_B_Nokia_3` native output and independently coded first `CIP_A_Panasonic_3` picture match pinned HM, all 149 focused HEVC decoder cases pass in Release, and commit `9bc5b9842` records the checkpoint. -- [ ] **Current:** complete scaling-list selection, effective component quantization, residual-tool selection, inverse transforms, and lossless reconstruction through the production transform-unit path. +- [ ] **Current:** complete presentation-changing HEVC supplemental enhancement information and the remaining exact native-plane profile and Range Extensions matrix, then close Phase 4 still-image decoding. - [ ] Close shared decoded presentation, ICC, alpha, grid, transform, metadata, and animated AV1/HEVC decode gates. - [ ] Implement and independently verify real AV1/AVIF still encoding. - [ ] Implement and independently verify real HEVC/HEIC still encoding. @@ -697,7 +697,7 @@ Implement and verify in dependency order: - [x] Derive effective luma and chroma quantization parameters, including bit-depth offsets and chroma-format mapping, then connect scaling-list selection and inverse quantization to transform-unit traversal. - [x] Implement the immutable effective-QP value used by reconstruction, including independent luma/chroma bit-depth offsets, the normative 4:2:0 mapping plateaus, the 4:2:2/4:4:4 saturation rule, and combined picture/slice/coding-unit chroma offsets. - [x] Select each transform unit's coding-unit luma QP and chroma-adjustment-list entry, then pass the derived component QP into inverse quantization. - - [ ] Implement transform skip, coefficient rotation, implicit and explicit residual DPCM, transquant bypass, and lossless reconstruction. + - [x] Implement transform skip, coefficient rotation, implicit residual DPCM, transquant bypass, and lossless reconstruction for the independently coded Phase 4 scope. - [x] Implement allocation-free SIMD-first transform-skip normalization, complete-block coefficient rotation, transquant-bypass copying, implicit intra-direction selection, and horizontal/vertical inverse residual DPCM with a scalar fallback and signed residual clipping. - [ ] Decode explicit inter residual-DPCM modes when Phase 5 supplies the owning dependent-picture HEVC inter-prediction path; this syntax cannot occur in the independently coded Phase 4 pictures. - [x] Connect coefficient decoding, inverse quantization, transform selection, reusable scratch, and add/clip to transform-unit traversal. @@ -708,8 +708,8 @@ Implement and verify in dependency order: - [x] Explicitly verify active deblocking and sample-adaptive-offset signaling in the existing ten-picture official GENERAL matrix while retaining its exact published native-plane comparisons across 8/10/12-bit monochrome, 4:2:0, 4:2:2, and 4:4:4. - [x] Verify the same four pictures through `FeatureTestRunner` with normal dispatch, AVX-512 disabled, AVX disabled, and all hardware intrinsics disabled. The official SAO picture also matches all three native planes through 2 KiB allocator groups with balanced exactly-once disposal. - [x] Keep the SAO traversal on the JPEG color-converter architecture: one nested classifier contract in `HevcSampleAdaptiveOffsetFilter.Operator.cs`, separate nested semantic `readonly struct` band and edge operators, descending `Vector512`/`Vector256`/`Vector128` dispatch, and one scalar tail. Commits `702739916b2a440ad2dc9bae8b680ca7fcc636c4` and `1c7292759` record the implementation, official fixtures, exact provenance, dedicated filter tests, and explicit full-profile signaling assertions. Both Release source targets build with zero warnings and errors, Roslynk reports zero compiler errors, all 175 focused HEVC cases pass without failures or skips, documentation review is complete, and `git diff --check` is clean. -- [ ] **Current:** tiles, wavefront entry points, dependent slices, and all other parallelization syntax permitted by the exposed still-image profiles. -- [ ] Supplemental enhancement information that changes image presentation or metadata exposed by ImageSharp. +- [x] Implement and verify tiles, wavefront entry points, dependent slices, entry-point offset conversion across emulation-prevention bytes, and the other parallelization syntax permitted by the exposed still-image profiles. The retained first pictures from the official `DSLICE_A`, `DSLICE_B`, `DSLICE_C`, `TILES_A`, `TILES_B`, `WPP_A`, `WPP_B`, `WPP_C`, `WPP_D`, `WPP_E`, `WPP_F`, `ENTP_A`, and `ENTP_C` bitstreams match exact native Y/Cb/Cr planes. Pinned HIGH_BITDEPTH HM at commit `9c1f298659ab0cee9dc13d23d0304221575410b9` reproduces every archive's published complete-output MD5. The production correction follows HM's exact tile-origin and wavefront-row dependent-slice context rules and retains wavefront context across dependent segment boundaries. Direct boundary arithmetic verifies entry-point conversion across emulation-prevention bytes, while combined dependent-slice wavefront and tile cases pass through 4 KiB constrained allocator groups with balanced exactly-once disposal. All 191 focused HEVC cases pass without failures or skips, both Release source targets build with zero warnings and errors, the scoped test-project analyzer build completes with zero errors and 1,010 pre-existing repository warnings, Roslynk reports zero compiler errors, the retained fixtures use the existing LFS attributes without changing `.gitattributes`, and `git diff --check` is clean. Commit `b337bce1a6931885d61ef2cda792df0a29869b8b` records the checkpoint. +- [ ] **Current:** supplemental enhancement information that changes image presentation or metadata exposed by ImageSharp. - [x] Establish exact HM 18 native-plane conformance for four real 8-bit item payloads covering 4:2:0, 4:4:4, cropping, multiple grid positions, and wavefront entry points. - [x] Establish exact independent presentation verification for single images, grids, auxiliary alpha, ICC, 4:2:0, and 4:4:4 output without weakening the exact native-plane codec oracle. - [ ] Establish exact native-plane conformance for 8/10/12-bit monochrome, 4:2:0, 4:2:2, and 4:4:4 across every exposed HEVC profile and required Range Extensions tool. @@ -897,7 +897,7 @@ The dashboard and immediate execution queue define the remaining critical path. - [x] Complete progressive color and auxiliary-alpha verification through exact native and presentation comparisons, every required `FeatureTestRunner` fallback, and constrained tracked allocation. - [x] Correct the audited 12-bit inverse ADST4, Identity4, and Identity16 arithmetic through exact pinned boundary vectors and SIMD/scalar feature isolation. - [x] Remove every other unsupported valid AV1 still-image syntax path and prove the complete AVIF decode matrix with independent inputs and scalar/SIMD parity. Commit `2219edbc91edb6a2d905f1221a45207eb2719abc` closes Phase 3. -- [ ] **Current:** close Phase 4 by completing residual reconstruction, in-loop filtering, the remaining HEVC profile and Range Extensions matrix, and exact native-plane and presented-image evidence. +- [ ] **Current:** close Phase 4 by completing presentation-changing HEVC supplemental enhancement information and the remaining HEVC profile and Range Extensions native-plane and presentation evidence. - [ ] Close Phase 5 and the decode portion of the bounded sequence ledger: color, ICC, alpha, grids, presentation transforms, reference-dependent samples, and complete animated AVIF/HEIC decode. - [ ] Close the still-image portions of Phases 0, 1, and 2 that remain as release gates: documentation, provenance, public format boundaries, API review, parser hardening, and malformed-input coverage. - [ ] Complete Phase 6 with a real AV1 encoder and independent AVIF cross-decode across every public option and metadata combination.