edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane hevcslices: multiple slices, dependent slice segments, tiles, WPP, TSUNEQBD
Goal
Accept and decode, pixel-exact for intra pictures, the streams that were refused for
multiple slices per picture (30), tiles (16), dependent slice segments, and unequal
luma/chroma bit depth (TSUNEQBD). Base: 5d7956ca (main).
Result
Before (5d7956ca) |
After | |
|---|---|---|
| Accepted streams | 100 of 147 | 147 of 147 |
| Intra pictures checked against MD5 SEI | 269 | 349 |
| Intra pictures exact | 269 | 349 |
| Refusals | 47 (30 slices, 16 tiles, 1 TSUNEQBD) | none |
No regressions: every picture that was exact before is still exact.
Changes
dec/tiles.rs(new): tile scan (6.5.1). Uniform and explicit tile sizes,CtbAddrRsToTs/CtbAddrTsToRs,TileIdper CTB, tile-start and WPP row-start tests. Unit tests for the uniform split and a 2x1 tile layout.dec/slice_seg.rs(new): a dependent slice segment inherits the header of the independent segment before it (only its address and entry points are its own).dec/pic.rs:zscan(MinTbAddrZs) uses tile-scan CTB addresses.available()is the single 6.4.1 check: inside the picture, decoded before the current block, sameSliceAddrRsand same tile.CtbInfogainsslice_addrandtile.SliceCarry(per picture): the WPP contexts (TableStateIdxWpp), the dependent segment contexts (TableStateIdxDs),qPY_PREVacross segments, andSliceAddrRs.
dec/cu_syntax.rs:refuse_unimplementedis removed.- The CTB loop runs in tile scan from
slice_segment_address. - Contexts follow 9.3.1: fresh at a tile start; WPP sync from the CTB above-right when
it is available (else fresh); a dependent segment restores
Ds. - WPP storage after the second CTB of a row in a tile (the spec's
CtbAddrInRs % W == 1or tile-change rule). end_of_subset_one_bitand byte alignment at each tile start and each WPP row start in a tile.qPY_PREVresets at a slice start (not a segment start), a tile start, and a WPP row start.- The split, skip and MPM neighbour reads use
available(). sao()reads the merge flags under the spec'sleftCtbInSliceSeg/upCtbInSliceSegand tile conditions.
dec/mod.rs: each slice segment decodes into the samePicState(also in the syntax-only path, which used a fresh state per call). The dependent header is resolved before decode. The multi-slice refusal is gone. The unequal-depth refusal is gone.dec/deblock.rs: the slice boundary test comparesSliceAddrRs, not the segment index. The tile boundary test usesloop_filter_across_tiles_enabled_flag.dec/sao.rs: the slice boundary rule usesSliceAddrRs(flag of the later slice in decoding order); the tile boundary rule is added.dec/motion_field.rs,dec/mod.rs: spatial merge and AMVP neighbours also require the same tile (6.4.1). The tile map lives onMotionField, soSliceMotionis unchanged. This path is only checkable once inter pixels land.- Unequal bit depth:
DecodedPicturegainsbit_depth_candbit_depth_of(c), andgrey_planes. The RPS grey fill takes(luma, chroma)depths. The MD5 checker intests/conformance_intra.rssizes each plane by its own depth. The decoder paths for intra, transform, SAO, deblock, PCM and chroma QP already used per-component depth.
Verify
| Command | Result |
|---|---|
scripts/remote-run.sh hevcslices -- cargo clippy -p ec-h265 -p ec-h265-syntax --all-targets -- -D warnings |
clean (exit 0) |
scripts/remote-run.sh hevcslices -- cargo test -p ec-h265 -p ec-h265-syntax --release |
exit 0; all test binaries pass, 0 failed (includes the new tile unit tests) |
scripts/remote-run.sh hevcslices -- cargo check --workspace --all-targets |
exit 0; warnings only in ec-av1 (not this lane) |
scripts/remote-run.sh hevcslices -- cargo test -p ec-h265 --release --test conformance_intra -- --nocapture |
total: 349 intra pictures checked, 349 exact, 147/147 streams accepted |
Not done, or limits
- Entry point offsets are not used or validated. Decoding is sequential and realigns at each substream end. Validating offsets would need the emulation-prevention byte map.
- Inter pictures are still not checked (placeholder inter). The tile check on merge and AMVP neighbours is implemented but not pixel-verified.
- Dependent-slice and WPP-with-slices behaviour is verified only through the MD5 of intra pictures in the accepted streams. The conformance table covers WPP_A..F, DSLICE_A..C, ENTP_A..C, SLICES_A, TILES_A/B and the others, all exact.