diff --git a/crates/ec-av1/src/decode/block.rs b/crates/ec-av1/src/decode/block.rs index e95f7fe7..dc728614 100644 --- a/crates/ec-av1/src/decode/block.rs +++ b/crates/ec-av1/src/decode/block.rs @@ -694,13 +694,6 @@ pub(super) fn refuse_invalid_subsize( part: usize, fctx: &crate::decode::FrameCtx, ) -> Result<()> { - // lane-av1unwritten r6: the coverage artefact. A guard that sits INSIDE a - // `PARTITION_HORZ_A..=PARTITION_VERT_B` arm can only ever observe 4..=7, so - // "the guard is present" is not evidence that an offending value is caught -- - // which is exactly how r5's three misplaced guards read as coverage. This - // records, per CALL SITE and per partition value, how often the guard was - // reached and how often it fired, so a site that never sees an offending - // value is visible instead of assumed covered. let (bw, bh) = partition_subsize_dims(bsize, part); if chroma_plane_block_codable(bw, bh, ss_x(fctx), ss_y(fctx)) { Ok(()) @@ -709,56 +702,6 @@ pub(super) fn refuse_invalid_subsize( } } -/// lane-av1unwritten r6: the OTHER half of the coverage artefact. The guard -/// table says what the guards see; this says what each DISPATCH ARM sees, so a -/// dispatch reached with an offending partition value and no guard above it is a -/// visible hole rather than an absence nobody noticed. `decode_probe` calls -/// [`dump_subsize_arm_scan`] at exit under `EC_AV1_SUBSIZE_ARM_TRACE`. -pub(super) static SUBSIZE_ARM: std::sync::LazyLock< - std::sync::Mutex>, -> = std::sync::LazyLock::new(|| std::sync::Mutex::new(Default::default())); - -/// Prints and clears the [`note_subsize_arm`] table. -pub fn dump_subsize_arm_scan() { - let Ok(mut m) = SUBSIZE_ARM.lock() else { - return; - }; - for ((site, k), n) in m.iter() { - eprintln!( - "SUBSIZE_ARM site={site} part={} codable={} reached={n}", - k / 2, - if k % 2 == 1 { "true" } else { "false" }, - ); - } - m.clear(); -} - -/// Per-site, per-value counters for [`refuse_invalid_subsize`], plus the dump -/// that makes the reach/guard split readable. `EC_AV1_SUBSIZE_GUARD_TRACE` -/// records; `dump_subsize_guard_scan` prints (and clears) the table. -pub(super) static SUBSIZE_GUARD: std::sync::LazyLock< - std::sync::Mutex>, -> = std::sync::LazyLock::new(|| std::sync::Mutex::new(Default::default())); - -/// Prints and clears the [`refuse_invalid_subsize`] table: one line per -/// (site, block, partition value) with the times reached and whether the guard -/// fired. `decode_probe` calls this at exit. -pub fn dump_subsize_guard_scan() { - let Ok(mut m) = SUBSIZE_GUARD.lock() else { - return; - }; - for ((site, bsize, part, codable), n) in m.iter() { - eprintln!( - "SUBSIZE_GUARD site={site} bsize={}x{} part={part} codable={codable} \ - reached={n}{}", - bsize / 256, - bsize % 256, - if *codable { "" } else { " FIRED" }, - ); - } - m.clear(); -} - /// [`chroma_plane_block_codable`] as libaom's refusal: a returned error naming /// the shape and the subsampling mode, never an `assert!` -- a partition symbol /// is stream data, so a hostile file can reach it. @@ -1736,14 +1679,6 @@ pub(super) fn decode_block( // leaf list per leaf (libaom `decode_token_recon_block`, whose token // loop reconstructs whatever `read_tx_size_vartx` resolved, per // transform unit), so mixed sizes reconstruct at their own stride. - // The counter marks the shape so a gate can prove a witness actually - // carries a mixed tree and not merely another uniform one. - let uniform = leaves.first().is_some_and(|f| { - leaves - .iter() - .all(|l| (l.2, l.3) == (f.2, f.3) && l.2 == l.3) - }); - if !uniform {} Some(leaves) } else { None diff --git a/crates/ec-av1/src/decode/coeffs.rs b/crates/ec-av1/src/decode/coeffs.rs index 2fed7a80..47658cb8 100644 --- a/crates/ec-av1/src/decode/coeffs.rs +++ b/crates/ec-av1/src/decode/coeffs.rs @@ -2064,7 +2064,6 @@ impl Neighbours { c, ss_x(fctx), ss_y(fctx), - true, ) } @@ -2073,18 +2072,6 @@ impl Neighbours { /// counter wants this: it measures how often the snap CHANGES the answer, /// which is what the lane-kf1200/kf900 chroma-reference fix buys. Every /// decode path uses the snapping form. - /// `decode_path` is `true` only for the snapping form every decode call - /// site uses; the 16x4/4x16 pair witness's mirror passes `false`, so the - /// `+ss_y` counters measure a read that actually filters a chroma edge and - /// not the counter-only one. - /// - /// lane-av1leftwit: the mirror's justification used to be "no committed - /// fixture reaches the shape on the decode path", and that was false -- - /// `UV_LEFT_1MI_SPLIT_HITS` fires on five of them. The flag stays (a - /// counter-only mirror at an ODD mi row is still not a decode-path read, - /// and its result feeds only `RECT4_16_UV_PAIR_FILT_HITS`), but it is no - /// longer evidence about the `+ss_y` term, and nothing may cite it as such. - /// The decode path's own reach is `uv_left_1mi_split_hits()`. // Signature mirrors the spec's per-call inputs; a parameter struct would only move them. #[allow(clippy::too_many_arguments)] pub(super) fn smooth_uv_neighbour_unsnapped( @@ -2095,7 +2082,6 @@ impl Neighbours { c: usize, ss_x: usize, ss_y: usize, - decode_path: bool, ) -> bool { // lane-mtfix r1: availability is TILE-relative on BOTH axes and on the // coarse fallback too. `above_uv_mode` is a frame-wide [`SUB`]-grid @@ -2106,9 +2092,6 @@ impl Neighbours { // at chroma (120, 32), the top-right tile's first block). let have_above = mi_r > self.tile_row0_mi; let have_left = mi_c > self.tile_col0_mi; - if self.tile_row0_mi > 0 && !have_above && self.above_uv_mode[c] != DC_PRED - || self.tile_col0_mi > 0 && !have_left && self.left_uv_mode[r] != DC_PRED - {} // The mi grid is libaom's own read; the two maps below stay as the // fallback for cells no block has written (see [`Self::uv_mode_grid`]). let cell = |grid: &Vec, row: usize, col: usize| -> Option { @@ -2196,40 +2179,6 @@ impl Neighbours { // every committed fixture and every one of the ~1000 encodes swept in // `lanes/av1leftref.report.md`, which is what makes the read change a // proven no-op on today's material rather than an unmeasured guess. - if decode_path && have_left && ss_y > 0 { - // The pre-lane read, kept as the counter's own-row arm: it is what - // this decoder answered before the `+ss_y` term landed, and - // comparing against it is what proves the term is load-bearing. - // lane-av1leftwit: the geometry the `+ss_y` term needs. The two - // cells are one left mi column apart, so they are two different - // blocks exactly when the left neighbour is 1 mi tall or shorter. - let col = left_mi.1; - let epoch = UV_OWNER_EPOCH.with(|c| c.get()) & 0xff00_0000; - let own = (col < self.uv_grid_cols) - .then(|| self.uv_owner.get(mi_r * self.uv_grid_cols + col).copied()) - .flatten() - .filter(|o| o & 0xff00_0000 == epoch) - .unwrap_or(0); - let down = self - .uv_owner - .get((mi_r + ss_y) * self.uv_grid_cols + col) - .copied() - .filter(|o| o & 0xff00_0000 == epoch) - .unwrap_or(0); - if own != 0 && down != 0 && own != down {} - } - if have_above && cell(&self.uv_mode_grid, mi_r - 1, mi_c).is_some_and(|m| { - !matches!(self.uv_mode_col.get(mi_c), Some(&(row, cm)) if usize::from(row) == mi_r - 1 && usize::from(cm) == m) - }) || have_left && cell(&self.uv_mode_grid, left_mi.0, left_mi.1).is_some_and(|m| { - !matches!(self.uv_mode_row.get(left_mi.0), Some(&(col, cm)) if usize::from(col) == left_mi.1 && usize::from(cm) == m) - }) { - } - // lane-cfl r1 counter: how often the mi-exact chroma neighbour differs - // from the coarse [`SUB`] slot -- i.e. how often a chroma edge would - // have been filtered at the wrong strength by the coarse map alone. - if (is_smooth_mode(self.above_uv_mode[c]) && !is_smooth_mode(above)) - || (is_smooth_mode(self.left_uv_mode[r]) && !is_smooth_mode(left)) - {} is_smooth_mode(above) || is_smooth_mode(left) } @@ -2282,14 +2231,6 @@ impl Neighbours { let (mi_r, mi_c) = (r * (SUB / MI), c * (SUB / MI)); let (above, left) = self.modes_above_left_mi(mi_r, mi_c, (self.above_mode[c], self.left_mode[r])); - if (is_smooth_mode(self.above_mode[c]) && !is_smooth_mode(above)) - || (is_smooth_mode(self.left_mode[r]) && !is_smooth_mode(left)) - {} - // A neighbour the coarse band offered where the tile edge makes it - // unavailable -- must never happen (see `MODE_TILE_EDGE_COARSE_LEAKS`). - if (mi_r <= self.tile_row0_mi && self.above_mode[c] != DC_PRED) - || (mi_c <= self.tile_col0_mi && self.left_mode[r] != DC_PRED) - {} (above, left) } @@ -2489,8 +2430,6 @@ impl Neighbours { // units rather than in luma mi. let (step_x, step_y) = (w_px / MI, h_px / MI); // the flags read the CALLER's origin, before the shadowing align below - let (row_mid, col_mid) = (mi_r & (step_y - 1) != 0, mi_c & (step_x - 1) != 0); - if row_mid || col_mid {} let (mi_r, mi_c) = (mi_r & !(step_y - 1), mi_c & !(step_x - 1)); let round_up_even = |n: usize| n.div_ceil(2) * 2; let (bound_h, bound_w) = (round_up_even(self.mi_rows), round_up_even(self.mi_cols)); diff --git a/crates/ec-av1/src/decode/frame_tile.rs b/crates/ec-av1/src/decode/frame_tile.rs index cf26a1d4..3a7920f2 100644 --- a/crates/ec-av1/src/decode/frame_tile.rs +++ b/crates/ec-av1/src/decode/frame_tile.rs @@ -975,9 +975,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( bw, bh ); - if horz { - } else { - } } // One `cdef_idx` per BLOCK, copied to every 64x64 CDEF unit it // covers -- both halves of the root read their own, and the @@ -1213,7 +1210,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( bw, bh ); - if !four && i == 0 && ((horz && !has_rows) || (!horz && !has_cols)) {} } continue; } @@ -1588,9 +1584,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( // residual path (`rect_inter_residual_supported` // covers 16x8/8x16 since this round). let horz = part16 == PARTITION_HORZ; - if horz { - } else { - } let base_mi = sub16_to_mi(at16); let (ww, wh) = if horz { (16, 8) } else { (8, 16) }; for piece in 0..2 { @@ -1870,9 +1863,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( bw, bh ); - if horz { - } else { - } } } else if part16 != PARTITION_SPLIT { return Err(unsupported( @@ -1892,11 +1882,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( // 7.11.3.3's scaled walk. The counter is what // proves a gate actually reached a scaled // leaf rather than a same-size reference. - if (1..8).any(|rf| { - refpix - .dims(rf) - .is_some_and(|(w, _)| w != frame_width as usize) - }) {} let mut prev_leaves: Vec<( (usize, usize), bool, @@ -2290,7 +2275,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( (frame_width as usize, frame_height as usize), fctx, )?; - if !has_rows32 {} // lane-golomb r2: at the frame edge only the first half of the // strip is coded (libaom `decode_partition` guards the second // with the same has_rows32 test that made this partition non-square). @@ -2342,7 +2326,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( (frame_width as usize, frame_height as usize), fctx, )?; - } else { } } PARTITION_VERT => { @@ -2393,7 +2376,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( (frame_width as usize, frame_height as usize), fctx, )?; - if !has_cols32 {} // lane-golomb r2: at the frame edge only the first half of the // strip is coded (libaom `decode_partition` guards the second // with the same has_cols32 test that made this partition non-square). @@ -2445,7 +2427,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( (frame_width as usize, frame_height as usize), fctx, )?; - } else { } } PARTITION_HORZ_A => { @@ -2939,9 +2920,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( bw, bh ); - if horz { - } else { - } } } _ => { @@ -3035,7 +3013,6 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( &mut v, cdef, &neighbours, - (frame_width as usize, frame_height as usize), fctx, None, None, diff --git a/crates/ec-av1/src/decode/inter_block.rs b/crates/ec-av1/src/decode/inter_block.rs index 479a6a3c..d3dc898e 100644 --- a/crates/ec-av1/src/decode/inter_block.rs +++ b/crates/ec-av1/src/decode/inter_block.rs @@ -470,10 +470,6 @@ pub(super) fn decode_inter_block( // alone, which counts blocks that are not global-mv blocks at // all, so its number was an upper bound dressed up as an // engagement figure. - if mi_row < mi_rows as usize / 2 { - if is_globalmv {} - if is_global_mv0 || is_global_mv1 {} - } // libaom `av1_init_warp_params` + `allow_warp`'s // `global_warp_allowed` branch, run once per reference for a // compound block exactly as for a single-ref one (reconinter.c @@ -2228,7 +2224,6 @@ pub(super) fn decode_inter_block( .mask(0, wedge_index), side, )); - } else { } interintra_mode = Some(ii); // The inter-intra predictor reads this block's neighbours as already diff --git a/crates/ec-av1/src/decode/inter_block8.rs b/crates/ec-av1/src/decode/inter_block8.rs index 680bd5cf..fafc98e9 100644 --- a/crates/ec-av1/src/decode/inter_block8.rs +++ b/crates/ec-av1/src/decode/inter_block8.rs @@ -1426,7 +1426,6 @@ pub(super) fn decode_inter_block8( .mask(0, wedge_index), SIDE, )); - } else { } interintra_mode = Some(ii); // The inter-intra predictor reads this block's neighbours as already diff --git a/crates/ec-av1/src/decode/inter_ctx.rs b/crates/ec-av1/src/decode/inter_ctx.rs index 145510fd..6201e05c 100644 --- a/crates/ec-av1/src/decode/inter_ctx.rs +++ b/crates/ec-av1/src/decode/inter_ctx.rs @@ -923,7 +923,6 @@ pub(super) fn read_single_ref( if p4 == 1 { LAST2_FRAME } else { LAST_FRAME } } }; - if ref_frame != LAST_FRAME {} ref_frame } diff --git a/crates/ec-av1/src/decode/key_tile.rs b/crates/ec-av1/src/decode/key_tile.rs index a3979c40..660e93af 100644 --- a/crates/ec-av1/src/decode/key_tile.rs +++ b/crates/ec-av1/src/decode/key_tile.rs @@ -1778,7 +1778,6 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( reduced_tx_set, fctx, )?; - if !has_rows32 {} // lane-hgkf r1: at the frame edge only the first half of the strip is // coded (libaom `decode_partition` guards the second half with the same // test that made this partition non-square). @@ -1822,7 +1821,6 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( reduced_tx_set, fctx, )?; - if !has_cols32 {} // lane-hgkf r1: at the frame edge only the first half of the strip is // coded (libaom `decode_partition` guards the second half with the same // test that made this partition non-square). @@ -2209,7 +2207,6 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( reduced_tx_set, fctx, )?; - if !has_rows {} // lane-golomb r1: at the frame edge only the first half of the // strip is coded (libaom `decode_partition` guards the second // with the same has_rows test that made this partition non-square). @@ -2253,7 +2250,6 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( reduced_tx_set, fctx, )?; - if !has_cols {} // lane-golomb r1: at the frame edge only the first half of the // strip is coded (libaom `decode_partition` guards the second // with the same has_cols test that made this partition non-square). @@ -2489,7 +2485,6 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( &mut v, cdef, &neighbours, - (frame_width as usize, frame_height as usize), fctx, None, None, diff --git a/crates/ec-av1/src/decode/leaf8.rs b/crates/ec-av1/src/decode/leaf8.rs index f05936b2..0ef72c7e 100644 --- a/crates/ec-av1/src/decode/leaf8.rs +++ b/crates/ec-av1/src/decode/leaf8.rs @@ -464,10 +464,6 @@ pub(super) fn decode_block_128rect( // stamps here too -- lane-av1-intrabc r3. txfm_partition_update_rect(neighbours, (mi_r, mi_c), (logical_tx, logical_tx), (bw, bh)); } - if in_inter { - } else if bw > bh { - } else { - } Ok(()) } diff --git a/crates/ec-av1/src/decode/leaf_sub8.rs b/crates/ec-av1/src/decode/leaf_sub8.rs index 28c378e3..fbd33302 100644 --- a/crates/ec-av1/src/decode/leaf_sub8.rs +++ b/crates/ec-av1/src/decode/leaf_sub8.rs @@ -394,10 +394,6 @@ pub(super) fn sub8_leaf_chroma444( // 4:2:2 twin of this arm was fixed the same way // (lane-av1-422kf2); this is its 4:4:4 twin. let unit_reach = Reach::of_tu(bw, bh, uc * 4, ur * 4, 4, 4, reach); - if !square - && unit_reach != Reach::of(4, upx, upy, y.width, y.height, fctx) - { - } let grid = read_plane( dec, cdfs, @@ -588,9 +584,6 @@ pub(super) fn sub8_leaf_chroma444( // position -- see the intrabc twin above for the // libaom citation and the measured damage. let unit_reach = Reach::of_tu(bw, bh, uc * 4, ur * 4, 4, 4, reach); - if !square && unit_reach != Reach::of(4, upx, upy, y.width, y.height, fctx) - { - } let grid = read_plane( dec, cdfs, @@ -2410,7 +2403,6 @@ pub(super) fn decode_leaf_rect8( let (ctx_tx_w, ctx_tx_h) = if split { (4, 4) } else { (bw, bh) }; txfm_partition_update_rect(neighbours, lmi, (ctx_tx_w, ctx_tx_h), (bw, bh)); if split { - let mut done = 0usize; for tu in 0..2usize { let tu_mi = if vert { (lmi.0 + tu, lmi.1) @@ -2479,16 +2471,8 @@ pub(super) fn decode_leaf_rect8( smooth_neighbor, fctx, )?; - if tu_grid.iter().any(|&l| l != 0) { - done += 1; - } neighbours.record_mi_luma(tu_mi, 4, &tu_grid); } - if done > 0 { - if vert { - } else { - } - } neighbours.fill_skip_grid_rect(lmi, w_mi, h_mi, skip); neighbours.fill_lf_grid_rect(lmi, w_mi, h_mi, 4, 4, 0, fctx); if has_chroma { @@ -2595,11 +2579,6 @@ pub(super) fn decode_leaf_rect8( dc_sign_ctx(around.2), TxType::DctDct, )?; - if levels.iter().any(|&l| l != 0) { - if vert { - } else { - } - } let residual = dequant_and_inverse_typed_wh( &levels, bw, diff --git a/crates/ec-av1/src/decode/mod.rs b/crates/ec-av1/src/decode/mod.rs index ff91f82d..7054b6ab 100644 --- a/crates/ec-av1/src/decode/mod.rs +++ b/crates/ec-av1/src/decode/mod.rs @@ -617,10 +617,7 @@ pub(crate) fn superres(fctx: &crate::decode::FrameCtx) -> Option<(u32, u32)> { /// for a rectangular luma block (8x16, 16x8) or a PARTITION_HORZ/VERT strip is /// bigger than the real block in one axis. pub(crate) fn warp_plane_allowed(w: usize, h: usize) -> bool { - if w >= 8 && h >= 8 { - return true; - } - false + w >= 8 && h >= 8 } /// This frame's [`QUANT_DELTAS`] `(dc, ac)` pair for plane `plane_idx` (0 = diff --git a/crates/ec-av1/src/decode/post_filter.rs b/crates/ec-av1/src/decode/post_filter.rs index b12cdd4d..96d8371b 100644 --- a/crates/ec-av1/src/decode/post_filter.rs +++ b/crates/ec-av1/src/decode/post_filter.rs @@ -32,7 +32,6 @@ fn cdef_rows( coeff_shift: i32, damping: i32, damping_uv: i32, - (frame_w, frame_h): (usize, usize), r_lo0: usize, r_hi0: usize, fctx: &crate::decode::FrameCtx, @@ -133,7 +132,6 @@ fn cdef_rows( coeff_shift, damping, damping_uv, - (frame_w, frame_h), fctx, ); }); @@ -147,9 +145,6 @@ pub(super) fn apply_cdef( v: &mut PlaneBuf<'static>, cdef: &CdefParams, skip_grid: &Neighbours, - // This frame header's own CROPPED luma size, for the straddling-unit - // counter only -- CDEF itself walks the mi-rounded plane. - (frame_w, frame_h): (usize, usize), fctx: &crate::decode::FrameCtx, // lane-av1cap: every CDEF unit reads the PRE-CDEF planes, so the filter // starts by copying all three (~19 MB at 4K). The encoder's filter @@ -214,7 +209,6 @@ pub(super) fn apply_cdef( coeff_shift, damping, damping_uv, - (frame_w, frame_h), 0, skip_grid.mi_rows, fctx, diff --git a/crates/ec-av1/src/decode/rect.rs b/crates/ec-av1/src/decode/rect.rs index 033fabcf..43bc7633 100644 --- a/crates/ec-av1/src/decode/rect.rs +++ b/crates/ec-av1/src/decode/rect.rs @@ -543,17 +543,6 @@ pub(super) fn decode_rect_split( (chroma_w, chroma_h), (64, 32) | (32, 64) | (64, 16) | (16, 64) | (32, 32) | (16, 16) | (8, 8) ); - if !m.skip { - if !m.skip && chroma.is_none() && !chroma_tiled { - // Diagnostic for the next caller that lands here (class - // refusal-names-a-correlate: the message names the tool, not the - // shape); the refusal below keeps its inventory-pinned wording. - eprintln!( - "EC_RECTCHROMA_GAP luma={bw}x{bh} tx={tx_w}x{tx_h} \ - chroma={chroma_w}x{chroma_h}" - ); - } - } // lane-rectsplit r2 (verifier finding): with both callers wired // (`decode_block_rect`'s 32x16/16x32 and `decode_block_rect64`'s // 64x32/32x64) every shape that reaches here has a table above, so this @@ -1241,9 +1230,6 @@ pub(super) fn decode_rect_split( uh << ss_y(fctx), reach, ); - if cu_reach.above_right != reach.above_right - || cu_reach.below_left != reach.below_left - {} // 32x32 does not fit read_coeffs_rect's scratch (768). The // square reader is the path every other 32x32 chroma unit uses. let levels = if uw == uh { @@ -2248,9 +2234,6 @@ pub(super) fn decode_intrabc_rect( base_q_idx: u8, fctx: &crate::decode::FrameCtx, ) -> Result<()> { - if skip { - } else { - } let (px, py) = (mi_c * MI, mi_r * MI); // lane-whtshape: a LOSSLESS block's chroma plane block is // `bw >> ss_x` by `bh >> ss_y` at its own origin -- `av1_get_max_uv_txsize` diff --git a/crates/ec-av1/src/decode/rect4.rs b/crates/ec-av1/src/decode/rect4.rs index 7a1d59b0..6d816af3 100644 --- a/crates/ec-av1/src/decode/rect4.rs +++ b/crates/ec-av1/src/decode/rect4.rs @@ -140,11 +140,6 @@ pub(super) fn decode_block_rect4( // seed 43, the last 8x32 strip at luma (152,32), chroma-only mismatch // with luma bit-exact). let smooth_neighbor_uv = neighbours.smooth_uv_neighbour(mi_r, mi_c, r, c, fctx); - if filter_intra.is_some() { - if bw > bh { - } else { - } - } let uv_predict_mode = if uv_mode == UV_CFL_PRED { DC_PRED } else { @@ -217,9 +212,6 @@ pub(super) fn decode_block_rect4( pal_uv_size, pal_uv_colors, ); - if bw > bh { - } else { - } // lane-frame36 r2 (same shape as `decode_block_rect64`'s split arm, // swept this round): `set_txfm_ctxs` runs for EVERY block of an inter // frame, so this 1:4 strip -- which is also the INTER frame's reader @@ -442,9 +434,6 @@ pub(super) fn decode_block_rect4( pal_uv_size, pal_uv_colors, ); - if bw > bh { - } else { - } // lane-frame36 r2 (same shape as `decode_block_rect64`'s split arm, // swept this round): `set_txfm_ctxs` runs for EVERY block of an inter // frame, so this 1:4 strip -- which is also the INTER frame's reader @@ -596,9 +585,6 @@ pub(super) fn decode_block_rect4( pal_uv_size, pal_uv_colors, ); - if bw > bh { - } else { - } // lane-frame36 r2 (same shape as `decode_block_rect64`'s split arm, // swept this round): `set_txfm_ctxs` runs for EVERY block of an inter // frame, so this 1:4 strip -- which is also the INTER frame's reader @@ -728,9 +714,6 @@ pub(super) fn decode_block_rect4( pal_uv_size, pal_uv_colors, ); - if bw > bh { - } else { - } // lane-frame36 r2 (same shape as `decode_block_rect64`'s split arm, // swept this round): `set_txfm_ctxs` runs for EVERY block of an inter // frame, so this 1:4 strip -- which is also the INTER frame's reader @@ -2103,9 +2086,6 @@ pub(super) fn decode_rect4_16_intrabc( } last_uv = Some(DC_PRED); } - if horz { - } else { - } record_strip_palette(neighbours, lmi, bw, bh, 0, [0u16; 8], 0, [0u16; 8]); if leaves.is_none() { // Skip and TX_MODE_LARGEST publish the block size (`set_txfm_ctxs` @@ -2549,31 +2529,6 @@ pub(super) fn decode_rect4_16_strip( // `av1_use_intra_edge_upsample` on (blk_wh 12 <= 16) for a // directional chroma strip, moving 4 samples by 1. let smooth_neighbor_uv = neighbours.smooth_uv_neighbour(pair_mi.0, pair_mi.1, r, c, fctx); - // lane-av1422warp: `smooth_uv_neighbour_unsnapped` now takes the - // frame's own `ss_x` -- the unsnapped read is the pair-merge witness - // counter's mirror of the snapping form, and the shipped read offsets - // the above COLUMN by `+ss_x` (libaom's `chroma_above_mi`). - // - // lane-av1leftwit: this mirror is NOT evidence about the left read's - // `+ss_y` term, whatever a report once said. It reads the leaf's own - // (odd) mi row, which no decode call site does -- every one of them - // uses the snapping form, whose base row is even -- and its result - // feeds `RECT4_16_UV_PAIR_FILT_HITS` only. What it measures is real - // and worth keeping (the pair's chroma-reference read against the - // leaf's own row: 51/24/121/0/1 hits on the five fixtures censused), - // so it stays; the decode path's own reach for the `+ss_y` term is - // `uv_left_1mi_split_hits()`. - if smooth_neighbor_uv - != neighbours.smooth_uv_neighbour_unsnapped( - lmi.0, - lmi.1, - r, - c, - ss_x(fctx), - ss_y(fctx), - false, - ) - {} // lane-av1-rect14: a lossless frame forces TX_4X4 on every plane // (`av1_get_tx_size`, blockd.h:1381). The pair's chroma block is // 8x4 (HORZ_4) or 4x8 (VERT_4) -- two TX_4X4s, plane-major @@ -3023,9 +2978,6 @@ pub(super) fn decode_rect4_16_strip( } last_uv_mode = Some(uv_predict_mode); } - if horz { - } else { - } let (pal_y_size, pal_y_colors) = palette_y .as_ref() .map_or((0, [0u16; 8]), |p| (p.size, p.colors)); @@ -3209,7 +3161,6 @@ pub(super) fn decode_block_rect64( // 1:4 strip is the 2:1 rect TX_32X16 at depth 1 (lane-rectchroma r1 // measured the old square formula mis-tiling exactly that strip). let (tx_w, tx_h) = depth_to_tx_wh(bw, bh, depth, fctx); - if bw.max(bh) / bw.min(bh) == 4 {} let modes = RectStripModes { skip, mode, diff --git a/crates/ec-av1/src/decode/replay.rs b/crates/ec-av1/src/decode/replay.rs index 00efb6cb..732747c9 100644 --- a/crates/ec-av1/src/decode/replay.rs +++ b/crates/ec-av1/src/decode/replay.rs @@ -179,7 +179,6 @@ fn replay_inner( &mut v, cdef, &r.neighbours, - (r.frame_width, r.frame_height), fctx, pre, Some(&mut wrote), @@ -449,7 +448,6 @@ pub(super) fn cdef_band( coeff_shift: i32, damping: i32, damping_uv: i32, - (frame_w, frame_h): (usize, usize), fctx: &crate::decode::FrameCtx, ) { let unit_cols = skip_grid.mi_cols.div_ceil(2); @@ -510,12 +508,6 @@ pub(super) fn cdef_band( // lane-cdef r1 rung: one line per filtered 8x8 luma CDEF unit. let enable_primary = t != 0; let enable_secondary = y_sec_strength != 0; - if (ox + 8 > frame_w || oy + 8 > frame_h) - && (enable_primary - || enable_secondary - || cdef.uv_pri_strength[sidx] != 0 - || cdef.uv_sec_strength[sidx] != 0) - {} if enable_primary || enable_secondary { cdef_filter_block( &win_y,