edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane hevcclippy: ec-h265 clippy clean
Goal
cargo clippy -p ec-h265 -p ec-h265-syntax --all-targets -- -D warnings exits 0, with zero
behaviour change. The RDOQ numerics stay bit-identical.
Base
15931054 (main, merge of lane/hevcdecapi).
What changed
crates/ec-h265/src/residual.rslambda * bits as f64(andtrial_bits,zero_bits) becamelambda * bits. The operands are alreadyf64(levels_bitsreturnsf64), so the cast was a no-op. Six sites, lib and test module.if let Some(skip) = transform_skip { if log2_size == 2 {..} }became a let chain. Same short-circuit, same bits.if i == last_sub { true } else if i == 0 { true } else {..}becameif i == last_sub || i == 0 { true } else {..}.sig_ctxwas declared late and assigned in each branch. It is now onelet sig_ctx = if ..expression. Thebase.expect(..)path returns early as before, with the same operands.
crates/ec-h265/src/transform.rs:row % 2 == 0becamerow.is_multiple_of(2)inm32(unsigned, same value).crates/ec-h265/src/decode.rs:#[allow(clippy::too_many_arguments)]with a reason comment onreconstruct_luma(8 inputs),reconstruct_chroma(9) anddecode_single_tu(8). A parameter struct would only move the arguments. No logic changed.
No float expression was reordered, no integer type changed, and no test was touched or ignored.
Verify
Run on the server through scripts/remote-run.sh hevcclippy.
cargo clippy -p ec-h265 -p ec-h265-syntax --all-targets -- -D warnings: exit 0, no warnings or errors. Before the change: 6 errors in lib and 3 more in the test target (residual.rs), all in theas f64/ collapsible-if / identical-blocks / late-init group.cargo test -p ec-h265 -p ec-h265-syntax --release: all pass, 0 failed.- ec-h265 lib 30, conformance 15, dec_shell 13, decode 5, encode 4, perf 3, rdoq_cache_hash 3.
- ec-h265-syntax unit 14, doc 2, fuzz 0.
rdoq_cache_hash(3/3) pins the encoder output hashes and passes unchanged.
What is left
Nothing for this lane. The clippy target is met.