forge
Explore
Log in

Don't you dare go Hollow

Skipped blocks stop allocating and copying their zero coefficient grids

Browse files at this commit

bccf2c807797c7fd024c8266ea538b9480629b5dAhmet Kaan GümüşParent: afb2b38
  • perf
    • skipped blocks stop allocating and copying their zero coefficient grids
Show full message
perf(av1): skipped blocks stop allocating and copying their zero coefficient grids

A skipped block handed every consumer a freshly heap-allocated all-zero
level grid -- up to 64 KB per block, three of them for the neighbour
record and one per plane for the recorded write. Those buffers are
read-only at every consumer, so they are now the existing static
`ZERO_RESIDUAL` slice: `Neighbours::record*` takes `&[&[i32]; 3]`
instead of owning Vecs, and the 53 `&vec![0i32; n]` argument
temporaries index the static instead.

`Residual::done` recognises that slice by pointer and records the
all-zero marker `Done(0, 0)` (the one `Residual::coeffs` already
produces), so a skipped block no longer copies its zeros into the
coefficient arena either.

Byte-exact 12/12 at 1/4/16 threads. seg4k instructions:u 414.794 ->
409.809 G at (16,4,2) (-1.2%), 406.145 -> 404.579 G at 1 thread
(-0.39%); page-faults 1.034 -> 1.014 M at (16,4,2).
crates/ec-av1/src/decode.rsmodified+85 -79
@@ -2149,6 +2149,12 @@ impl Residual {
2149 /// A residual the parse thread already transformed, kept in the arena2149 /// A residual the parse thread already transformed, kept in the arena
2150 /// instead of its own `Vec`.2150 /// instead of its own `Vec`.
2151 fn done(residual: &[i32], fctx: &crate::decode::FrameCtx) -> Self {2151 fn done(residual: &[i32], fctx: &crate::decode::FrameCtx) -> Self {
2152+ // lane-blockmem: a skipped block hands over [`ZERO_RESIDUAL`] itself,
2153+ // which is exactly the all-zero marker -- one pointer compare instead
2154+ // of copying up to 64 KB of zeros into the arena per block.
2155+ if std::ptr::eq(residual.as_ptr(), ZERO_RESIDUAL.as_ptr()) {
2156+ return Self::Done(0, 0);
2157+ }
2152 Self::Done(push_coeffs(residual, fctx), residual.len() as u32)2158 Self::Done(push_coeffs(residual, fctx), residual.len() as u32)
2153 }2159 }
2154 2160
@@ -7345,7 +7351,7 @@ impl Neighbours {
7345 side: usize,7351 side: usize,
7346 mode: usize,7352 mode: usize,
7347 uv_mode: usize,7353 uv_mode: usize,
7348- grids: &[Vec<i32>; 3],7354+ grids: &[&[i32]; 3],
7349 ) {7355 ) {
7350 self.record_rect(at, side, side, mode, uv_mode, grids);7356 self.record_rect(at, side, side, mode, uv_mode, grids);
7351 }7357 }
@@ -7590,7 +7596,7 @@ impl Neighbours {
7590 h: usize,7596 h: usize,
7591 mode: usize,7597 mode: usize,
7592 uv_mode: usize,7598 uv_mode: usize,
7593- grids: &[Vec<i32>; 3],7599+ grids: &[&[i32]; 3],
7594 ) {7600 ) {
7595 self.record_rect_mi(sub16_to_mi(at), w, h, mode, uv_mode, grids);7601 self.record_rect_mi(sub16_to_mi(at), w, h, mode, uv_mode, grids);
7596 }7602 }
@@ -7607,7 +7613,7 @@ impl Neighbours {
7607 h: usize,7613 h: usize,
7608 mode: usize,7614 mode: usize,
7609 uv_mode: usize,7615 uv_mode: usize,
7610- grids: &[Vec<i32>; 3],7616+ grids: &[&[i32]; 3],
7611 ) {7617 ) {
7612 let (r, c) = (at_mi.0 / (SUB / MI), at_mi.1 / (SUB / MI));7618 let (r, c) = (at_mi.0 / (SUB / MI), at_mi.1 / (SUB / MI));
7613 // lane-inter4 r2: a strip whose own footprint runs past the frame's7619 // lane-inter4 r2: a strip whose own footprint runs past the frame's
@@ -7638,7 +7644,7 @@ impl Neighbours {
7638 /// position directly in 4x4 mode-info units rather than [`SUB`]-grid7644 /// position directly in 4x4 mode-info units rather than [`SUB`]-grid
7639 /// `(r, c)`: an 8x8 leaf under a straddling 16x16 (lane-av1-rect) sits at7645 /// `(r, c)`: an 8x8 leaf under a straddling 16x16 (lane-av1-rect) sits at
7640 /// a mi offset [`Self::record`]'s SUB-unit `at` cannot name.7646 /// a mi offset [`Self::record`]'s SUB-unit `at` cannot name.
7641- fn record_mi(&mut self, at_mi: (usize, usize), side: usize, grids: &[Vec<i32>; 3]) {7647+ fn record_mi(&mut self, at_mi: (usize, usize), side: usize, grids: &[&[i32]; 3]) {
7642 self.record_mi_rect(at_mi, side, side, grids);7648 self.record_mi_rect(at_mi, side, side, grids);
7643 }7649 }
7644 7650
@@ -7649,10 +7655,10 @@ impl Neighbours {
7649 at_mi: (usize, usize),7655 at_mi: (usize, usize),
7650 w: usize,7656 w: usize,
7651 h: usize,7657 h: usize,
7652- grids: &[Vec<i32>; 3],7658+ grids: &[&[i32]; 3],
7653 ) {7659 ) {
7654 let (mi_r, mi_c) = at_mi;7660 let (mi_r, mi_c) = at_mi;
7655- let states: [Neighbour; 3] = std::array::from_fn(|plane| neighbour_state(&grids[plane]));7661+ let states: [Neighbour; 3] = std::array::from_fn(|plane| neighbour_state(grids[plane]));
7656 let (w_mi, h_mi) = (w / MI, h / MI);7662 let (w_mi, h_mi) = (w / MI, h / MI);
7657 if crate::envflags::env_flag!("EC_ECPUB") {7663 if crate::envflags::env_flag!("EC_ECPUB") {
7658 eprintln!("EC_ECPUB blk mi=({mi_r},{mi_c}) wh=({w},{h}) lvl={}", states[0].level);7664 eprintln!("EC_ECPUB blk mi=({mi_r},{mi_c}) wh=({w},{h}) lvl={}", states[0].level);
@@ -10114,7 +10120,7 @@ fn decode_block_rect(
10114 mode,10120 mode,
10115 angle_delta_y,10121 angle_delta_y,
10116 reach,10122 reach,
10117- &vec![0i32; bw * bh],10123+ &ZERO_RESIDUAL[..bw * bh],
10118 None,10124 None,
10119 filter_intra,10125 filter_intra,
10120 smooth_neighbor, fctx,10126 smooth_neighbor, fctx,
@@ -10131,7 +10137,7 @@ fn decode_block_rect(
10131 uv_predict_mode,10137 uv_predict_mode,
10132 angle_delta_uv,10138 angle_delta_uv,
10133 reach,10139 reach,
10134- &vec![0i32; chroma_w * chroma_h],10140+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
10135 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),10141 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),
10136 None,10142 None,
10137 smooth_neighbor_uv, fctx,10143 smooth_neighbor_uv, fctx,
@@ -10147,7 +10153,7 @@ fn decode_block_rect(
10147 uv_predict_mode,10153 uv_predict_mode,
10148 angle_delta_uv,10154 angle_delta_uv,
10149 reach,10155 reach,
10150- &vec![0i32; chroma_w * chroma_h],10156+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
10151 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),10157 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),
10152 None,10158 None,
10153 smooth_neighbor_uv, fctx,10159 smooth_neighbor_uv, fctx,
@@ -10159,9 +10165,9 @@ fn decode_block_rect(
10159 mode,10165 mode,
10160 uv_predict_mode,10166 uv_predict_mode,
10161 &[10167 &[
10162- vec![0i32; bw * bh],10168+ &ZERO_RESIDUAL[..bw * bh],
10163- vec![0i32; chroma_w * chroma_h],10169+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
10164- vec![0i32; chroma_w * chroma_h],10170+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
10165 ],10171 ],
10166 );10172 );
10167 } else {10173 } else {
@@ -10336,7 +10342,7 @@ fn decode_block_rect(
10336 None,10342 None,
10337 smooth_neighbor_uv, fctx,10343 smooth_neighbor_uv, fctx,
10338 );10344 );
10339- neighbours.record_rect(at, bw, bh, mode, uv_predict_mode, &[luma_levels, u_levels, v_levels]);10345+ neighbours.record_rect(at, bw, bh, mode, uv_predict_mode, &[&luma_levels[..], &u_levels[..], &v_levels[..]]);
10340 RECT_COEFF_HITS.with(|c| c.set(c.get() + 1));10346 RECT_COEFF_HITS.with(|c| c.set(c.get() + 1));
10341 }10347 }
10342 }10348 }
@@ -10675,7 +10681,7 @@ fn decode_leaf_rect(
10675 );10681 );
10676 RECT_LEAF_COEFF_HITS.with(|c| c.set(c.get() + 1));10682 RECT_LEAF_COEFF_HITS.with(|c| c.set(c.get() + 1));
10677 }10683 }
10678- neighbours.record_mi_rect(leaf_mi, bw, bh, &[luma_levels, u_levels, v_levels]);10684+ neighbours.record_mi_rect(leaf_mi, bw, bh, &[&luma_levels[..], &u_levels[..], &v_levels[..]]);
10679 neighbours.fill_skip_grid_rect(leaf_mi, mi_w, mi_h, skip);10685 neighbours.fill_skip_grid_rect(leaf_mi, mi_w, mi_h, skip);
10680 neighbours.fill_lf_grid_rect(leaf_mi, mi_w, mi_h, bw as u8, bh as u8, 0, fctx);10686 neighbours.fill_lf_grid_rect(leaf_mi, mi_w, mi_h, bw as u8, bh as u8, 0, fctx);
10681 // The leaf's own palette state (`0` clears, as this site always did10687 // The leaf's own palette state (`0` clears, as this site always did
@@ -11067,7 +11073,7 @@ fn decode_block_rect4(
11067 (mi_r, mi_c),11073 (mi_r, mi_c),
11068 bw,11074 bw,
11069 bh,11075 bh,
11070- &[luma_levels, u_levels, v_levels],11076+ &[&luma_levels[..], &u_levels[..], &v_levels[..]],
11071 );11077 );
11072 neighbours.fill_skip_grid_rect((mi_r, mi_c), mi_w, mi_h, skip);11078 neighbours.fill_skip_grid_rect((mi_r, mi_c), mi_w, mi_h, skip);
11073 neighbours.fill_lf_grid_rect((mi_r, mi_c), mi_w, mi_h, bw as u8, bh as u8, 0, fctx);11079 neighbours.fill_lf_grid_rect((mi_r, mi_c), mi_w, mi_h, bw as u8, bh as u8, 0, fctx);
@@ -11138,7 +11144,7 @@ fn decode_block_rect4(
11138 None,11144 None,
11139 smooth_neighbor_uv, fctx,11145 smooth_neighbor_uv, fctx,
11140 );11146 );
11141- neighbours.record_mi_rect((mi_r, mi_c), bw, bh, &[luma_levels.to_vec(), u_levels, v_levels]);11147+ neighbours.record_mi_rect((mi_r, mi_c), bw, bh, &[&luma_levels[..], &u_levels[..], &v_levels[..]]);
11142 neighbours.fill_skip_grid_rect((mi_r, mi_c), mi_w, mi_h, skip);11148 neighbours.fill_skip_grid_rect((mi_r, mi_c), mi_w, mi_h, skip);
11143 neighbours.fill_lf_grid_rect((mi_r, mi_c), mi_w, mi_h, bw as u8, bh as u8, 0, fctx);11149 neighbours.fill_lf_grid_rect((mi_r, mi_c), mi_w, mi_h, bw as u8, bh as u8, 0, fctx);
11144 record_strip_palette(11150 record_strip_palette(
@@ -11983,7 +11989,7 @@ fn decode_block_rect64(
11983 mode,11989 mode,
11984 angle_delta_y,11990 angle_delta_y,
11985 reach,11991 reach,
11986- &vec![0i32; bw * bh],11992+ &ZERO_RESIDUAL[..bw * bh],
11987 None,11993 None,
11988 filter_intra,11994 filter_intra,
11989 smooth_neighbor, fctx,11995 smooth_neighbor, fctx,
@@ -12000,7 +12006,7 @@ fn decode_block_rect64(
12000 uv_predict_mode,12006 uv_predict_mode,
12001 angle_delta_uv,12007 angle_delta_uv,
12002 reach,12008 reach,
12003- &vec![0i32; chroma_w * chroma_h],12009+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
12004 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),12010 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),
12005 None,12011 None,
12006 smooth_neighbor_uv, fctx,12012 smooth_neighbor_uv, fctx,
@@ -12016,7 +12022,7 @@ fn decode_block_rect64(
12016 uv_predict_mode,12022 uv_predict_mode,
12017 angle_delta_uv,12023 angle_delta_uv,
12018 reach,12024 reach,
12019- &vec![0i32; chroma_w * chroma_h],12025+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
12020 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),12026 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),
12021 None,12027 None,
12022 smooth_neighbor_uv, fctx,12028 smooth_neighbor_uv, fctx,
@@ -12028,9 +12034,9 @@ fn decode_block_rect64(
12028 mode,12034 mode,
12029 uv_predict_mode,12035 uv_predict_mode,
12030 &[12036 &[
12031- vec![0i32; bw * bh],12037+ &ZERO_RESIDUAL[..bw * bh],
12032- vec![0i32; chroma_w * chroma_h],12038+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
12033- vec![0i32; chroma_w * chroma_h],12039+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
12034 ],12040 ],
12035 );12041 );
12036 } else {12042 } else {
@@ -12277,7 +12283,7 @@ fn decode_block_rect64(
12277 None,12283 None,
12278 smooth_neighbor_uv, fctx,12284 smooth_neighbor_uv, fctx,
12279 );12285 );
12280- neighbours.record_rect(at, bw, bh, mode, uv_predict_mode, &[luma_levels, u_levels, v_levels]);12286+ neighbours.record_rect(at, bw, bh, mode, uv_predict_mode, &[&luma_levels[..], &u_levels[..], &v_levels[..]]);
12281 RECT_COEFF_HITS.with(|c| c.set(c.get() + 1));12287 RECT_COEFF_HITS.with(|c| c.set(c.get() + 1));
12282 }12288 }
12283 let (py_size, py_colors) = palette_y.as_ref().map_or((0, [0u16; 8]), |p| (p.size, p.colors));12289 let (py_size, py_colors) = palette_y.as_ref().map_or((0, [0u16; 8]), |p| (p.size, p.colors));
@@ -13581,7 +13587,7 @@ fn decode_block(
13581 mode,13587 mode,
13582 angle_delta_y,13588 angle_delta_y,
13583 tu_reach,13589 tu_reach,
13584- &vec![0i32; logical_tx * logical_tx],13590+ &ZERO_RESIDUAL[..logical_tx * logical_tx],
13585 None,13591 None,
13586 filter_intra,13592 filter_intra,
13587 smooth_neighbor, fctx,13593 smooth_neighbor, fctx,
@@ -13596,7 +13602,7 @@ fn decode_block(
13596 mode,13602 mode,
13597 angle_delta_y,13603 angle_delta_y,
13598 reach,13604 reach,
13599- &vec![0i32; side * side],13605+ &ZERO_RESIDUAL[..side * side],
13600 None,13606 None,
13601 filter_intra,13607 filter_intra,
13602 smooth_neighbor, fctx,13608 smooth_neighbor, fctx,
@@ -13627,7 +13633,7 @@ fn decode_block(
13627 uv_predict_mode,13633 uv_predict_mode,
13628 angle_delta_uv,13634 angle_delta_uv,
13629 cu_r,13635 cu_r,
13630- &vec![0i32; chroma_tx * chroma_tx],13636+ &ZERO_RESIDUAL[..chroma_tx * chroma_tx],
13631 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),13637 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),
13632 None,13638 None,
13633 smooth_neighbor_uv, fctx,13639 smooth_neighbor_uv, fctx,
@@ -13642,7 +13648,7 @@ fn decode_block(
13642 uv_predict_mode,13648 uv_predict_mode,
13643 angle_delta_uv,13649 angle_delta_uv,
13644 cu_r,13650 cu_r,
13645- &vec![0i32; chroma_tx * chroma_tx],13651+ &ZERO_RESIDUAL[..chroma_tx * chroma_tx],
13646 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),13652 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),
13647 None,13653 None,
13648 smooth_neighbor_uv, fctx,13654 smooth_neighbor_uv, fctx,
@@ -13652,7 +13658,7 @@ fn decode_block(
13652 let luma_grid = vec![0i32; side * side];13658 let luma_grid = vec![0i32; side * side];
13653 let u_grid = vec![0i32; chroma_side * chroma_side];13659 let u_grid = vec![0i32; chroma_side * chroma_side];
13654 let v_grid = vec![0i32; chroma_side * chroma_side];13660 let v_grid = vec![0i32; chroma_side * chroma_side];
13655- neighbours.record(at, side, mode, uv_predict_mode, &[luma_grid, u_grid, v_grid]);13661+ neighbours.record(at, side, mode, uv_predict_mode, &[&luma_grid[..], &u_grid[..], &v_grid[..]]);
13656 } else if logical_tx == side {13662 } else if logical_tx == side {
13657 // lane-sb128b r1: the test used to be `!tx_select || logical_tx == side`.13663 // lane-sb128b r1: the test used to be `!tx_select || logical_tx == side`.
13658 // Without `tx_select` `logical_tx` IS `side` at every size <= 64, so13664 // Without `tx_select` `logical_tx` IS `side` at every size <= 64, so
@@ -13749,7 +13755,7 @@ fn decode_block(
13749 smooth_neighbor_uv, fctx,13755 smooth_neighbor_uv, fctx,
13750 )?;13756 )?;
13751 fctx.intrabc_chroma_tx.with(|c| c.set(None));13757 fctx.intrabc_chroma_tx.with(|c| c.set(None));
13752- neighbours.record(at, side, mode, uv_predict_mode, &[luma_grid, u_grid, v_grid]);13758+ neighbours.record(at, side, mode, uv_predict_mode, &[&luma_grid[..], &u_grid[..], &v_grid[..]]);
13753 } else {13759 } else {
13754 // Several luma transform units, raster order (spec13760 // Several luma transform units, raster order (spec
13755 // `transform_block`'s loop): the block's resolved transform is13761 // `transform_block`'s loop): the block's resolved transform is
@@ -14267,9 +14273,9 @@ fn decode_block_128rect(
14267 mode,14273 mode,
14268 uv_predict_mode,14274 uv_predict_mode,
14269 &[14275 &[
14270- vec![0i32; bw * bh],14276+ &ZERO_RESIDUAL[..bw * bh],
14271- vec![0i32; chroma_w * chroma_h],14277+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
14272- vec![0i32; chroma_w * chroma_h],14278+ &ZERO_RESIDUAL[..chroma_w * chroma_h],
14273 ],14279 ],
14274 );14280 );
14275 } else {14281 } else {
@@ -14598,7 +14604,7 @@ fn decode_leaf8(
14598 mode,14604 mode,
14599 angle_delta_y,14605 angle_delta_y,
14600 tu_reach,14606 tu_reach,
14601- &vec![0i32; 16],14607+ &ZERO_RESIDUAL[..16],
14602 None,14608 None,
14603 filter_intra,14609 filter_intra,
14604 smooth_neighbor, fctx,14610 smooth_neighbor, fctx,
@@ -14616,7 +14622,7 @@ fn decode_leaf8(
14616 mode,14622 mode,
14617 angle_delta_y,14623 angle_delta_y,
14618 reach,14624 reach,
14619- &vec![0i32; 64],14625+ &ZERO_RESIDUAL[..64],
14620 None,14626 None,
14621 filter_intra,14627 filter_intra,
14622 smooth_neighbor, fctx,14628 smooth_neighbor, fctx,
@@ -14635,7 +14641,7 @@ fn decode_leaf8(
14635 uv_predict_mode,14641 uv_predict_mode,
14636 angle_delta_uv,14642 angle_delta_uv,
14637 reach,14643 reach,
14638- &vec![0i32; 16],14644+ &ZERO_RESIDUAL[..16],
14639 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),14645 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),
14640 None,14646 None,
14641 smooth_neighbor_uv, fctx,14647 smooth_neighbor_uv, fctx,
@@ -14652,7 +14658,7 @@ fn decode_leaf8(
14652 uv_predict_mode,14658 uv_predict_mode,
14653 angle_delta_uv,14659 angle_delta_uv,
14654 reach,14660 reach,
14655- &vec![0i32; 16],14661+ &ZERO_RESIDUAL[..16],
14656 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),14662 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),
14657 None,14663 None,
14658 smooth_neighbor_uv, fctx,14664 smooth_neighbor_uv, fctx,
@@ -14938,7 +14944,7 @@ fn decode_leaf8(
14938 record_intrabc_mi(leaf_mi.0, leaf_mi.1, 2, intrabc_dv, fctx);14944 record_intrabc_mi(leaf_mi.0, leaf_mi.1, 2, intrabc_dv, fctx);
14939 return Ok(mode);14945 return Ok(mode);
14940 }14946 }
14941- neighbours.record_mi(leaf_mi, 8, &[luma_grid, u_grid, v_grid]);14947+ neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]);
14942 // This leaf's own palette state into the mi-granular above/left bands14948 // This leaf's own palette state into the mi-granular above/left bands
14943 // (sizes 0 when it used none, which is what clears a previous block's14949 // (sizes 0 when it used none, which is what clears a previous block's
14944 // palette out of the next block's ctx and colour cache).14950 // palette out of the next block's ctx and colour cache).
@@ -15149,8 +15155,8 @@ fn decode_leaf_split4(
15149 let (px, py) = (lmi.1 * MI, lmi.0 * MI);15155 let (px, py) = (lmi.1 * MI, lmi.0 * MI);
15150 let reach = Reach::of(4, px, py, y.width, y.height, fctx);15156 let reach = Reach::of(4, px, py, y.width, y.height, fctx);
15151 if skip {15157 if skip {
15152- push_intra(0, px, py, 4, mode, angle_delta_y, reach, &vec![0i32; 16], None, filter_intra, smooth_neighbor, fctx);15158+ push_intra(0, px, py, 4, mode, angle_delta_y, reach, &ZERO_RESIDUAL[..16], None, filter_intra, smooth_neighbor, fctx);
15153- neighbours.record_mi_luma(lmi, 4, &vec![0i32; 16]);15159+ neighbours.record_mi_luma(lmi, 4, &ZERO_RESIDUAL[..16]);
15154 } else {15160 } else {
15155 let tu_around = neighbours.around_mi(lmi, 4)[0];15161 let tu_around = neighbours.around_mi(lmi, 4)[0];
15156 // A `BLOCK_4X4` leaf's luma TU *is* the whole block, so libaom's15162 // A `BLOCK_4X4` leaf's luma TU *is* the whole block, so libaom's
@@ -15211,8 +15217,8 @@ fn decode_leaf_split4(
15211 CHROMA_SKIP_CFL_HITS.with(|h| h.set(h.get() + 1));15217 CHROMA_SKIP_CFL_HITS.with(|h| h.set(h.get() + 1));
15212 SKIP_CFL_HITS.with(|c| c.set(c.get() + 1));15218 SKIP_CFL_HITS.with(|c| c.set(c.get() + 1));
15213 }15219 }
15214- push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &vec![0i32; 16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx);15220+ push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx);
15215- push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &vec![0i32; 16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx);15221+ push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx);
15216 (vec![0i32; 16], vec![0i32; 16])15222 (vec![0i32; 16], vec![0i32; 16])
15217 } else {15223 } else {
15218 let ac = alpha.map(|_| cfl_src(gpx, gpy, 8));15224 let ac = alpha.map(|_| cfl_src(gpx, gpy, 8));
@@ -15583,8 +15589,8 @@ fn decode_leaf_rect8(
15583 CHROMA_SKIP_CFL_HITS.with(|h| h.set(h.get() + 1));15589 CHROMA_SKIP_CFL_HITS.with(|h| h.set(h.get() + 1));
15584 SKIP_CFL_HITS.with(|c| c.set(c.get() + 1));15590 SKIP_CFL_HITS.with(|c| c.set(c.get() + 1));
15585 }15591 }
15586- push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &vec![0i32; 16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx);15592+ push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx);
15587- push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &vec![0i32; 16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx);15593+ push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx);
15588 (vec![0i32; 16], vec![0i32; 16])15594 (vec![0i32; 16], vec![0i32; 16])
15589 } else {15595 } else {
15590 let ac = alpha.map(|_| cfl_src(gpx, gpy, 8));15596 let ac = alpha.map(|_| cfl_src(gpx, gpy, 8));
@@ -24974,7 +24980,7 @@ fn decode_inter_block(
24974 write_w,24980 write_w,
24975 write_h,24981 write_h,
24976 sy,24982 sy,
24977- &vec![0i32; side * side], fctx,24983+ &ZERO_RESIDUAL[..side * side], fctx,
24978 );24984 );
24979 push_mc_rect(1, 24985 push_mc_rect(1,
24980 cpx,24986 cpx,
@@ -24983,7 +24989,7 @@ fn decode_inter_block(
24983 write_chroma_w,24989 write_chroma_w,
24984 write_chroma_h,24990 write_chroma_h,
24985 su,24991 su,
24986- &vec![0i32; chroma_side * chroma_side], fctx,24992+ &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx,
24987 );24993 );
24988 push_mc_rect(2, 24994 push_mc_rect(2,
24989 cpx,24995 cpx,
@@ -24992,7 +24998,7 @@ fn decode_inter_block(
24992 write_chroma_w,24998 write_chroma_w,
24993 write_chroma_h,24999 write_chroma_h,
24994 sv,25000 sv,
24995- &vec![0i32; chroma_side * chroma_side], fctx,25001+ &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx,
24996 );25002 );
24997 luma_grid = vec![0i32; side * side];25003 luma_grid = vec![0i32; side * side];
24998 u_grid = vec![0i32; chroma_side * chroma_side];25004 u_grid = vec![0i32; chroma_side * chroma_side];
@@ -26221,7 +26227,7 @@ fn decode_inter_block(
26221 write_w,26227 write_w,
26222 write_h,26228 write_h,
26223 sy,26229 sy,
26224- &vec![0i32; side * side], fctx,26230+ &ZERO_RESIDUAL[..side * side], fctx,
26225 );26231 );
26226 if has_chroma {26232 if has_chroma {
26227 push_mc_rect(1, 26233 push_mc_rect(1,
@@ -26231,7 +26237,7 @@ fn decode_inter_block(
26231 write_chroma_w,26237 write_chroma_w,
26232 write_chroma_h,26238 write_chroma_h,
26233 su,26239 su,
26234- &vec![0i32; chroma_side * chroma_side], fctx,26240+ &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx,
26235 );26241 );
26236 push_mc_rect(2, 26242 push_mc_rect(2,
26237 cpx,26243 cpx,
@@ -26240,7 +26246,7 @@ fn decode_inter_block(
26240 write_chroma_w,26246 write_chroma_w,
26241 write_chroma_h,26247 write_chroma_h,
26242 sv,26248 sv,
26243- &vec![0i32; chroma_side * chroma_side], fctx,26249+ &ZERO_RESIDUAL[..chroma_side * chroma_side], fctx,
26244 );26250 );
26245 }26251 }
26246 luma_grid = vec![0i32; side * side];26252 luma_grid = vec![0i32; side * side];
@@ -26971,7 +26977,7 @@ fn decode_inter_block(
26971 mode,26977 mode,
26972 angle_delta_y,26978 angle_delta_y,
26973 tu_reach,26979 tu_reach,
26974- &vec![0i32; tx_px * tx_px],26980+ &ZERO_RESIDUAL[..tx_px * tx_px],
26975 None,26981 None,
26976 filter_intra,26982 filter_intra,
26977 smooth_neighbor, fctx,26983 smooth_neighbor, fctx,
@@ -27041,7 +27047,7 @@ fn decode_inter_block(
27041 uv_predict_mode,27047 uv_predict_mode,
27042 angle_delta_uv,27048 angle_delta_uv,
27043 cu_reach,27049 cu_reach,
27044- &vec![0i32; cu_tx * cu_tx],27050+ &ZERO_RESIDUAL[..cu_tx * cu_tx],
27045 None,27051 None,
27046 None,27052 None,
27047 smooth_neighbor_uv, fctx,27053 smooth_neighbor_uv, fctx,
@@ -27111,7 +27117,7 @@ fn decode_inter_block(
27111 mode,27117 mode,
27112 angle_delta_y,27118 angle_delta_y,
27113 reach,27119 reach,
27114- &vec![0i32; side * side],27120+ &ZERO_RESIDUAL[..side * side],
27115 None,27121 None,
27116 filter_intra,27122 filter_intra,
27117 smooth_neighbor, fctx,27123 smooth_neighbor, fctx,
@@ -27128,7 +27134,7 @@ fn decode_inter_block(
27128 uv_predict_mode,27134 uv_predict_mode,
27129 angle_delta_uv,27135 angle_delta_uv,
27130 reach,27136 reach,
27131- &vec![0i32; chroma_side * chroma_side],27137+ &ZERO_RESIDUAL[..chroma_side * chroma_side],
27132 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),27138 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),
27133 None,27139 None,
27134 smooth_neighbor_uv, fctx,27140 smooth_neighbor_uv, fctx,
@@ -27143,7 +27149,7 @@ fn decode_inter_block(
27143 uv_predict_mode,27149 uv_predict_mode,
27144 angle_delta_uv,27150 angle_delta_uv,
27145 reach,27151 reach,
27146- &vec![0i32; chroma_side * chroma_side],27152+ &ZERO_RESIDUAL[..chroma_side * chroma_side],
27147 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),27153 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),
27148 None,27154 None,
27149 smooth_neighbor_uv, fctx,27155 smooth_neighbor_uv, fctx,
@@ -27373,7 +27379,7 @@ fn decode_inter_block(
27373 write_h,27379 write_h,
27374 mode_for_tx,27380 mode_for_tx,
27375 uv_predict_mode,27381 uv_predict_mode,
27376- &[luma_grid, u_grid, v_grid],27382+ &[&luma_grid[..], &u_grid[..], &v_grid[..]],
27377 );27383 );
27378 }27384 }
27379 if let Some((left, above)) = saved_chroma_ctx {27385 if let Some((left, above)) = saved_chroma_ctx {
@@ -27842,8 +27848,8 @@ fn decode_inter_sub8_split4(
27842 // txsize_to_bsize[tx_size]` branch (`txb_skip_ctx = 0`, which27848 // txsize_to_bsize[tx_size]` branch (`txb_skip_ctx = 0`, which
27843 // `read_inter_plane`'s `plane_idx == 0` arm already assumes).27849 // `read_inter_plane`'s `plane_idx == 0` arm already assumes).
27844 if skip {27850 if skip {
27845- push_mc(0, px, py, B4, Pred::dense(&pred_y), &vec![0i32; B4 * B4], fctx);27851+ push_mc(0, px, py, B4, Pred::dense(&pred_y), &ZERO_RESIDUAL[..B4 * B4], fctx);
27846- neighbours.record_mi_luma_rect(lmi, B4, B4, &vec![0i32; B4 * B4]);27852+ neighbours.record_mi_luma_rect(lmi, B4, B4, &ZERO_RESIDUAL[..B4 * B4]);
27847 } else {27853 } else {
27848 let around = neighbours.around_mi(lmi, B4);27854 let around = neighbours.around_mi(lmi, B4);
27849 let (luma_grid, tx_type) = read_inter_plane(27855 let (luma_grid, tx_type) = read_inter_plane(
@@ -27957,8 +27963,8 @@ fn decode_inter_sub8_split4(
27957 }27963 }
27958 }27964 }
27959 let (u_grid, v_grid) = if last_skip {27965 let (u_grid, v_grid) = if last_skip {
27960- push_mc(1, cpx, cpy, B4, Pred::dense(&pred_u), &vec![0i32; B4 * B4], fctx);27966+ push_mc(1, cpx, cpy, B4, Pred::dense(&pred_u), &ZERO_RESIDUAL[..B4 * B4], fctx);
27961- push_mc(2, cpx, cpy, B4, Pred::dense(&pred_v), &vec![0i32; B4 * B4], fctx);27967+ push_mc(2, cpx, cpy, B4, Pred::dense(&pred_v), &ZERO_RESIDUAL[..B4 * B4], fctx);
27962 (vec![0i32; B4 * B4], vec![0i32; B4 * B4])27968 (vec![0i32; B4 * B4], vec![0i32; B4 * B4])
27963 } else {27969 } else {
27964 let around = neighbours.around_mi(group_mi, 8);27970 let around = neighbours.around_mi(group_mi, 8);
@@ -28230,10 +28236,10 @@ fn decode_intra_sub8_leaf(
28230 // reader [`decode_leaf_split4`] uses.28236 // reader [`decode_leaf_split4`] uses.
28231 if skip {28237 if skip {
28232 push_intra(0, 28238 push_intra(0,
28233- px, py, 4, mode, angle_delta_y, reach, &vec![0i32; 16], None, filter_intra,28239+ px, py, 4, mode, angle_delta_y, reach, &ZERO_RESIDUAL[..16], None, filter_intra,
28234 smooth_neighbor, fctx,28240 smooth_neighbor, fctx,
28235 );28241 );
28236- neighbours.record_mi_luma(lmi, 4, &vec![0i32; 16]);28242+ neighbours.record_mi_luma(lmi, 4, &ZERO_RESIDUAL[..16]);
28237 } else {28243 } else {
28238 let tu_around = neighbours.around_mi(lmi, 4)[0];28244 let tu_around = neighbours.around_mi(lmi, 4)[0];
28239 let tu_grid = read_plane(28245 let tu_grid = read_plane(
@@ -28401,8 +28407,8 @@ fn decode_intra_sub8_leaf(
28401 CHROMA_SKIP_CFL_HITS.with(|h| h.set(h.get() + 1));28407 CHROMA_SKIP_CFL_HITS.with(|h| h.set(h.get() + 1));
28402 SKIP_CFL_HITS.with(|c| c.set(c.get() + 1));28408 SKIP_CFL_HITS.with(|c| c.set(c.get() + 1));
28403 }28409 }
28404- push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &vec![0i32; 16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx);28410+ push_intra(1, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((au, _), ac)| (au, ac)), None, smooth_neighbor_uv, fctx);
28405- push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &vec![0i32; 16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx);28411+ push_intra(2, cpx, cpy, 4, uv_predict_mode, angle_delta_uv, group_reach, &ZERO_RESIDUAL[..16], alpha.zip(ac).map(|((_, av), ac)| (av, ac)), None, smooth_neighbor_uv, fctx);
28406 (vec![0i32; 16], vec![0i32; 16])28412 (vec![0i32; 16], vec![0i32; 16])
28407 } else {28413 } else {
28408 let chroma_around = neighbours.around_mi(group_mi, 8);28414 let chroma_around = neighbours.around_mi(group_mi, 8);
@@ -28813,8 +28819,8 @@ fn decode_inter_sub8_rect2(
28813 }28819 }
28814 }28820 }
28815 if skip {28821 if skip {
28816- push_mc_rect(0, px, py, SIDE, bw, bh, Pred::dense(&pred_y), &vec![0i32; SIDE * SIDE], fctx);28822+ push_mc_rect(0, px, py, SIDE, bw, bh, Pred::dense(&pred_y), &ZERO_RESIDUAL[..SIDE * SIDE], fctx);
28817- neighbours.record_mi_luma_rect(lmi, bw, bh, &vec![0i32; bw * bh]);28823+ neighbours.record_mi_luma_rect(lmi, bw, bh, &ZERO_RESIDUAL[..bw * bh]);
28818 neighbours.fill_lf_grid_rect(lmi, w_mi, h_mi, bw as u8, bh as u8, ref_frame.max(LAST_FRAME), fctx);28824 neighbours.fill_lf_grid_rect(lmi, w_mi, h_mi, bw as u8, bh as u8, ref_frame.max(LAST_FRAME), fctx);
28819 } else {28825 } else {
28820 let (mut last_tw, mut last_th) = (bw, bh);28826 let (mut last_tw, mut last_th) = (bw, bh);
@@ -28979,8 +28985,8 @@ fn decode_inter_sub8_rect2(
28979 }28985 }
28980 }28986 }
28981 let (u_grid, v_grid) = if last_skip {28987 let (u_grid, v_grid) = if last_skip {
28982- push_mc(1, cpx, cpy, B4, Pred::dense(&pred_u), &vec![0i32; B4 * B4], fctx);28988+ push_mc(1, cpx, cpy, B4, Pred::dense(&pred_u), &ZERO_RESIDUAL[..B4 * B4], fctx);
28983- push_mc(2, cpx, cpy, B4, Pred::dense(&pred_v), &vec![0i32; B4 * B4], fctx);28989+ push_mc(2, cpx, cpy, B4, Pred::dense(&pred_v), &ZERO_RESIDUAL[..B4 * B4], fctx);
28984 (vec![0i32; B4 * B4], vec![0i32; B4 * B4])28990 (vec![0i32; B4 * B4], vec![0i32; B4 * B4])
28985 } else {28991 } else {
28986 let around = neighbours.around_mi(group_mi, 8);28992 let around = neighbours.around_mi(group_mi, 8);
@@ -29812,20 +29818,20 @@ fn decode_inter_block8(
29812 .129818 .1
29813 .is_some();29819 .is_some();
29814 if skip {29820 if skip {
29815- push_mc(0, px, py, SIDE, Pred::dense(&pred_y), &vec![0i32; SIDE * SIDE], fctx);29821+ push_mc(0, px, py, SIDE, Pred::dense(&pred_y), &ZERO_RESIDUAL[..SIDE * SIDE], fctx);
29816 push_mc(1, 29822 push_mc(1,
29817 cpx,29823 cpx,
29818 cpy,29824 cpy,
29819 CHROMA_SIDE,29825 CHROMA_SIDE,
29820 Pred::dense(&pred_u),29826 Pred::dense(&pred_u),
29821- &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx,29827+ &ZERO_RESIDUAL[..CHROMA_SIDE * CHROMA_SIDE], fctx,
29822 );29828 );
29823 push_mc(2, 29829 push_mc(2,
29824 cpx,29830 cpx,
29825 cpy,29831 cpy,
29826 CHROMA_SIDE,29832 CHROMA_SIDE,
29827 Pred::dense(&pred_v),29833 Pred::dense(&pred_v),
29828- &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx,29834+ &ZERO_RESIDUAL[..CHROMA_SIDE * CHROMA_SIDE], fctx,
29829 );29835 );
29830 luma_grid = vec![0i32; SIDE * SIDE];29836 luma_grid = vec![0i32; SIDE * SIDE];
29831 u_grid = vec![0i32; CHROMA_SIDE * CHROMA_SIDE];29837 u_grid = vec![0i32; CHROMA_SIDE * CHROMA_SIDE];
@@ -29931,7 +29937,7 @@ fn decode_inter_block8(
29931 palette_record8.2,29937 palette_record8.2,
29932 palette_record8.3,29938 palette_record8.3,
29933 );29939 );
29934- neighbours.record_mi(leaf_mi, 8, &[luma_grid, u_grid, v_grid]);29940+ neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]);
29935 if let Some((left, above)) = saved_luma_ctx {29941 if let Some((left, above)) = saved_luma_ctx {
29936 for (cell, state) in left.into_iter().enumerate() {29942 for (cell, state) in left.into_iter().enumerate() {
29937 neighbours.left[leaf_mi.0 + cell][0] = state;29943 neighbours.left[leaf_mi.0 + cell][0] = state;
@@ -30460,20 +30466,20 @@ fn decode_inter_block8(
30460 .130466 .1
30461 .is_some();30467 .is_some();
30462 if skip {30468 if skip {
30463- push_mc(0, px, py, SIDE, Pred::dense(&pred_y), &vec![0i32; SIDE * SIDE], fctx);30469+ push_mc(0, px, py, SIDE, Pred::dense(&pred_y), &ZERO_RESIDUAL[..SIDE * SIDE], fctx);
30464 push_mc(1, 30470 push_mc(1,
30465 cpx,30471 cpx,
30466 cpy,30472 cpy,
30467 CHROMA_SIDE,30473 CHROMA_SIDE,
30468 Pred::dense(&pred_u),30474 Pred::dense(&pred_u),
30469- &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx,30475+ &ZERO_RESIDUAL[..CHROMA_SIDE * CHROMA_SIDE], fctx,
30470 );30476 );
30471 push_mc(2, 30477 push_mc(2,
30472 cpx,30478 cpx,
30473 cpy,30479 cpy,
30474 CHROMA_SIDE,30480 CHROMA_SIDE,
30475 Pred::dense(&pred_v),30481 Pred::dense(&pred_v),
30476- &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], fctx,30482+ &ZERO_RESIDUAL[..CHROMA_SIDE * CHROMA_SIDE], fctx,
30477 );30483 );
30478 luma_grid = vec![0i32; SIDE * SIDE];30484 luma_grid = vec![0i32; SIDE * SIDE];
30479 u_grid = vec![0i32; CHROMA_SIDE * CHROMA_SIDE];30485 u_grid = vec![0i32; CHROMA_SIDE * CHROMA_SIDE];
@@ -30836,7 +30842,7 @@ fn decode_inter_block8(
30836 mode,30842 mode,
30837 angle_delta_y,30843 angle_delta_y,
30838 tu_reach,30844 tu_reach,
30839- &vec![0i32; tx_px * tx_px],30845+ &ZERO_RESIDUAL[..tx_px * tx_px],
30840 None,30846 None,
30841 filter_intra,30847 filter_intra,
30842 smooth_neighbor, fctx,30848 smooth_neighbor, fctx,
@@ -30889,7 +30895,7 @@ fn decode_inter_block8(
30889 mode,30895 mode,
30890 angle_delta_y,30896 angle_delta_y,
30891 reach,30897 reach,
30892- &vec![0i32; SIDE * SIDE],30898+ &ZERO_RESIDUAL[..SIDE * SIDE],
30893 None,30899 None,
30894 filter_intra,30900 filter_intra,
30895 smooth_neighbor, fctx,30901 smooth_neighbor, fctx,
@@ -30908,7 +30914,7 @@ fn decode_inter_block8(
30908 uv_predict_mode,30914 uv_predict_mode,
30909 angle_delta_uv,30915 angle_delta_uv,
30910 reach,30916 reach,
30911- &vec![0i32; CHROMA_SIDE * CHROMA_SIDE],30917+ &ZERO_RESIDUAL[..CHROMA_SIDE * CHROMA_SIDE],
30912 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),30918 alpha.zip(ac).map(|((au, _), ac)| (au, ac)),
30913 None,30919 None,
30914 smooth_neighbor_uv, fctx,30920 smooth_neighbor_uv, fctx,
@@ -30923,7 +30929,7 @@ fn decode_inter_block8(
30923 uv_predict_mode,30929 uv_predict_mode,
30924 angle_delta_uv,30930 angle_delta_uv,
30925 reach,30931 reach,
30926- &vec![0i32; CHROMA_SIDE * CHROMA_SIDE],30932+ &ZERO_RESIDUAL[..CHROMA_SIDE * CHROMA_SIDE],
30927 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),30933 alpha.zip(ac).map(|((_, av), ac)| (av, ac)),
30928 None,30934 None,
30929 smooth_neighbor_uv, fctx,30935 smooth_neighbor_uv, fctx,
@@ -31058,7 +31064,7 @@ fn decode_inter_block8(
31058 palette_record8.2,31064 palette_record8.2,
31059 palette_record8.3,31065 palette_record8.3,
31060 );31066 );
31061- neighbours.record_mi(leaf_mi, 8, &[luma_grid, u_grid, v_grid]);31067+ neighbours.record_mi(leaf_mi, 8, &[&luma_grid[..], &u_grid[..], &v_grid[..]]);
31062 // lane-uv8 r1: this leaf never stamped a mode band at all, so the block31068 // lane-uv8 r1: this leaf never stamped a mode band at all, so the block
31063 // below/right of it read whatever block last wrote the coarse [`SUB`]31069 // below/right of it read whatever block last wrote the coarse [`SUB`]
31064 // slot -- now that an intra leaf here can code a smooth/directional31070 // slot -- now that an intra leaf here can code a smooth/directional