Commits
Commits on
4c07cbc2ca9466907a3cbb5ccc7dab0eebf15b7eFiltered to crates/ec-h265/src/decode.rsClear filter2026-08-27
feat(bench): real h265 software-decode row; drop a dead helperAhmet Kaan Gümüş · 746f093
feat(bench): real h265 software-decode row; drop a dead helper The 'encode-only crate, no decoder present' placeholder was a false claim since lane-h265dec merged; the row now times decode_idr_au over the bench's own encoded stream (10.48x realtime at 640x360).
fix(h265): MPM reads syntax-level modes, not pixel availabilityAhmet Kaan Gümüş · c6dece1
fix(h265): MPM reads syntax-level modes, not pixel availability r4's fix marked NxN partitions pixel-available before reconstruction, which let prediction-reference construction (8.4.4.2.1) see samples that do not exist yet — exposed by the merged proxy-ranking encoder's mode choices at 70x50's bottom edge. MPM now reads the assigned-mode grid directly (8.4.2 needs only syntax-level modes, signalled for all four partitions before any reconstructs); pixel availability stays honest.
fix(h265): NxN partitions mark availability per partition, matching the encoderAhmet Kaan Gümüş · 296a501
fix(h265): NxN partitions mark availability per partition, matching the encoder decode_cu_nxn deferred decoded[idx]=true to the post-loop mark_coded while the encoder flips availability immediately per partition — the decoder's mpm_at saw a same-CU sibling as unavailable-DC and derived a different MPM triple, desyncing every bin after. All odd sizes now round-trip byte-exact (70x50, 150x94, 41x33 added); full gate green.
fix(h265): decoder true-size base, NxN chroma log2, encoder MPM remainderAhmet Kaan Gümüş · 9c113d7
fix(h265): decoder true-size base, NxN chroma log2, encoder MPM remainder Three fixes from the odd-size hunt: - decode.rs sizes the picture from pic_width/height_in_luma_samples, not the CTB-rounded grid; split_cu_flag inference desynced at every non-CTB-multiple size against the encoder's true-size boundary checks. - reconstruct_chroma for an NxN CU takes the covering 8x8 CU's log2, not a 4x4 partition's; the old value underflowed decode_residual. - ENCODER: rem_intra_luma_pred_mode binarization must compare the running remainder while walking sorted MPMs descending, not the fixed mode; wrong bitstream whenever two MPM candidates straddle the chosen mode. ffmpeg bit-exact conformance stays green (suite content never fired it). 70x50/150x94 stay ignored: residual desync narrowed to PART_NxN at a boundary-forced 8x8 leaf (2Nx2N-forced round-trips clean).
feat(h265): begin a software HEVC decoder — CABAC decode + CTU quadtreeAhmet Kaan Gümüş · d55730b
feat(h265): begin a software HEVC decoder — CABAC decode + CTU quadtree Module map (crates/ec-h265): - cabac.rs: CabacDecoder, the arithmetic-decode mirror of CabacEncoder, sharing RANGE_TAB_LPS/TRANS_IDX_LPS/TRANS_IDX_MPS/Contexts. Promoted from a test-only RefDecoder that already existed and matched the spec flowcharts; added decode_bin/decode_bypass/decode_terminate and a WPP byte_position_aligned() helper. - residual.rs: decode_residual, a bin-for-bin mirror of encode_residual. Round-trip tested against encode_residual across every block size/scan/plane/sign-hiding combination. - decode.rs (new): the coding-tree/transform-tree walk ec-h265 had no decode-shaped twin for. Reuses crate::intra and crate::transform as-is. decode_idr_au() parses VPS/SPS/PPS + one I slice and refuses inter slices with a stated reason. Gates: decoder_inverts_the_encoder_bin_by_bin and decode_residual_inverts_encode_residual green; tests/decode.rs round-trip green at 32x32 and 96x64 (WPP), 70x50 checkpoint-ignored (same coded dims as the passing 96x64 case — content-triggered desync, documented for the next round). Pre-existing cargo test -p ec-h265 --release: 15/15 green.