diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 3155b445..ad545ef8 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -2112,7 +2112,117 @@ impl Residual { } } +/// Where a recorded motion-compensated write reads its prediction from. +/// +/// lane-wave4: a block's whole-block prediction (mc + warp + interintra) is +/// the parse thread's single biggest reconstruction cost, so at +/// `EC_AV1_RECON_THREADS > 1` it is not built at parse at all: the block +/// pushes a [`ReconOp::Pred`] carrying the build as a closure, the worker +/// runs it into its own three-plane slot, and every transform unit of that +/// block then reads its window out of that slot ([`Pred::Cur`]). +#[derive(Clone, Copy)] +pub(crate) enum Pred<'a> { + /// A prediction the parse thread already built. `stride == 0` means "the + /// reader's own `stride` argument", which is every pre-lane-wave4 site. + Inline(&'a [u16], usize), + /// The current block's deferred prediction: plane, its stride, and this + /// unit's offset into it. + Cur { plane: usize, stride: usize, off: usize }, +} + +impl<'a> Pred<'a> { + fn dense(buf: &'a [u16]) -> Self { + Self::Inline(buf, 0) + } + /// The same prediction read at an explicit stride. + fn view(self, stride: usize) -> Self { + match self { + Self::Inline(b, _) => Self::Inline(b, stride), + Self::Cur { plane, off, .. } => Self::Cur { plane, stride, off }, + } + } + /// The materialised buffer and the stride to read it at (`stride` is the + /// reader's own when this prediction was built dense); `None` for a + /// deferred prediction, which only a recorded op can carry. + fn inline(self, stride: usize) -> Option<(&'a [u16], usize)> { + match self { + Self::Inline(b, s) => Some((b, if s == 0 { stride } else { s })), + Self::Cur { .. } => None, + } + } + /// This prediction's window starting `n` samples in. + fn offset(self, n: usize) -> Self { + match self { + Self::Inline(b, s) => Self::Inline(&b[n..], s), + Self::Cur { plane, stride, off } => Self::Cur { plane, stride, off: off + n }, + } + } +} + +/// [`Pred`], resolved into what a recorded op carries. +pub(crate) enum PredSrc { + Owned(Vec), + Cur { plane: usize, off: usize }, +} + +/// One block's whole-block prediction build, deferred to a recon worker. +/// +/// The closure borrows the tile's reference pictures and its own frame-level +/// tables; [`WaveGuard`] joins every worker before the tile decoder returns, +/// so those borrows outlive it -- the [`ReconPlanes`] trade-off, stated once +/// here for the closure's `'static`/`Send` laundering in [`push_pred`]. +pub(crate) struct PredBuild( + Box< + dyn FnOnce( + &mut PlaneBuf<'static>, + &mut PlaneBuf<'static>, + &mut PlaneBuf<'static>, + &crate::decode::FrameCtx, + ) -> [Vec; 3], + >, +); + +// SAFETY: see [`PredBuild`] -- the captured borrows are read-only reference +// pictures and frame tables, and the closure runs on exactly one worker. +#[allow(unsafe_code)] +unsafe impl Send for PredBuild {} + +/// `true` when this tile's writes are recorded for the wavefront instead of +/// performed at the push site, i.e. when a prediction may be deferred. +fn recon_deferred(fctx: &crate::decode::FrameCtx) -> bool { + fctx.recon_planes.with(std::cell::Cell::get).is_none() +} + +/// Records one block's prediction build for the worker that reconstructs it. +#[allow(unsafe_code)] +fn push_pred<'a>( + fctx: &crate::decode::FrameCtx, + f: impl FnOnce( + &mut PlaneBuf<'static>, + &mut PlaneBuf<'static>, + &mut PlaneBuf<'static>, + &crate::decode::FrameCtx, + ) -> [Vec; 3] + + 'a, +) { + type Built = [Vec; 3]; + type Dyn<'x> = dyn FnOnce( + &mut PlaneBuf<'static>, + &mut PlaneBuf<'static>, + &mut PlaneBuf<'static>, + &crate::decode::FrameCtx, + ) -> Built + + 'x; + let boxed: Box> = Box::new(f); + // SAFETY: see [`PredBuild`] -- every worker is joined by [`WaveGuard`] + // before the borrows the closure holds go out of scope. + let boxed: Box> = unsafe { std::mem::transmute(boxed) }; + push_op(fctx, ReconOp::Pred(PredBuild(boxed))); +} + pub(crate) enum ReconOp { + /// lane-wave4: build this block's prediction into the worker's slot. + Pred(PredBuild), Intra { plane: usize, x: usize, @@ -2141,7 +2251,7 @@ pub(crate) enum ReconOp { stride: usize, w: usize, h: usize, - prediction: Vec, + prediction: PredSrc, residual: Residual, }, } @@ -2222,7 +2332,7 @@ fn push_op(fctx: &crate::decode::FrameCtx, op: ReconOp) { if let Some(ReconPlanes(y, u, v)) = fctx.recon_planes.with(std::cell::Cell::get) { // SAFETY: see [`ReconPlanes`] -- one thread, and the write is the one // the parse site would have performed itself before lane-wave1. - unsafe { exec_op(op, &mut *y, &mut *u, &mut *v, fctx) }; + unsafe { exec_op(op, &mut *y, &mut *u, &mut *v, &mut Default::default(), fctx) }; return; } fctx.recon_ops.with(|c| c.borrow_mut().push(op)); @@ -2295,9 +2405,10 @@ fn wave_worker(st: &WaveState) { // SAFETY: this job writes only superblock (r, c)'s own pixels, and // every superblock that could have written or be reading them is // complete by the wavefront rule above. + let mut cur: [Vec; 3] = Default::default(); unsafe { for op in ops { - exec_op(op, &mut *y, &mut *u, &mut *v, &fctx); + exec_op(op, &mut *y, &mut *u, &mut *v, &mut cur, &fctx); } } let mut q = st.q.lock().unwrap(); @@ -2520,14 +2631,25 @@ fn push_mc_rect_owned( stride: usize, w: usize, h: usize, - prediction: &[u16], + prediction: Pred<'_>, residual: Vec, fctx: &crate::decode::FrameCtx, ) { - if inline_mc(plane, x, y, stride, w, h, prediction, &residual, fctx) { + let (src, stride) = match prediction.inline(stride) { + Some(v) => v, + None => { + let Pred::Cur { plane: sp, stride: ss, off } = prediction else { unreachable!() }; + push_op(fctx, ReconOp::Mc { + plane, x, y, stride: ss, w, h, prediction: PredSrc::Cur { plane: sp, off }, + residual: Residual::Done(residual), + }); + return; + } + }; + if inline_mc(plane, x, y, stride, w, h, src, &residual, fctx) { return; } push_op(fctx, ReconOp::Mc { - plane, x, y, stride, w, h, prediction: prediction.to_vec(), + plane, x, y, stride, w, h, prediction: PredSrc::Owned(src.to_vec()), residual: Residual::Done(residual), }); } @@ -2567,7 +2689,7 @@ fn push_mc( x: usize, y: usize, side: usize, - prediction: &[u16], + prediction: Pred<'_>, residual: &[i32], fctx: &crate::decode::FrameCtx, ) { push_mc_rect(plane, x, y, side, side, side, prediction, residual, fctx); @@ -2582,15 +2704,26 @@ fn push_mc_rect( stride: usize, w: usize, h: usize, - prediction: &[u16], + prediction: Pred<'_>, residual: &[i32], fctx: &crate::decode::FrameCtx, ) { - if inline_mc(plane, x, y, stride, w, h, prediction, residual, fctx) { + let (src, stride) = match prediction.inline(stride) { + Some(v) => v, + None => { + let Pred::Cur { plane: sp, stride: ss, off } = prediction else { unreachable!() }; + push_op(fctx, ReconOp::Mc { + plane, x, y, stride: ss, w, h, prediction: PredSrc::Cur { plane: sp, off }, + residual: Residual::Done(residual.to_vec()), + }); + return; + } + }; + if inline_mc(plane, x, y, stride, w, h, src, residual, fctx) { return; } push_op(fctx, ReconOp::Mc { plane, x, y, stride, w, h, - prediction: prediction.to_vec(), residual: Residual::Done(residual.to_vec()), + prediction: PredSrc::Owned(src.to_vec()), residual: Residual::Done(residual.to_vec()), }); } @@ -2638,11 +2771,28 @@ fn push_mc_rect_tx( stride: usize, w: usize, h: usize, - prediction: &[u16], + prediction: Pred<'_>, tx: TxParams, grid: &[i32], fctx: &crate::decode::FrameCtx, ) { + // lane-wave4: a deferred prediction is not there to be windowed -- the + // op carries its offset into the block's prediction instead, and the + // residual is laid out at that same stride (`reconstruct_mc_rect` reads + // both buffers at one stride). + let (prediction, stride) = match prediction.inline(stride) { + Some(v) => v, + None => { + let Pred::Cur { plane: sp, stride: ss, off } = prediction else { unreachable!() }; + let mut tx = tx; + tx.stride = ss; + push_op(fctx, ReconOp::Mc { + plane, x, y, stride: ss, w, h, prediction: PredSrc::Cur { plane: sp, off }, + residual: Residual::Coeffs(tx, grid.to_vec()), + }); + return; + } + }; if fctx.recon_planes.with(std::cell::Cell::get).is_some() { inline_mc(plane, x, y, stride, w, h, prediction, &tx.run(grid), fctx); return; @@ -2660,7 +2810,7 @@ fn push_mc_rect_tx( let mut tx = tx; tx.stride = 0; push_op(fctx, ReconOp::Mc { - plane, x, y, stride: w, w, h, prediction: window, + plane, x, y, stride: w, w, h, prediction: PredSrc::Owned(window), residual: Residual::Coeffs(tx, grid.to_vec()), }); } @@ -2684,8 +2834,9 @@ fn flush_recon( wave_barrier(fctx); let mut ops = fctx.recon_spare.with(|c| std::mem::take(&mut *c.borrow_mut())); fctx.recon_ops.with(|c| std::mem::swap(&mut *c.borrow_mut(), &mut ops)); + let mut cur: [Vec; 3] = Default::default(); for op in ops.drain(..) { - exec_op(op, y, u, v, fctx); + exec_op(op, y, u, v, &mut cur, fctx); } fctx.recon_spare.with(|c| *c.borrow_mut() = ops); } @@ -2697,9 +2848,11 @@ fn exec_op( y: &mut PlaneBuf<'static>, u: &mut PlaneBuf<'static>, v: &mut PlaneBuf<'static>, + cur: &mut [Vec; 3], fctx: &crate::decode::FrameCtx, ) { match op { + ReconOp::Pred(b) => *cur = (b.0)(y, u, v, fctx), ReconOp::Intra { plane, x, y: oy, bw, bh, rect, mode, angle_delta, reach, residual, cfl, filter_intra, smooth_neighbor, pred, @@ -2708,7 +2861,17 @@ fn exec_op( cfl, filter_intra, smooth_neighbor, pred, fctx, ), ReconOp::Mc { plane, x, y: oy, stride, w, h, prediction, residual } => { - exec_mc(y, u, v, plane, x, oy, stride, w, h, &prediction, &residual.resolve(), fctx); + let residual = residual.resolve(); + match prediction { + PredSrc::Owned(p) => { + exec_mc(y, u, v, plane, x, oy, stride, w, h, &p, &residual, fctx); + } + PredSrc::Cur { plane: sp, off } => { + let src = std::mem::take(&mut cur[sp]); + exec_mc(y, u, v, plane, x, oy, stride, w, h, &src[off..], &residual, fctx); + cur[sp] = src; + } + } } } } @@ -16941,7 +17104,7 @@ fn read_inter_plane_rect( _plane: &mut PlaneBuf<'static>, x: usize, y: usize, - prediction: &[u16], + prediction: Pred<'_>, inherited_luma_tx_type: Option, luma_skip_ctx: Option, fctx: &crate::decode::FrameCtx, ) -> Result<(Vec, TxType)> { @@ -17052,7 +17215,7 @@ fn read_inter_luma8( y: &mut PlaneBuf<'static>, px: usize, py: usize, - pred_y: &[u16], + pred_y: Pred<'_>, mode_for_tx: usize, base_q_idx: u8, scan8: &[u16], @@ -17087,11 +17250,7 @@ fn read_inter_luma8( for tu_row in 0..2 { for tu_col in 0..2 { let tu_mi = (leaf_mi.0 + tu_row, leaf_mi.1 + tu_col); - let mut tu_pred = Vec::with_capacity(16); - for rr in 0..4 { - let start = (tu_row * 4 + rr) * 8 + tu_col * 4; - tu_pred.extend_from_slice(&pred_y[start..start + 4]); - } + let tu_pred = pred_y.view(8).offset(tu_row * 4 * 8 + tu_col * 4); let tu_skip_ctx = neighbours.luma_skip_ctx(tu_mi, 1); let (tu_grid, tu_tx_type) = read_inter_plane( dec, @@ -17110,7 +17269,7 @@ fn read_inter_luma8( py + tu_row * 4, 4, base_q_idx, - &tu_pred, + tu_pred, None, Some(tu_skip_ctx), fctx, )?; @@ -21525,7 +21684,7 @@ fn read_inter_plane( y: usize, side: usize, _base_q_idx: u8, - prediction: &[u16], + prediction: Pred<'_>, // lane-chromau: this block's own luma transform's *actual coded* // `tx_type` -- `av1_get_tx_type` (libaom `blockd.h`): an inter block's // chroma plane never codes its own `tx_type` symbol, but (unlike an @@ -24117,7 +24276,7 @@ fn decode_inter_block( side, write_w, write_h, - &pred_y, + Pred::dense(&pred_y), &vec![0i32; side * side], fctx, ); push_mc_rect(1, @@ -24126,7 +24285,7 @@ fn decode_inter_block( chroma_side, write_chroma_w, write_chroma_h, - &pred_u, + Pred::dense(&pred_u), &vec![0i32; chroma_side * chroma_side], fctx, ); push_mc_rect(2, @@ -24135,7 +24294,7 @@ fn decode_inter_block( chroma_side, write_chroma_w, write_chroma_h, - &pred_v, + Pred::dense(&pred_v), &vec![0i32; chroma_side * chroma_side], fctx, ); luma_grid = vec![0i32; side * side]; @@ -24189,7 +24348,7 @@ fn decode_inter_block( tu_py, tx_px, base_q_idx, - &tu_pred, + Pred::dense(&tu_pred), None, Some(tu_skip_ctx), fctx, )? @@ -24217,7 +24376,7 @@ fn decode_inter_block( y, tu_px, tu_py, - &pred_y[start..], + Pred::dense(&pred_y[start..]), None, Some(tu_skip_ctx), fctx, )? @@ -24274,7 +24433,7 @@ fn decode_inter_block( cu_y, cu_tx, base_q_idx, - &cu_pred, + Pred::dense(&cu_pred), Some(first_tx_type), Some(3), fctx, )? @@ -24321,7 +24480,7 @@ fn decode_inter_block( y, px, py, - &pred_y, + Pred::dense(&pred_y), None, None, fctx, )?; @@ -24341,7 +24500,7 @@ fn decode_inter_block( py, side, base_q_idx, - &pred_y, + Pred::dense(&pred_y), None, None, fctx, )?; @@ -24371,7 +24530,7 @@ fn decode_inter_block( u, cpx, cpy, - &pred_u, + Pred::dense(&pred_u), Some(luma_tx_type), None, fctx, )? @@ -24393,7 +24552,7 @@ fn decode_inter_block( v, cpx, cpy, - &pred_v, + Pred::dense(&pred_v), Some(luma_tx_type), None, fctx, )? @@ -24416,7 +24575,7 @@ fn decode_inter_block( cpy, chroma_side, base_q_idx, - &pred_u, + Pred::dense(&pred_u), Some(luma_tx_type), None, fctx, )? @@ -24434,7 +24593,7 @@ fn decode_inter_block( cpy, chroma_side, base_q_idx, - &pred_v, + Pred::dense(&pred_v), Some(luma_tx_type), None, fctx, )? @@ -25328,7 +25487,7 @@ fn decode_inter_block( side, write_w, write_h, - &pred_y, + Pred::dense(&pred_y), &vec![0i32; side * side], fctx, ); if has_chroma { @@ -25338,7 +25497,7 @@ fn decode_inter_block( chroma_side, write_chroma_w, write_chroma_h, - &pred_u, + Pred::dense(&pred_u), &vec![0i32; chroma_side * chroma_side], fctx, ); push_mc_rect(2, @@ -25347,7 +25506,7 @@ fn decode_inter_block( chroma_side, write_chroma_w, write_chroma_h, - &pred_v, + Pred::dense(&pred_v), &vec![0i32; chroma_side * chroma_side], fctx, ); } @@ -25414,7 +25573,7 @@ fn decode_inter_block( tu_py, tx_px, base_q_idx, - &tu_pred, + Pred::dense(&tu_pred), None, Some(tu_skip_ctx), fctx, )? @@ -25442,7 +25601,7 @@ fn decode_inter_block( y, tu_px, tu_py, - &pred_y[start..], + Pred::dense(&pred_y[start..]), None, Some(tu_skip_ctx), fctx, )? @@ -25499,7 +25658,7 @@ fn decode_inter_block( cu_y, cu_tx, base_q_idx, - &cu_pred, + Pred::dense(&cu_pred), Some(first_tx_type), Some(3), fctx, )? @@ -25546,7 +25705,7 @@ fn decode_inter_block( y, px, py, - &pred_y, + Pred::dense(&pred_y), None, None, fctx, )?; @@ -25566,7 +25725,7 @@ fn decode_inter_block( py, side, base_q_idx, - &pred_y, + Pred::dense(&pred_y), None, None, fctx, )?; @@ -25605,7 +25764,7 @@ fn decode_inter_block( u, cpx, cpy, - &pred_u, + Pred::dense(&pred_u), Some(luma_tx_type), None, fctx, )? @@ -25627,7 +25786,7 @@ fn decode_inter_block( v, cpx, cpy, - &pred_v, + Pred::dense(&pred_v), Some(luma_tx_type), None, fctx, )? @@ -25650,7 +25809,7 @@ fn decode_inter_block( cpy, chroma_side, base_q_idx, - &pred_u, + Pred::dense(&pred_u), Some(luma_tx_type), None, fctx, )? @@ -25668,7 +25827,7 @@ fn decode_inter_block( cpy, chroma_side, base_q_idx, - &pred_v, + Pred::dense(&pred_v), Some(luma_tx_type), None, fctx, )? @@ -26962,7 +27121,7 @@ fn decode_inter_sub8_split4( // txsize_to_bsize[tx_size]` branch (`txb_skip_ctx = 0`, which // `read_inter_plane`'s `plane_idx == 0` arm already assumes). if skip { - push_mc(0, px, py, B4, &pred_y, &vec![0i32; B4 * B4], fctx); + push_mc(0, px, py, B4, Pred::dense(&pred_y), &vec![0i32; B4 * B4], fctx); neighbours.record_mi_luma_rect(lmi, B4, B4, &vec![0i32; B4 * B4]); } else { let around = neighbours.around_mi(lmi, B4); @@ -26983,7 +27142,7 @@ fn decode_inter_sub8_split4( py, B4, base_q_idx, - &pred_y, + Pred::dense(&pred_y), None, None, fctx, )?; @@ -27077,19 +27236,19 @@ fn decode_inter_sub8_split4( } } let (u_grid, v_grid) = if last_skip { - push_mc(1, cpx, cpy, B4, &pred_u, &vec![0i32; B4 * B4], fctx); - push_mc(2, cpx, cpy, B4, &pred_v, &vec![0i32; B4 * B4], fctx); + push_mc(1, cpx, cpy, B4, Pred::dense(&pred_u), &vec![0i32; B4 * B4], fctx); + push_mc(2, cpx, cpy, B4, Pred::dense(&pred_v), &vec![0i32; B4 * B4], fctx); (vec![0i32; B4 * B4], vec![0i32; B4 * B4]) } else { let around = neighbours.around_mi(group_mi, 8); let ug = read_inter_plane( dec, cdfs, TxbSet::Chroma4, scan4, 1, around[1], 0, u, cpx, cpy, B4, base_q_idx, - &pred_u, Some(first_tx_type), None, fctx, + Pred::dense(&pred_u), Some(first_tx_type), None, fctx, )? .0; let vg = read_inter_plane( dec, cdfs, TxbSet::Chroma4, scan4, 2, around[2], 0, v, cpx, cpy, B4, base_q_idx, - &pred_v, Some(first_tx_type), None, fctx, + Pred::dense(&pred_v), Some(first_tx_type), None, fctx, )? .0; let coded = ug.iter().chain(vg.iter()).any(|&c| c != 0); @@ -27935,7 +28094,7 @@ fn decode_inter_sub8_rect2( } } if skip { - push_mc_rect(0, px, py, SIDE, bw, bh, &pred_y, &vec![0i32; SIDE * SIDE], fctx); + push_mc_rect(0, px, py, SIDE, bw, bh, Pred::dense(&pred_y), &vec![0i32; SIDE * SIDE], fctx); neighbours.record_mi_luma_rect(lmi, bw, bh, &vec![0i32; bw * bh]); neighbours.fill_lf_grid_rect(lmi, w_mi, h_mi, bw as u8, bh as u8, ref_frame.max(LAST_FRAME), fctx); } else { @@ -27971,7 +28130,7 @@ fn decode_inter_sub8_rect2( tu_py, tw, base_q_idx, - &tu_pred, + Pred::dense(&tu_pred), None, Some(tu_skip_ctx), fctx, )? @@ -27996,7 +28155,7 @@ fn decode_inter_sub8_rect2( y, tu_px, tu_py, - &pred_y[start..], + Pred::dense(&pred_y[start..]), None, None, fctx, )? @@ -28101,19 +28260,19 @@ fn decode_inter_sub8_rect2( } } let (u_grid, v_grid) = if last_skip { - push_mc(1, cpx, cpy, B4, &pred_u, &vec![0i32; B4 * B4], fctx); - push_mc(2, cpx, cpy, B4, &pred_v, &vec![0i32; B4 * B4], fctx); + push_mc(1, cpx, cpy, B4, Pred::dense(&pred_u), &vec![0i32; B4 * B4], fctx); + push_mc(2, cpx, cpy, B4, Pred::dense(&pred_v), &vec![0i32; B4 * B4], fctx); (vec![0i32; B4 * B4], vec![0i32; B4 * B4]) } else { let around = neighbours.around_mi(group_mi, 8); let ug = read_inter_plane( dec, cdfs, TxbSet::Chroma4, scan4, 1, around[1], 0, u, cpx, cpy, B4, base_q_idx, - &pred_u, Some(first_tx_type), None, fctx, + Pred::dense(&pred_u), Some(first_tx_type), None, fctx, )? .0; let vg = read_inter_plane( dec, cdfs, TxbSet::Chroma4, scan4, 2, around[2], 0, v, cpx, cpy, B4, base_q_idx, - &pred_v, Some(first_tx_type), None, fctx, + Pred::dense(&pred_v), Some(first_tx_type), None, fctx, )? .0; let coded = ug.iter().chain(vg.iter()).any(|&c| c != 0); @@ -28938,19 +29097,19 @@ fn decode_inter_block8( .1 .is_some(); if skip { - push_mc(0, px, py, SIDE, &pred_y, &vec![0i32; SIDE * SIDE], fctx); + push_mc(0, px, py, SIDE, Pred::dense(&pred_y), &vec![0i32; SIDE * SIDE], fctx); push_mc(1, cpx, cpy, CHROMA_SIDE, - &pred_u, + Pred::dense(&pred_u), &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx, ); push_mc(2, cpx, cpy, CHROMA_SIDE, - &pred_v, + Pred::dense(&pred_v), &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx, ); luma_grid = vec![0i32; SIDE * SIDE]; @@ -28966,7 +29125,7 @@ fn decode_inter_block8( y, px, py, - &pred_y, + Pred::dense(&pred_y), mode_for_tx, base_q_idx, scan8, @@ -28988,7 +29147,7 @@ fn decode_inter_block8( cpy, CHROMA_SIDE, base_q_idx, - &pred_u, + Pred::dense(&pred_u), Some(luma_tx_type), None, fctx, )? @@ -29006,7 +29165,7 @@ fn decode_inter_block8( cpy, CHROMA_SIDE, base_q_idx, - &pred_v, + Pred::dense(&pred_v), Some(luma_tx_type), None, fctx, )? @@ -29588,19 +29747,19 @@ fn decode_inter_block8( .1 .is_some(); if skip { - push_mc(0, px, py, SIDE, &pred_y, &vec![0i32; SIDE * SIDE], fctx); + push_mc(0, px, py, SIDE, Pred::dense(&pred_y), &vec![0i32; SIDE * SIDE], fctx); push_mc(1, cpx, cpy, CHROMA_SIDE, - &pred_u, + Pred::dense(&pred_u), &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx, ); push_mc(2, cpx, cpy, CHROMA_SIDE, - &pred_v, + Pred::dense(&pred_v), &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx, ); luma_grid = vec![0i32; SIDE * SIDE]; @@ -29616,7 +29775,7 @@ fn decode_inter_block8( y, px, py, - &pred_y, + Pred::dense(&pred_y), mode_for_tx, base_q_idx, scan8, @@ -29638,7 +29797,7 @@ fn decode_inter_block8( cpy, CHROMA_SIDE, base_q_idx, - &pred_u, + Pred::dense(&pred_u), Some(luma_tx_type), None, fctx, )? @@ -29656,7 +29815,7 @@ fn decode_inter_block8( cpy, CHROMA_SIDE, base_q_idx, - &pred_v, + Pred::dense(&pred_v), Some(luma_tx_type), None, fctx, )?