Skip to content

Commit b3ab3da

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 a13b294 commit b3ab3da

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lf_mask.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ pub struct Av1Restoration {
5858
pub lr: [[Av1RestorationUnit; 4]; 3],
5959
}
6060

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

0 commit comments

Comments
 (0)