forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

decode_probe.rs532 lines, 22.7 KiBHistoryRawDownload
1//! Where does a real stream stop? Decode one AV1 file and print the answer.
2//!
3//! The gates in [`ec_av1::stream`] each pin one capability against one encoder
4//! recipe. This asks the complementary question -- given a stream someone
5//! actually produced, which refusal comes first -- and it is how the refusal
6//! distribution in commit 2be815f was measured rather than reasoned about:
7//!
8//! ```text
9//! aomenc --codec=av1 --obu -o s.obu --passes=1 --cpu-used=4 --limit=4 in.y4m
10//! cargo run -p ec-av1 --example decode_probe -- s.obu
11//! ```
12//!
13//! Note `--obu`: [`ec_av1::stream::decode_stream`] takes a raw OBU stream, and
14//! an IVF file decodes as zero frames rather than as an error.
15//!
16//! That run is also what disproved three refusal strings claiming an encoder
17//! never writes a case it demonstrably writes, so this is a first-class
18//! instrument, not a scratch file.
19fn main() {
20 let Some(path) = std::env::args().nth(1) else {
21 eprintln!("usage: decode_probe <stream.obu>");
22 std::process::exit(2);
23 };
24 let data = match std::fs::read(&path) {
25 Ok(data) => data,
26 Err(e) => {
27 eprintln!("{path}: {e}");
28 std::process::exit(2);
29 }
30 };
31 let report = || {
32 // lane-av1unwritten r6: the subsize-guard coverage table (per call
33 // site, per partition value, reached vs fired). Env-gated
34 // (`EC_AV1_SUBSIZE_GUARD_TRACE`), so it is empty unless asked for.
35 ec_av1::decode::dump_subsize_guard_scan();
36 ec_av1::decode::dump_subsize_arm_scan();
37 // The census below reads ec-av1's gate counters; without the crate's
38 // `gate-counters` feature every one of them is compiled out and reads 0.
39 if !cfg!(feature = "gate-counters") {
40 println!("counters disabled (built without the gate-counters feature)");
41 }
42 let [a444, a422, s420, r420] = ec_av1::decode::cfl_ac_arm_hits();
43 println!(
44 "cfl_ac: 444={a444} 422={a422} 420sq={s420} 420rect={r420} q3_at={}",
45 ec_av1::decode::cfl_ac_q3_at_hits()
46 );
47 let (sc, dp) = ec_av1::decode::reelc_chroma_counters();
48 println!("reelc_chroma: skip_cfl={sc} dir_1to4_pairs={dp}");
49 println!(
50 "ibc128: mu_chroma={} intra128={}",
51 ec_av1::decode::intra_128_in_inter_mu_chroma_hits(),
52 ec_av1::decode::intra_128_in_inter_hits()
53 );
54 println!(
55 "chroma422_square: {}",
56 ec_av1::decode::chroma422_square_hits()
57 );
58 println!("chroma422_rect: {}", ec_av1::decode::chroma422_rect_hits());
59 println!("chroma422_sub8: {}", ec_av1::decode::chroma422_sub8_hits());
60 println!(
61 "chroma422_chunk: {}",
62 ec_av1::decode::chroma422_chunk_hits()
63 );
64 println!(
65 "chroma422_pair_wide: {}",
66 ec_av1::decode::chroma422_pair_wide_hits()
67 );
68 println!(
69 "uv_left_ss_y: reads={} mode_diff={} smooth_diff={} split1mi={}",
70 ec_av1::decode::uv_left_ss_y_reads(),
71 ec_av1::decode::uv_left_ss_y_mode_diff_hits(),
72 ec_av1::decode::uv_left_ss_y_smooth_diff_hits(),
73 ec_av1::decode::uv_left_1mi_split_hits(),
74 );
75 let (h, v, c) = ec_av1::stream::rect4_32_counters();
76 println!(
77 "rect4_16_uv_pair_filt: {}",
78 ec_av1::decode::rect4_16_uv_pair_filt_hits()
79 );
80 println!("rect4_32: horz={h} vert={v} coded={c}");
81 println!(
82 "rect_intrabc_reads: {}",
83 ec_av1::stream::rect_intrabc_reads()
84 );
85 let (pal_y, pal_uv) = ec_av1::stream::intra_in_inter_palette_hits();
86 println!("intra_in_inter_palette: y={pal_y} uv={pal_uv}");
87 println!(
88 "palette_422_unit_window: {}",
89 ec_av1::decode::palette_422_unit_window_hits()
90 );
91 println!(
92 "rect64_corner_tu: 64x32={} 32x64={}",
93 ec_av1::stream::rect64_corner_tu_hits(0),
94 ec_av1::stream::rect64_corner_tu_hits(1)
95 );
96 println!(
97 "leaf8_intrabc_hits: {}",
98 ec_av1::stream::leaf8_intrabc_hits()
99 );
100 println!("intrabc_hits: {}", ec_av1::stream::intrabc_hits());
101 println!(
102 "intrabc_vartx_trees: {}",
103 ec_av1::decode::intrabc_vartx_hits()
104 );
105 println!(
106 "intrabc_vartx_mixed_leaves: {}",
107 ec_av1::decode::intrabc_vartx_mixed_leaves_hits()
108 );
109 println!(
110 "skipped_intrabc_chroma_arm_hits: {}",
111 ec_av1::stream::skipped_intrabc_chroma_arm_hits()
112 );
113 println!(
114 "intrabc_rect: {} (var-tx tree: {})",
115 ec_av1::decode::intrabc_rect_hits(),
116 ec_av1::decode::intrabc_rect_vartx_hits()
117 );
118 // lane-av1-ibcrect: `use_intrabc` on a 128-root HORZ/VERT strip --
119 // the shape `decode_block_128rect` used to refuse.
120 println!(
121 "intrabc_128rect: {}",
122 ec_av1::stream::intrabc_128rect_hits()
123 );
124 // lane-av1-ibc128chunk: the 128-root intrabc strip's per-axis chroma
125 // mu-chunk walk -- unit count and the `(64>>ss_x)|(64>>ss_y)` extent.
126 println!(
127 "intrabc_128rect_chroma_chunk: units={} shape=0x{:x}",
128 ec_av1::stream::intrabc_128rect_chroma_chunk_hits(),
129 ec_av1::stream::intrabc_128rect_chunk_shape()
130 );
131 let (rtu, rsplit, robmc) = ec_av1::stream::rect_inter_tu_counters();
132 println!("rect_inter: tu={rtu} txsplit={rsplit} obmc_leaf={robmc}");
133 println!(
134 "sub8_inter_split: groups={}",
135 ec_av1::decode::sub8_inter_split_hits()
136 );
137 println!(
138 "skip_split_tx_override: {}",
139 ec_av1::decode::skip_split_tx_override_hits()
140 );
141 println!(
142 "interintra_rect: {}",
143 ec_av1::decode::interintra_rect_hits()
144 );
145 println!(
146 "gm_nontrans_small_side: {}",
147 ec_av1::decode::gm_nontrans_small_side_hits()
148 );
149 println!(
150 "tr_reach_longer_side: {}",
151 ec_av1::decode::tr_reach_longer_side_hits()
152 );
153 println!(
154 "mv_clamp_edge_overhang: {}",
155 ec_av1::mvstack::mv_clamp_edge_overhang_hits()
156 );
157 let (h84, h48) = ec_av1::decode::sub8_inter_rect_hits();
158 println!("sub8_inter_rect: horz8x4={h84} vert4x8={h48}");
159 println!(
160 "llintra8_chroma_walk: {}",
161 ec_av1::decode::llintra8_chroma_walk_hits()
162 );
163 println!(
164 "sub8rect444_chroma_walk: {}",
165 ec_av1::decode::llsub8rect444_chroma_walk_hits()
166 );
167 let si = ec_av1::stream::sub8_intra_rect_hits();
168 println!(
169 "sub8_intra_rect: horz8x4={} vert4x8={} chroma_ref={} mixed={} split4x4={}",
170 si.0, si.1, si.2, si.3, si.4
171 );
172 let leaf = ec_av1::stream::vartx_rect_leaf_hits();
173 println!("vartx_rect_leaf: 32x16={} 16x32={}", leaf[0], leaf[1]);
174 // lane-inter16ab r1: the 16x16-level inter AB arms, so a recipe sweep
175 // can tell "aomenc never picked one" from "it did and we decoded it".
176 let ab = ec_av1::decode::ab16_inter_hits_by_arm();
177 println!(
178 "inter_ab16: horz_a={} horz_b={} vert_a={} vert_b={}",
179 ab[0], ab[1], ab[2], ab[3]
180 );
181 // lane-kf900 r1: the counter the skipped-8x8-split-transform gate
182 // asserts -- printed here so a recipe sweep can see it fire without a
183 // test-binary rebuild.
184 println!("skip_split_tx: {}", ec_av1::decode::skip_split_tx_hits());
185 let es = ec_av1::decode::inter_edge_strip_hits();
186 println!(
187 "inter_edge_strip: h64={} v64={} h32={} v32={} h16={} v16={}",
188 es[0], es[1], es[2], es[3], es[4], es[5]
189 );
190 let (h4, v4, pairs, sub8) = ec_av1::decode::inter16_rect4_counters();
191 println!("inter16_1to4: horz4={h4} vert4={v4} chroma_pairs={pairs} sub8_pieces={sub8}");
192 let leaf4 = ec_av1::stream::vartx_rect_leaf4_hits();
193 println!("vartx_rect_leaf4: 8x4={} 4x8={}", leaf4[0], leaf4[1]);
194 // lane-av1txr: intrabc 4x8/8x4 leaves that read the inter var-tx tree
195 // (the symbol whose absence desynced `warped.obu`).
196 println!(
197 "rect_intrabc_vartx: {}",
198 ec_av1::decode::rect_intrabc_vartx_hits()
199 );
200 let rw = ec_av1::stream::rect_wedge_hits();
201 let rwi = ec_av1::stream::rect_wii_hits();
202 println!("rect_wedge(8x16,16x8,16x32,32x16,8x32,32x8): compound={rw:?} interintra={rwi:?}");
203 // lane-inter128intra r1: the 128 root's HORZ/VERT half coded INTRA in
204 // an INTER frame -- the arm this round implemented.
205 let i128 = ec_av1::stream::intra128_in_inter_counters();
206 println!("intra128_in_inter: 128x64={} 64x128={}", i128[0], i128[1]);
207 // lane-lossless128: intra 128-axis blocks on a LOSSLESS frame (every
208 // plane TX_4X4) -- the shape whose reconstruction used to panic.
209 println!(
210 "intra128_lossless: {}",
211 ec_av1::stream::intra128_lossless_counters()
212 );
213 let sb = ec_av1::stream::sb128_rect_counters();
214 println!(
215 "sb128_rect: edge_horz={} edge_vert={} inter_128x64={} inter_64x128={}",
216 sb.0, sb.1, sb.2, sb.3
217 );
218 // lane-av1-ibcrect: the interior 128-root partition arms and the key
219 // frame's intra 128-axis blocks, so a recipe sweep can tell "the
220 // encoder never chose HORZ/VERT at the 128 root" from "it did".
221 let p128 = ec_av1::stream::part128_census();
222 println!(
223 "part128: split={} none={} horz={} vert={} ab={:?} intra_horz={} intra_vert={}",
224 p128.0, p128.1, p128.2, p128.3, p128.4, p128.5, p128.6
225 );
226 // lane-sbab r1: the superblock-level inter AB arms.
227 let sbab = ec_av1::decode::sb_ab_inter_hits_by_arm();
228 println!(
229 "inter_ab64: horz_a={} horz_b={} vert_a={} vert_b={}",
230 sbab[0], sbab[1], sbab[2], sbab[3]
231 );
232 let i4 = ec_av1::stream::intra_rect4_in_inter_counters();
233 println!(
234 "intra_rect4_in_inter: 64x16={} 16x64={} 32x8={} 8x32={}",
235 i4.0, i4.1, i4.2, i4.3
236 );
237 // lane-cdefstrip r1: 8x8 CDEF units whose skip band no coded block
238 // wrote this frame -- non-zero means a decode arm forgot
239 // `fill_skip_grid_rect`, and CDEF filtered a unit libaom may skip.
240 println!(
241 "cdef_unwritten_skip_units: {}",
242 ec_av1::decode::cdef_unwritten_skip_units()
243 );
244 println!(
245 "cdef_band: rect_skip_writes={} mixed_skip_units={}",
246 ec_av1::decode::rect_skip_band_hits(),
247 ec_av1::decode::cdef_mixed_skip_units()
248 );
249 let ir = ec_av1::stream::inter_rect_counters();
250 println!(
251 "inter_rect: 32x8={} 8x32={} 64x32={} 32x64={} 64x16={} 16x64={}",
252 ir.0, ir.1, ir.2, ir.3, ir.4, ir.5
253 );
254 // lane-rectres r1: how many of those 32x8/8x32 strips coded a real
255 // rectangular residual transform unit (a skipped one codes none).
256 println!(
257 "sub8_chroma_tx_from_ref: {}",
258 ec_av1::stream::sub8_chroma_tx_from_ref_hits()
259 );
260 let r328 = ec_av1::stream::rect32x8_inter_tu_hits();
261 println!("rect32x8_inter_tu: 32x8={} 8x32={}", r328[0], r328[1]);
262 // lane-intra16x4: INTRA strips of an inter 16x16-level 1:4 partition.
263 let i164 = ec_av1::stream::intra16x4_in_inter_hits();
264 println!(
265 "intra16x4_in_inter: 16x4={} 4x16={} chroma_ref={}",
266 i164.0, i164.1, i164.2
267 );
268 println!(
269 "rect4_16_pair: lossless_chroma={} intrabc={}",
270 ec_av1::decode::rect4_16_lossless_chroma_hits(),
271 ec_av1::decode::rect4_16_intrabc_hits(),
272 );
273 println!(
274 "loss64: chroma_edge_tu_clip={} skip_lossless_band_reset={}",
275 ec_av1::decode::chroma_edge_tu_clip_hits(),
276 ec_av1::decode::skip_lossless_band_reset_hits(),
277 );
278 println!(
279 "llband: rect_split_lossless_chroma444={}",
280 ec_av1::decode::rect_split_lossless_chroma444_hits()
281 );
282 // lane-t900 r12: chroma edge-filter neighbour answered from the mi-granular
283 // uv_mode grid instead of the coarse one-slot-per-column map.
284 println!(
285 "scaled: leaf8={} sub8={} warpfb={} predict_scaled={}",
286 ec_av1::decode::scaled_leaf8_hits(),
287 ec_av1::decode::scaled_sub8_hits(),
288 ec_av1::decode::scaled_warp_fallback_hits(),
289 ec_av1::mc::predict_scaled_hits()
290 );
291 println!(
292 "uv_mode_grid_override: {}",
293 ec_av1::decode::uv_mode_grid_override_hits()
294 );
295 // lane-thread2: proof the frame-parallel path actually fired (0 at
296 // the default EC_AV1_THREADS=1).
297 println!("frames_dispatched: {}", ec_av1::stream::frames_dispatched());
298 // lane-av1recipehunt: `intra_rect4_in_inter` above already reports the
299 // 1:4-in-inter shapes; this is the `delta_q` half of the same story --
300 // how many delta_q groups the stream really carried, and how many of
301 // them landed inside a rect64 dequant.
302 let (dq, dq_drift) = ec_av1::stream::rect64_qidx_drift_counters();
303 println!("delta_q: groups_read={dq} rect64_qidx_drift={dq_drift}");
304 // lane-av1422census422: the per-plane coefficient-unit census, armed
305 // for 4:4:4 and 4:2:2 (4:2:0 arms nothing, so a 4:2:0 recipe sweep
306 // reads `luma=0 u=0 v=0` BY DESIGN and must not read that as "the
307 // walk was empty" -- `units_total` is the UNCONDITIONAL per-frame
308 // total, so the two together say whether the census was armed at
309 // all). This is what makes a 4:2:2 non-vacuity requirement
310 // writable: before the widening every per-plane field read zero on a
311 // 4:2:2 cell BY CONSTRUCTION, so a byte-exact 4:2:2 gate could
312 // assert it and prove nothing about the stream it had decoded.
313 let cu = ec_av1::decode::census_nonsub_units();
314 let cc = ec_av1::decode::census_nonsub_coded();
315 println!(
316 "census_units: luma={} u={} v={} | coded: luma={} u={} v={} | units_total={}",
317 cu[0],
318 cu[1],
319 cu[2],
320 cc[0],
321 cc[1],
322 cc[2],
323 ec_av1::decode::census_unit_n(),
324 );
325 };
326 // lane-tiles: the tiling a real stream actually uses is a decision input
327 // (every gate in `stream.rs` picks its own `--tile-columns`), so report it
328 // from the frame headers before saying anything about pixels.
329 let mut parser = ec_av1_syntax::Av1Parser::new();
330 let mut seen: Vec<(u32, u32, bool, u32)> = Vec::new();
331 let mut pos = 0usize;
332 let mut frames_seen = 0usize;
333 // OBU at a time, so one unparseable OBU late in the stream still leaves
334 // every earlier frame header's tiling reported.
335 while pos < data.len() {
336 let Ok(obu) = parser.parse_obu(&data[pos..]) else {
337 break;
338 };
339 pos += obu.total_size.max(1);
340 let header = match &obu.kind {
341 ec_av1_syntax::ObuKind::FrameHeader(h) => h,
342 ec_av1_syntax::ObuKind::Frame(h, _) => h,
343 _ => continue,
344 };
345 frames_seen += 1;
346 // lane-frame36: `EC_PROBE_HDR=1` prints one line per frame header, so a
347 // silent wall can be triaged by "which header field is new at frame N"
348 // before any pixel work (class: a header field parsed then never consumed).
349 if std::env::var("EC_PROBE_HDR").is_ok() {
350 let h = header;
351 let gm: Vec<String> = h
352 .global_motion
353 .iter()
354 .map(|w| format!("{:?}", w.model))
355 .collect();
356 println!(
357 "HDR {}: type={:?} show={} showable={} show_existing={}({}) intra={} \
358 size={}x{} up={} superres={}/{} order_hint={} primary_ref={} refresh={:#04x} \
359 refs={:?} order_hints={:?} sign_bias={:?} err_res={} disable_cdf={} \
360 screen_tools={} int_mv={} intrabc={} hp_mv={} interp={:?} switchable_motion={} \
361 ref_mvs={} base_q={} seg={} deltaq={} deltalf={} lf_level={:?} lf_deltas={:?}/{:?} \
362 cdef_bits={} lr={:?} tx_mode={:?} ref_sel={} skip_mode={}({:?}) warp={} \
363 reduced_tx={} gm={:?} grain={}/seed={} lossless={}",
364 frames_seen - 1,
365 h.frame_type,
366 h.show_frame,
367 h.showable_frame,
368 h.show_existing_frame,
369 h.frame_to_show_map_idx,
370 h.frame_is_intra,
371 h.frame_width,
372 h.frame_height,
373 h.upscaled_width,
374 h.use_superres,
375 h.superres_denom,
376 h.order_hint,
377 h.primary_ref_frame,
378 h.refresh_frame_flags,
379 h.ref_frame_idx,
380 h.order_hints,
381 h.ref_frame_sign_bias,
382 h.error_resilient_mode,
383 h.disable_cdf_update,
384 h.allow_screen_content_tools,
385 h.force_integer_mv,
386 h.allow_intrabc,
387 h.allow_high_precision_mv,
388 h.interpolation_filter,
389 h.is_motion_mode_switchable,
390 h.use_ref_frame_mvs,
391 h.quantization.base_q_idx,
392 h.segmentation.enabled,
393 h.delta.q_present,
394 h.delta.lf_present,
395 h.loop_filter.level,
396 h.loop_filter.ref_deltas,
397 h.loop_filter.mode_deltas,
398 h.cdef.bits,
399 h.loop_restoration.frame_restoration_type,
400 h.tx_mode,
401 h.reference_select,
402 h.skip_mode_present,
403 h.skip_mode_frame,
404 h.allow_warped_motion,
405 h.reduced_tx_set,
406 gm,
407 h.film_grain.apply_grain,
408 h.film_grain.grain_seed,
409 h.coded_lossless,
410 );
411 }
412 let t = &header.tile_info;
413 let entry = (t.cols, t.rows, t.uniform_spacing, t.context_update_tile_id);
414 if !seen.contains(&entry) {
415 seen.push(entry);
416 }
417 }
418 println!("TILING: {frames_seen} frame headers parsed");
419 // lane-sb128 r4: the superblock size decides the whole partition tree, so
420 // report it next to the tiling -- it is the first thing a film blocker
421 // triage needs.
422 if let Some(seq) = parser.sequence_header() {
423 println!(
424 "SEQ: use_128x128_superblock={} bit_depth={} mono_chrome={} max_frame={}x{}",
425 seq.use_128x128_superblock,
426 seq.color_config.bit_depth,
427 seq.color_config.mono_chrome,
428 seq.max_frame_width,
429 seq.max_frame_height
430 );
431 }
432 for (cols, rows, uniform, ctx_id) in &seen {
433 println!(
434 "TILING: cols={cols} rows={rows} uniform_spacing={uniform} context_update_tile_id={ctx_id}"
435 );
436 }
437 if seen.is_empty() {
438 println!("TILING: no frame header parsed");
439 }
440
441 // lane-streamsink r1: decode through the streaming entry point and write
442 // each shown frame out as it completes. The old path collected every
443 // picture in a Vec and then built a second full copy of the raw dump
444 // before one `fs::write`, so peak RSS was 2x the whole decoded segment (a
445 // 4K 8 s window needed >20 GiB, a whole film terabytes). Here at most one
446 // frame is held beyond the decoder's own DPB, and the printed lines are
447 // byte-identical to the old ones.
448 // `EC_PROBE_OUT16` is yuv420p10le (u16 LE); `EC_PROBE_OUT` / argv[2] is
449 // 8-bit (planes are u16, low byte taken). Either target may be a FIFO.
450 use std::io::Write;
451 let open = |path: &str| {
452 std::fs::OpenOptions::new()
453 .write(true)
454 .create(true)
455 .truncate(true)
456 .open(path)
457 .unwrap_or_else(|e| panic!("opening {path}: {e}"))
458 };
459 let out16 = std::env::var("EC_PROBE_OUT16").ok();
460 let out8 = std::env::args()
461 .nth(2)
462 .or_else(|| std::env::var("EC_PROBE_OUT").ok());
463 let null16 = out16.as_deref() == Some("/dev/null");
464 let mut f16 = out16.as_deref().map(open);
465 let mut f8 = out8.as_deref().map(open);
466 let mut written16 = 0usize;
467 let mut written8 = 0usize;
468 let mut shown = 0usize;
469 let mut dims = (0usize, 0usize);
470 let mut buf: Vec<u8> = Vec::new();
471 // lane-av1mono: a monochrome stream is luma only, so the raw dump is a
472 // single plane -- exactly what `ffmpeg -pix_fmt gray -f rawvideo` writes.
473 let mono = parser
474 .sequence_header()
475 .is_some_and(|s| s.color_config.mono_chrome);
476 let result = ec_av1::stream::decode_stream_with(&data, |f, _idx, is_shown| {
477 if !is_shown {
478 return Ok(());
479 }
480 shown += 1;
481 if shown == 1 {
482 dims = (f.width, f.height);
483 }
484 let planes: &[&Vec<u16>] = if mono { &[&f.y] } else { &[&f.y, &f.u, &f.v] };
485 if let Some(w) = f16.as_mut() {
486 let n = 2 * planes.iter().map(|p| p.len()).sum::<usize>();
487 if null16 {
488 // Timing runs point EC_PROBE_OUT16 at /dev/null; the u16->LE
489 // conversion was ~2% of the main thread for bytes nobody reads.
490 written16 += n;
491 } else {
492 buf.clear();
493 buf.resize(n, 0);
494 let mut off = 0;
495 for p in planes {
496 let end = off + 2 * p.len();
497 for (d, &s) in buf[off..end].as_chunks_mut::<2>().0.iter_mut().zip(p.iter()) {
498 d.copy_from_slice(&s.to_le_bytes());
499 }
500 off = end;
501 }
502 w.write_all(&buf).expect("writing raw planes");
503 written16 += buf.len();
504 }
505 }
506 if let Some(w) = f8.as_mut() {
507 buf.clear();
508 for p in planes {
509 buf.extend(p.iter().map(|&s| s as u8));
510 }
511 w.write_all(&buf).expect("writing raw planes");
512 written8 += buf.len();
513 }
514 Ok(())
515 });
516 match result {
517 Ok(()) if shown == 0 => {
518 println!("OK but EMPTY: no frames -- is {path} an IVF rather than a raw OBU stream?");
519 }
520 Ok(()) => {
521 if let Some(out) = &out16 {
522 println!("wrote {written16} bytes of yuv420p10le to {out}");
523 }
524 if let Some(out) = &out8 {
525 println!("wrote {written8} bytes of yuv420p to {out}");
526 }
527 println!("OK: {shown} frames decoded, {}x{}", dims.0, dims.1);
528 }
529 Err(e) => println!("REFUSED: {e}"),
530 }
531 report();
532}