mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-24 10:10:05 -06:00
h264enc: never crash — no unwrap/expect/unreachable, encode returns Result
- `Encoder::encode` returns `Result` (it was `try_encode(..).expect(..)`, panicking on short planes); tests and the example unwrap explicitly. - P/B macroblock analysis without a reference codes intra instead of `expect`/`unwrap`; spatial direct without a list-1 picture predicts zero motion. - Rate control prior, DPB sliding window, DTS queue, reconstruction buffers, CAVLC writer, SAD rows and forward 8x8 transforms without `unwrap`/`expect`; skip-macroblock arms in `write_mb` debug-assert instead of `unreachable!`. - `#![deny(clippy::unwrap_used, …)]` outside tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7b96f22684
commit
b05833ef67
@@ -64,7 +64,7 @@ fn main() {
|
||||
enc.set_recon_capture(false);
|
||||
}
|
||||
for (i, f) in frames.iter().enumerate() {
|
||||
pk.extend(enc.encode(&f.frame(), i as i64));
|
||||
pk.extend(enc.encode(&f.frame(), i as i64).unwrap());
|
||||
}
|
||||
pk.extend(enc.flush());
|
||||
let el = t0.elapsed().as_secs_f64();
|
||||
|
||||
Reference in New Issue
Block a user