# lane hevcpwtfix Goal: fix the chroma offset half range in pred_weight_table parsing (7-56). Base sha (main at start): 70b56309. Main merged in later: f708426b (includes c3fe4baf). ## What changed - crates/ec-h265-syntax/src/slice.rs: wpOffsetHalfRangeC is now 1 << 7 (128) at every bit depth. It was 1 << (bit_depth_chroma_minus8 + 7). high_precision_offsets is RExt only and Main/Main10 never set it. The BitDepthC shift stays in weighted prediction. - New test chroma_offset_uses_half_range_128_at_10_bits: 10-bit SPS, Cb gives -118, Cr gives 64 (hand-computed from 7-56). The old formula would give -502 and 256. - Checked: ec-h265 dec/weighted.rs ExplicitWeights::from_table uses the parsed ChromaOffset and scales by 1 << (BitDepth - 8). Luma offsets are range-checked there (-128..127). No change needed. - Checked: ec-hw dec/hevc.rs write_weights copies the parsed offsets into an i8 buffer. With the fix they stay in -128..127, so the cast is now always lossless. No change needed. - Checked: no HEVC encoder path uses the pred weight table. - The cu_syntax.rs collapsible_if fix was dropped. Main already has it (let-chains). ## Verify (on server) - cargo clippy -p ec-h265 -p ec-h265-syntax --all-targets -- -D warnings: pass - cargo test -p ec-h265-syntax --release: pass (29 + 2 + 1 tests, new test ok) - cargo test -p ec-h265 --release --lib: pass (72 passed) ## Left - Nothing in scope.