forge
Explore
Log in

Don't you dare go Hollow

Delta_lf -> deblocker path (maybe_read_delta_lf, delta_lf_grid, lf_level)

Browse files at this commit

46e63c7305927ad6606069f084091552db6ff44bAhmet Kaan GümüşParent: e54391f
  • feat
    • delta_lf -> deblocker path (maybe_read_delta_lf, delta_lf_grid, lf_level)
Show full message
feat(av1): delta_lf -> deblocker path (maybe_read_delta_lf, delta_lf_grid, lf_level)

New design piece the r3 plan flagged: DeltaLF is a per-superblock running
state (CURRENT_DELTA_LF: Cell<[i32;4]>, same shape as CURRENT_Q_IDX, spec
DeltaLF[FRAME_LF_COUNT]), read by maybe_read_delta_lf (spec
read_delta_lflevel/read_delta_lf_params, same 4-symbol-CDF-then-Golomb-tail
shape as maybe_read_delta_q, called right after it at all 4 block-decode
sites) and snapshotted per 4x4-mi block into a new Neighbours::delta_lf_grid
field (fill_lf_grid_rect, mirroring ref_grid's snapshot pattern -- !multi
mode broadcasts index 0 into all 4 slots at write time so lf_level's
reader never needs the multi flag). lf_level takes the per-block delta and
applies it to the base level (clamp 0..63) before the existing
ref_deltas/mode_deltas scaling, per spec 7.14.4; edge_params looks it up
at both the current and previous mi position via a new plane/dir ->
FRAME_LF_COUNT index map, same as its existing ref_grid lookup.

Removed the stream.rs delta_lf_present refusal (both halves of Job 2 now
read and apply). Refusal removed from refusal_inventory.rs's REFUSALS
list: "a frame with delta_lf_present set (this decoder never applies
per-superblock loop-filter deltas)" -- no replacement string, the
capability is no longer absent.

Full ec-av1 lib suite still green (242/0/17, EC_AV1_REQUIRE_AOMENC=1);
no existing fixture sets delta_lf_present, so this is code-verified
against the spec/libaom read shape, not yet gate-proven against a real
aomenc stream (charter step 4, unstarted this round -- next lever).
crates/ec-av1/src/decode.rsmodified+105 -3
@@ -168,6 +168,71 @@ fn maybe_read_delta_q(dec: &mut SymbolDecoder, cdfs: &mut Cdfs, mi_r: usize, mi_
168 CURRENT_Q_IDX.with(|c| c.set((c.get() + reduced * res).clamp(1, 255)));168 CURRENT_Q_IDX.with(|c| c.set((c.get() + reduced * res).clamp(1, 255)));
169 }169 }
170 170
171+// lane-realworld r5: this frame's `delta.lf_present`/`lf_res`/`lf_multi`
172+// (spec 5.9.18) -- same no-op-by-default corner-cut as `DELTA_Q_PRESENT`.
173+thread_local! {
174+ static DELTA_LF_PRESENT: std::cell::Cell<bool> = const { std::cell::Cell::new(false) };
175+ static DELTA_LF_RES: std::cell::Cell<i32> = const { std::cell::Cell::new(1) };
176+ static DELTA_LF_MULTI: std::cell::Cell<bool> = const { std::cell::Cell::new(false) };
177+}
178+// The running per-plane/direction loop-filter delta (spec `DeltaLF[i]`,
179+// `i` in `0..FRAME_LF_COUNT`) -- reset to `[0; 4]` at the top of every tile,
180+// mutated only by [`maybe_read_delta_lf`]. `!delta_lf_multi` mode only ever
181+// updates index 0 and every reader treats that as the value for all 4
182+// indices (spec `read_delta_lf_params`'s own single-cdf branch).
183+thread_local! {
184+ static CURRENT_DELTA_LF: std::cell::Cell<[i32; 4]> = const { std::cell::Cell::new([0; 4]) };
185+}
186+// How many real `delta_lf_present` symbol groups [`maybe_read_delta_lf`] has
187+// read -- the gate's proof the reader fired, mirroring [`DELTA_Q_HITS`].
188+thread_local! {
189+ static DELTA_LF_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
190+}
191+
192+/// Current value of [`DELTA_LF_HITS`].
193+pub(crate) fn delta_lf_hits() -> usize {
194+ DELTA_LF_HITS.with(|c| c.get())
195+}
196+
197+/// `read_delta_lflevel`/`read_delta_lf_params` (spec 5.11.11, libaom
198+/// `decodemv.c:99-146,735-770`) -- same shape and same call-site gating as
199+/// [`maybe_read_delta_q`] (spec order `delta_q -> delta_lf`), looped over
200+/// `FRAME_LF_COUNT = 4` planes/directions when `delta_lf_multi` is set, or
201+/// read once into index 0 otherwise.
202+fn maybe_read_delta_lf(dec: &mut SymbolDecoder, cdfs: &mut Cdfs, mi_r: usize, mi_c: usize, is_whole_sb: bool, skip: bool) {
203+ if !DELTA_LF_PRESENT.with(|c| c.get()) {
204+ return;
205+ }
206+ if mi_r % SB_MI as usize != 0 || mi_c % SB_MI as usize != 0 {
207+ return;
208+ }
209+ if is_whole_sb && skip {
210+ return;
211+ }
212+ let multi = DELTA_LF_MULTI.with(|c| c.get());
213+ let res = DELTA_LF_RES.with(|c| c.get());
214+ let count = if multi { 4 } else { 1 };
215+ let mut cur = CURRENT_DELTA_LF.with(|c| c.get());
216+ for i in 0..count {
217+ let mut abs = if multi {
218+ dec.symbol(&mut cdfs.delta_lf_multi[i]) as i32
219+ } else {
220+ dec.symbol(&mut cdfs.delta_lf) as i32
221+ };
222+ const DELTA_LF_SMALL: i32 = 3;
223+ if abs >= DELTA_LF_SMALL {
224+ let rem_bits = dec.literal(3) + 1;
225+ let thr = (1i32 << rem_bits) + 1;
226+ abs = dec.literal(rem_bits) as i32 + thr;
227+ }
228+ let sign_negative = if abs != 0 { dec.literal(1) != 0 } else { true };
229+ let reduced = if sign_negative { -abs } else { abs };
230+ cur[i] = (cur[i] + reduced * res).clamp(-63, 63);
231+ DELTA_LF_HITS.with(|c| c.set(c.get() + 1));
232+ }
233+ CURRENT_DELTA_LF.with(|c| c.set(cur));
234+}
235+
171 /// `read_cdef` (spec 5.11.56, libaom `decodemv.c:read_cdef`), called right236 /// `read_cdef` (spec 5.11.56, libaom `decodemv.c:read_cdef`), called right
172 /// after `skip` is known at every block-decode call site. A no-op at237 /// after `skip` is known at every block-decode call site. A no-op at
173 /// `cdef.bits == 0` (0-bit literal, nothing to consume) -- and238 /// `cdef.bits == 0` (0-bit literal, nothing to consume) -- and
@@ -1520,6 +1585,14 @@ struct Neighbours {
1520 /// widened from a bare `is_inter` bool, which collapsed every non-`LAST`1585 /// widened from a bare `is_inter` bool, which collapsed every non-`LAST`
1521 /// reference onto `LAST_FRAME`'s own delta).1586 /// reference onto `LAST_FRAME`'s own delta).
1522 ref_grid: Vec<i8>,1587 ref_grid: Vec<i8>,
1588+ /// Per-4x4-mi snapshot of [`CURRENT_DELTA_LF`] at the moment this cell's
1589+ /// block was decoded (spec `DeltaLF[i]`, `i` in `0..FRAME_LF_COUNT`,
1590+ /// Y-vertical/Y-horizontal/U/V) -- lane-realworld r5: `lf_level`'s
1591+ /// per-block additive term, mirroring [`Self::ref_grid`]'s own snapshot
1592+ /// pattern. `!delta_lf_multi` mode broadcasts index 0 into all 4 slots
1593+ /// at write time ([`Self::fill_lf_grid_rect`]) so a reader never needs
1594+ /// to know which mode produced the value.
1595+ delta_lf_grid: Vec<[i8; 4]>,
1523 /// This tile's own top-left corner, in 4x4 mode-info units (spec1596 /// This tile's own top-left corner, in 4x4 mode-info units (spec
1524 /// `MiRowStart`/`MiColStart`) -- lane-tiles: every "is there really a1597 /// `MiRowStart`/`MiColStart`) -- lane-tiles: every "is there really a
1525 /// neighbour" check compares against this instead of literal `0`, since a1598 /// neighbour" check compares against this instead of literal `0`, since a
@@ -1569,6 +1642,7 @@ impl Neighbours {
1569 tx_grid: vec![0u8; cols * (SUB / MI) * rows * (SUB / MI)],1642 tx_grid: vec![0u8; cols * (SUB / MI) * rows * (SUB / MI)],
1570 tx_h_grid: vec![0u8; cols * (SUB / MI) * rows * (SUB / MI)],1643 tx_h_grid: vec![0u8; cols * (SUB / MI) * rows * (SUB / MI)],
1571 ref_grid: vec![0i8; cols * (SUB / MI) * rows * (SUB / MI)],1644 ref_grid: vec![0i8; cols * (SUB / MI) * rows * (SUB / MI)],
1645+ delta_lf_grid: vec![[0i8; 4]; cols * (SUB / MI) * rows * (SUB / MI)],
1572 tile_row0_mi: 0,1646 tile_row0_mi: 0,
1573 tile_col0_mi: 0,1647 tile_col0_mi: 0,
1574 }1648 }
@@ -1630,6 +1704,12 @@ impl Neighbours {
1630 ref_frame: i8,1704 ref_frame: i8,
1631 ) {1705 ) {
1632 let (mi_r, mi_c) = at_mi;1706 let (mi_r, mi_c) = at_mi;
1707+ let cur = CURRENT_DELTA_LF.with(|c| c.get());
1708+ let snapshot: [i8; 4] = if DELTA_LF_MULTI.with(|c| c.get()) {
1709+ std::array::from_fn(|i| cur[i].clamp(-63, 63) as i8)
1710+ } else {
1711+ [cur[0].clamp(-63, 63) as i8; 4]
1712+ };
1633 for rr in 0..h_mi {1713 for rr in 0..h_mi {
1634 for cc in 0..w_mi {1714 for cc in 0..w_mi {
1635 let idx = (mi_r + rr) * self.skip_grid_cols_mi + (mi_c + cc);1715 let idx = (mi_r + rr) * self.skip_grid_cols_mi + (mi_c + cc);
@@ -1642,6 +1722,9 @@ impl Neighbours {
1642 if let Some(cell) = self.ref_grid.get_mut(idx) {1722 if let Some(cell) = self.ref_grid.get_mut(idx) {
1643 *cell = ref_frame;1723 *cell = ref_frame;
1644 }1724 }
1725+ if let Some(cell) = self.delta_lf_grid.get_mut(idx) {
1726+ *cell = snapshot;
1727+ }
1645 }1728 }
1646 }1729 }
1647 }1730 }
@@ -2205,6 +2288,7 @@ fn read_intra_mode_rect(
2205 // both 64 here -- see this fn's own doc), so `is_whole_sb` is always2288 // both 64 here -- see this fn's own doc), so `is_whole_sb` is always
2206 // `false`.2289 // `false`.
2207 maybe_read_delta_q(dec, cdfs, mi_r, mi_c, false, skip);2290 maybe_read_delta_q(dec, cdfs, mi_r, mi_c, false, skip);
2291+ maybe_read_delta_lf(dec, cdfs, mi_r, mi_c, false, skip);
2208 let above_ctx = INTRA_MODE_CTX[above_mode];2292 let above_ctx = INTRA_MODE_CTX[above_mode];
2209 let left_ctx = INTRA_MODE_CTX[left_mode];2293 let left_ctx = INTRA_MODE_CTX[left_mode];
2210 let mode = dec.symbol(&mut cdfs.kf_y_mode[above_ctx][left_ctx]);2294 let mode = dec.symbol(&mut cdfs.kf_y_mode[above_ctx][left_ctx]);
@@ -2679,6 +2763,7 @@ fn read_intra_mode(
2679 // `segment_id`, `cdef`, `delta_q` -- `cdef` lands right here.2763 // `segment_id`, `cdef`, `delta_q` -- `cdef` lands right here.
2680 maybe_read_cdef_idx(dec, mi_r, mi_c, skip);2764 maybe_read_cdef_idx(dec, mi_r, mi_c, skip);
2681 maybe_read_delta_q(dec, cdfs, mi_r, mi_c, side == 64, skip);2765 maybe_read_delta_q(dec, cdfs, mi_r, mi_c, side == 64, skip);
2766+ maybe_read_delta_lf(dec, cdfs, mi_r, mi_c, side == 64, skip);
2682 // `read_intrabc_info` (spec 5.11.13, libaom decodemv.c:693, called at2767 // `read_intrabc_info` (spec 5.11.13, libaom decodemv.c:693, called at
2683 // :811 right after `skip_txfm`/`segment_id`/`cdef`/`delta_q` and before2768 // :811 right after `skip_txfm`/`segment_id`/`cdef`/`delta_q` and before
2684 // `mbmi->mode` is ever read): a `use_intrabc` symbol only present on an2769 // `mbmi->mode` is ever read): a `use_intrabc` symbol only present on an
@@ -4252,7 +4337,7 @@ fn unit_log2(px: u32) -> i32 {
4252 /// the flat `mode_deltas[1]` this used before was a `LAST_FRAME`-reachable4337 /// the flat `mode_deltas[1]` this used before was a `LAST_FRAME`-reachable
4253 /// wrong delta on every `GLOBALMV` block, masked while any `GOLDEN_FRAME`4338 /// wrong delta on every `GLOBALMV` block, masked while any `GOLDEN_FRAME`
4254 /// block anywhere aborted the whole stream's decode before comparison).4339 /// block anywhere aborted the whole stream's decode before comparison).
4255-fn lf_level(lf: &LoopFilterParams, plane_idx: usize, dir: usize, ref_frame: i8) -> i32 {4340+fn lf_level(lf: &LoopFilterParams, plane_idx: usize, dir: usize, ref_frame: i8, delta_lf: i32) -> i32 {
4256 let base = i32::from(if plane_idx == 0 {4341 let base = i32::from(if plane_idx == 0 {
4257 lf.level[dir]4342 lf.level[dir]
4258 } else if plane_idx == 1 {4343 } else if plane_idx == 1 {
@@ -4260,6 +4345,10 @@ fn lf_level(lf: &LoopFilterParams, plane_idx: usize, dir: usize, ref_frame: i8)
4260 } else {4345 } else {
4261 lf.level[3]4346 lf.level[3]
4262 });4347 });
4348+ // spec 7.14.4: the per-superblock `DeltaLF` term applies before the
4349+ // ref/mode delta scaling below, and regardless of `delta_enabled`
4350+ // (that flag only gates `ref_deltas`/`mode_deltas`).
4351+ let base = (base + delta_lf).clamp(0, 63);
4263 if !lf.delta_enabled {4352 if !lf.delta_enabled {
4264 return base;4353 return base;
4265 }4354 }
@@ -4311,9 +4400,12 @@ fn edge_params(
4311 tx_h_px_at(n, chroma, pv_mi_r, pv_mi_c)4400 tx_h_px_at(n, chroma, pv_mi_r, pv_mi_c)
4312 };4401 };
4313 let pv_ref = n.ref_grid[pv_mi_r * n.skip_grid_cols_mi + pv_mi_c];4402 let pv_ref = n.ref_grid[pv_mi_r * n.skip_grid_cols_mi + pv_mi_c];
4403+ let delta_idx = if plane_idx == 0 { dir } else { plane_idx + 1 };
4404+ let cur_delta_lf = i32::from(n.delta_lf_grid[mi_r * n.skip_grid_cols_mi + mi_c][delta_idx]);
4405+ let pv_delta_lf = i32::from(n.delta_lf_grid[pv_mi_r * n.skip_grid_cols_mi + pv_mi_c][delta_idx]);
4314 4406
4315- let cur_level = lf_level(lf, plane_idx, dir, cur_ref);4407+ let cur_level = lf_level(lf, plane_idx, dir, cur_ref, cur_delta_lf);
4316- let pv_level = lf_level(lf, plane_idx, dir, pv_ref);4408+ let pv_level = lf_level(lf, plane_idx, dir, pv_ref, pv_delta_lf);
4317 if cur_level == 0 && pv_level == 0 {4409 if cur_level == 0 && pv_level == 0 {
4318 return None;4410 return None;
4319 }4411 }
@@ -4882,6 +4974,9 @@ pub(crate) fn decode_key_frame_tile_with_cdfs(
4882 CDEF_IDX_GRID.with(|g| *g.borrow_mut() = vec![0u8; sb_cols as usize * sb_rows as usize]);4974 CDEF_IDX_GRID.with(|g| *g.borrow_mut() = vec![0u8; sb_cols as usize * sb_rows as usize]);
4883 DELTA_Q_PRESENT.with(|c| c.set(delta.q_present));4975 DELTA_Q_PRESENT.with(|c| c.set(delta.q_present));
4884 DELTA_Q_RES.with(|c| c.set(1i32 << delta.q_res));4976 DELTA_Q_RES.with(|c| c.set(1i32 << delta.q_res));
4977+ DELTA_LF_PRESENT.with(|c| c.set(delta.lf_present));
4978+ DELTA_LF_RES.with(|c| c.set(1i32 << delta.lf_res));
4979+ DELTA_LF_MULTI.with(|c| c.set(delta.lf_multi));
4885 let (cols32, rows32) = block_grid(mi_cols, mi_rows);4980 let (cols32, rows32) = block_grid(mi_cols, mi_rows);
4886 let (true_width, true_height) = ((mi_cols * 4) as usize, (mi_rows * 4) as usize);4981 let (true_width, true_height) = ((mi_cols * 4) as usize, (mi_rows * 4) as usize);
4887 let (width, height) = (cols32 as usize * BLOCK, rows32 as usize * BLOCK);4982 let (width, height) = (cols32 as usize * BLOCK, rows32 as usize * BLOCK);
@@ -4958,6 +5053,7 @@ pub(crate) fn decode_key_frame_tile_with_cdfs(
4958 // spec `decode_tile`: `CurrentQIndex` resets to the frame's own5053 // spec `decode_tile`: `CurrentQIndex` resets to the frame's own
4959 // `base_q_idx` at the top of every tile, not once per frame.5054 // `base_q_idx` at the top of every tile, not once per frame.
4960 CURRENT_Q_IDX.with(|c| c.set(i32::from(base_q_idx)));5055 CURRENT_Q_IDX.with(|c| c.set(i32::from(base_q_idx)));
5056+ CURRENT_DELTA_LF.with(|c| c.set([0; 4]));
4961 if std::env::var_os("EC_AV1_TRACE").is_some() {5057 if std::env::var_os("EC_AV1_TRACE").is_some() {
4962 eprintln!(5058 eprintln!(
4963 "TRACE key_tile_bytes tile={tile_num} len={} first8={:02x?} base_q_idx={base_q_idx} mi_cols={mi_cols} mi_rows={mi_rows}",5059 "TRACE key_tile_bytes tile={tile_num} len={} first8={:02x?} base_q_idx={base_q_idx} mi_cols={mi_cols} mi_rows={mi_rows}",
@@ -6814,6 +6910,7 @@ fn decode_inter_block(
6814 let skip = skip_mode || dec.symbol(&mut cdfs.skip[skip_ctx]) == 1;6910 let skip = skip_mode || dec.symbol(&mut cdfs.skip[skip_ctx]) == 1;
6815 maybe_read_cdef_idx(dec, r * SUB_MI as usize, c * SUB_MI as usize, skip);6911 maybe_read_cdef_idx(dec, r * SUB_MI as usize, c * SUB_MI as usize, skip);
6816 maybe_read_delta_q(dec, cdfs, r * SUB_MI as usize, c * SUB_MI as usize, side == 64, skip);6912 maybe_read_delta_q(dec, cdfs, r * SUB_MI as usize, c * SUB_MI as usize, side == 64, skip);
6913+ maybe_read_delta_lf(dec, cdfs, r * SUB_MI as usize, c * SUB_MI as usize, side == 64, skip);
6817 // lane-warp r5: see `reject_residual` -- a square-block decode of a6914 // lane-warp r5: see `reject_residual` -- a square-block decode of a
6818 // HORZ_B strip is symbol-exact only for `skip` (no residual, no6915 // HORZ_B strip is symbol-exact only for `skip` (no residual, no
6819 // motion_mode/warp symbol), so gate here before any further read.6916 // motion_mode/warp symbol), so gate here before any further read.
@@ -8586,6 +8683,7 @@ fn decode_inter_block8(
8586 maybe_read_cdef_idx(dec, leaf_mi.0, leaf_mi.1, skip);8683 maybe_read_cdef_idx(dec, leaf_mi.0, leaf_mi.1, skip);
8587 // Always a `BLOCK_8X8` leaf here, never the whole superblock.8684 // Always a `BLOCK_8X8` leaf here, never the whole superblock.
8588 maybe_read_delta_q(dec, cdfs, leaf_mi.0, leaf_mi.1, false, skip);8685 maybe_read_delta_q(dec, cdfs, leaf_mi.0, leaf_mi.1, false, skip);
8686+ maybe_read_delta_lf(dec, cdfs, leaf_mi.0, leaf_mi.1, false, skip);
8589 8687
8590 let (has_above, has_left) = (8688 let (has_above, has_left) = (
8591 leaf_mi.0 > neighbours.tile_row0_mi,8689 leaf_mi.0 > neighbours.tile_row0_mi,
@@ -9774,7 +9872,11 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
9774 // `decode_key_frame_tile_with_cdfs`'s per-tile reset).9872 // `decode_key_frame_tile_with_cdfs`'s per-tile reset).
9775 DELTA_Q_PRESENT.with(|c| c.set(delta.q_present));9873 DELTA_Q_PRESENT.with(|c| c.set(delta.q_present));
9776 DELTA_Q_RES.with(|c| c.set(1i32 << delta.q_res));9874 DELTA_Q_RES.with(|c| c.set(1i32 << delta.q_res));
9875+ DELTA_LF_PRESENT.with(|c| c.set(delta.lf_present));
9876+ DELTA_LF_RES.with(|c| c.set(1i32 << delta.lf_res));
9877+ DELTA_LF_MULTI.with(|c| c.set(delta.lf_multi));
9777 CURRENT_Q_IDX.with(|c| c.set(i32::from(base_q_idx)));9878 CURRENT_Q_IDX.with(|c| c.set(i32::from(base_q_idx)));
9879+ CURRENT_DELTA_LF.with(|c| c.set([0; 4]));
9778 let mut dec = SymbolDecoder::new(data);9880 let mut dec = SymbolDecoder::new(data);
9779 // lane-comppin r9: tile-entry range, the earliest point comparable9881 // lane-comppin r9: tile-entry range, the earliest point comparable
9780 // against aomdec's own `r->ec.rng` right after `aom_reader_init` -- the9882 // against aomdec's own `r->ec.rng` right after `aom_reader_init` -- the
crates/ec-av1/src/refusal_inventory.rsmodified+0 -1
@@ -46,7 +46,6 @@ const REFUSALS: &[&str] = &[
46 "a block that actually uses intrabc (this decoder never reconstructs one)",46 "a block that actually uses intrabc (this decoder never reconstructs one)",
47 "a frame OBU with no tile group",47 "a frame OBU with no tile group",
48 "a frame naming primary_ref_frame at a reference slot with no saved CDF state",48 "a frame naming primary_ref_frame at a reference slot with no saved CDF state",
49- "a frame with delta_lf_present set (this decoder never applies per-superblock loop-filter deltas)",
50 "a frame with loop restoration enabled (this decoder never reads the per-unit lr symbols)",49 "a frame with loop restoration enabled (this decoder never reads the per-unit lr symbols)",
51 "a frame with more than one tile row (only tile columns are proven pixel-exact so far)",50 "a frame with more than one tile row (only tile columns are proven pixel-exact so far)",
52 "a frame with more than two tile columns (a non-last column's right-edge reach bound past column 0 is unimplemented)",51 "a frame with more than two tile columns (a non-last column's right-edge reach bound past column 0 is unimplemented)",
crates/ec-av1/src/stream.rsmodified+4 -10
@@ -165,16 +165,10 @@ pub fn decode_stream(data: &[u8]) -> Result<Vec<Picture>> {
165 // intrabc call at all -- that symbol is intra-frame-only). A165 // intrabc call at all -- that symbol is intra-frame-only). A
166 // genuine palette/intrabc use still refuses by name deeper in the166 // genuine palette/intrabc use still refuses by name deeper in the
167 // block readers, so no whole-frame refusal is needed here anymore.167 // block readers, so no whole-frame refusal is needed here anymore.
168- // lane-realworld r5: delta_q is now read (maybe_read_delta_q,168+ // lane-realworld r5: both delta_q (maybe_read_delta_q, CURRENT_Q_IDX)
169- // CURRENT_Q_IDX) -- only delta_lf still lacks a deblocker consumer169+ // and delta_lf (maybe_read_delta_lf, CURRENT_DELTA_LF ->
170- // (MiGrid/fill_lf_grid needs a new per-block field), so only that170+ // Neighbours::delta_lf_grid -> lf_level) are now read and applied;
171- // half still refuses by name.171+ // no whole-frame refusal needed here anymore.
172- if header.delta.lf_present {
173- return Err(Error::unsupported(
174- "AV1 decode_stream",
175- "a frame with delta_lf_present set (this decoder never applies per-superblock loop-filter deltas)",
176- ));
177- }
178 if header.segmentation.enabled {172 if header.segmentation.enabled {
179 return Err(Error::unsupported(173 return Err(Error::unsupported(
180 "AV1 decode_stream",174 "AV1 decode_stream",