From 4682d3c5692ea235d251d392c367826b5189bd42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Dec 2026 15:11:54 +0300 Subject: [PATCH] S5: drop unused decode probe getters and inter-shape constant; narrow glob re-exports to pub(crate) --- crates/ec-av1/src/decode/inter_shapes.rs | 10 ---------- crates/ec-av1/src/decode/key_tile.rs | 12 ------------ crates/ec-av1/src/decode/mod.rs | 20 ++------------------ 3 files changed, 2 insertions(+), 40 deletions(-) diff --git a/crates/ec-av1/src/decode/inter_shapes.rs b/crates/ec-av1/src/decode/inter_shapes.rs index 25806e0a..298d6dbb 100644 --- a/crates/ec-av1/src/decode/inter_shapes.rs +++ b/crates/ec-av1/src/decode/inter_shapes.rs @@ -266,20 +266,10 @@ pub(crate) const INTER_BLOCK_SHAPES: [(usize, usize, usize); 18] = [ (128, 64, 128), ]; -/// Bit 31 of [`inter_block_shape_mask`]: a `(side, write_w, write_h)` triple -/// outside [`INTER_BLOCK_SHAPES`]. -pub const INTER_BLOCK_SHAPE_UNLISTED: u32 = 1 << 31; - thread_local! { pub(super) static INTER_BLOCK_SHAPE_MASK: std::cell::Cell = const { std::cell::Cell::new(0) }; } -/// Which of [`INTER_BLOCK_SHAPES`] this THREAD has decoded (thread-local, so a -/// gate reading it sees only the streams it decoded itself). -pub fn inter_block_shape_mask() -> u32 { - INTER_BLOCK_SHAPE_MASK.with(std::cell::Cell::get) -} - /// The luma coefficient/`tx_type` table set of a whole-block rectangular /// INTER transform unit (lane-inter4 r3). `av1_get_ext_tx_set_type` splits /// the two shapes: a 32x16/16x32 unit has `tx_size_sqr_up == TX_32X32`, so diff --git a/crates/ec-av1/src/decode/key_tile.rs b/crates/ec-av1/src/decode/key_tile.rs index 5676b659..3f2644a0 100644 --- a/crates/ec-av1/src/decode/key_tile.rs +++ b/crates/ec-av1/src/decode/key_tile.rs @@ -183,18 +183,6 @@ thread_local! { pub(crate) static MU_CHUNK_INTRA_IN_INTER_UNITS: std::cell::Cell = const { std::cell::Cell::new(0) }; } -/// Current value of [`MU_CHUNK_COMPOUND_UNITS`], for a gate's before/after -/// delta. -pub fn mu_chunk_compound_units() -> usize { - MU_CHUNK_COMPOUND_UNITS.with(std::cell::Cell::get) -} - -/// Current value of [`MU_CHUNK_INTRA_IN_INTER_UNITS`], for a gate's -/// before/after delta. -pub fn mu_chunk_intra_in_inter_units() -> usize { - MU_CHUNK_INTRA_IN_INTER_UNITS.with(std::cell::Cell::get) -} - thread_local! { /// lane-av1h5: chunk-major chroma WALKS run for a 128-root plane block -- /// one per 64x64 mu chunk. libaom codes exactly 4 per unsplit 128x128 root diff --git a/crates/ec-av1/src/decode/mod.rs b/crates/ec-av1/src/decode/mod.rs index 80a8c7fe..557a8fc5 100644 --- a/crates/ec-av1/src/decode/mod.rs +++ b/crates/ec-av1/src/decode/mod.rs @@ -79,7 +79,7 @@ mod cdef; use cdef::*; mod inter_shapes; -pub use inter_shapes::*; +pub(crate) use inter_shapes::*; mod deblock; pub(crate) use deblock::*; @@ -91,7 +91,7 @@ mod replay; pub(crate) use replay::*; mod key_tile; -pub use key_tile::*; +pub(crate) use key_tile::*; mod inter_ctx; pub(crate) use inter_ctx::*; @@ -2276,11 +2276,6 @@ thread_local! { static UV_LEFT_SS_Y_READS: std::cell::Cell = const { std::cell::Cell::new(0) }; } -/// Current value of [`UV_LEFT_SS_Y_READS`]. -pub fn uv_left_ss_y_reads() -> usize { - UV_LEFT_SS_Y_READS.with(|c| c.get()) -} - // lane-av1leftwit: the per-tile epoch `uv_owner` cells are stamped with. // Bumped in `Neighbours::start_tile`; never read by decode logic. thread_local! { @@ -2458,17 +2453,6 @@ thread_local! { static CDEF_MIXED_SKIP_UNITS: std::cell::Cell = const { std::cell::Cell::new(0) }; } -/// Current value of `CDEF_MIXED_SKIP_UNITS`. -pub fn cdef_mixed_skip_units() -> usize { - CDEF_MIXED_SKIP_UNITS.with(|c| c.get()) -} - -/// How many 8x8 CDEF units [`apply_cdef`] visited whose skip band no coded -/// block wrote this frame -- a writer gap, always a defect (lane-cdefstrip r1). -pub fn cdef_unwritten_skip_units() -> usize { - CDEF_UNWRITTEN_SKIP_UNITS.with(|c| c.get()) -} - // Which plane the in-flight INTRA reconstruction is writing (0=Y, 1=U, 2=V). // lane-av1cmpaudit: aomdec's `EC_PREDOUT8`/`EC_PREDND` print `plane=`, and // without the same field on our side an `EC_PREDOUT8` vs `OUR_PRED` diff of a