Skip to content

Commit 05bceed

Browse files
committed
fn decomp_tx: Add back comments and spacing/line-breaks from C.
Note that the inline comments on array lengths had to be moved to out-of-line doc comments as `rustfmt` deletes them (bug tracked in rust-lang/rustfmt#5297).
1 parent f3f627b commit 05bceed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lf_mask.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ pub struct Av1Restoration {
5757
pub lr: [[Av1RestorationUnit; 4]; 3],
5858
}
5959

60+
/// In `txa`, the array lengths represent from inner to outer:
61+
/// * `32`: `x`
62+
/// * `32`: `y`
63+
/// * `2`: `txsz`, `step`
64+
///
65+
/// (Note: This is added here in the docs vs. inline `/* */` comments
66+
/// at the array lengths because `rustfmt` deletes them
67+
/// (tracked in [rust-lang/rustfmt#5297](https://github.com/rust-lang/rustfmt/issues/5297))).
6068
unsafe fn decomp_tx(
6169
txa: *mut [[[u8; 32]; 32]; 2],
6270
from: RectTxfmSize,
@@ -76,6 +84,7 @@ unsafe fn decomp_tx(
7684
let sub = t_dim.sub as RectTxfmSize;
7785
let htw4 = t_dim.w >> 1;
7886
let hth4 = t_dim.h >> 1;
87+
7988
decomp_tx(txa, sub, depth + 1, y_off * 2 + 0, x_off * 2 + 0, tx_masks);
8089
if t_dim.w >= t_dim.h {
8190
decomp_tx(
@@ -138,7 +147,6 @@ unsafe fn decomp_tx(
138147
0,
139148
&mut set_ctx,
140149
);
141-
142150
let mut set_ctx = |_dir: &mut (), _diridx, off, mul, rep_macro: SetCtxFn| {
143151
rep_macro(
144152
(*txa.offset(1))[1][0].as_mut_ptr(),

0 commit comments

Comments
 (0)