Skip to content
Snippets Groups Projects
Commit 35fa8e5f authored by Monty Montgomery's avatar Monty Montgomery
Browse files

run vertical and horizontal deblocking (almost) concurrently

Improve cache behavior by running vertical and horizontal deblocking in one pass.  Horizontal lags one SB behind vertical.
parent b6d766bf
No related branches found
No related tags found
No related merge requests found
...@@ -462,20 +462,22 @@ pub fn deblock_plane(fi: &FrameInvariants, deblock: &DeblockState, plane: &mut P ...@@ -462,20 +462,22 @@ pub fn deblock_plane(fi: &FrameInvariants, deblock: &DeblockState, plane: &mut P
} }
// filter vertical and horizontal edges by super block. // filter vertical and horizontal edges by super block.
// TODO: once it's working, do it in one pass
for row in 0..fb_height { for row in 0..fb_height {
for col in 0..fb_width { for col in 0..fb_width {
let sbo = SuperBlockOffset { x: col, y: row };
// filter vertical edges // filter vertical edges
deblock_vertical(fi, deblock, plane, pli, bc, &sbo, bit_depth); {
} let sbo = SuperBlockOffset { x: col, y: row };
} deblock_vertical(fi, deblock, plane, pli, bc, &sbo, bit_depth);
for row in 0..fb_height { }
for col in 0..fb_width { // filter horizontal edges. Filters are ordered, so it's always 1 SB behind.
let sbo = SuperBlockOffset { x: col, y: row }; if col > 0 {
// filter horizontal edges let sbo = SuperBlockOffset { x: col-1, y: row };
deblock_horizontal(fi, deblock, plane, pli, bc, &sbo, bit_depth); deblock_horizontal(fi, deblock, plane, pli, bc, &sbo, bit_depth);
}
} }
// filter last horizontal stragglers.
let sbo = SuperBlockOffset { x: fb_width-1, y: row };
deblock_horizontal(fi, deblock, plane, pli, bc, &sbo, bit_depth);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment