Commit e7745025 authored by David Barker's avatar David Barker Committed by Debargha Mukherjee
Browse files

striped-loop-restoration: Fix line buffer width

The last restoration unit in a tile is allowed to be up to 1.5x
the nominal restoration unit size. This was not properly accounted
for in the definition of RESTORATION_LINEBUFFER_WIDTH, leading to
memory corruption whenever we hit a particularly wide restoration
unit.

Change-Id: I6e858278bf1e3304eedb5f974f1db6961245e7bf
parent 3422ac17
......@@ -216,7 +216,7 @@ typedef struct {
// A restoration line buffer needs space for two lines plus a horizontal filter
// margin of RESTORATION_EXTRA_HORZ on each side.
#define RESTORATION_LINEBUFFER_WIDTH \
(RESTORATION_TILESIZE_MAX + 2 * RESTORATION_EXTRA_HORZ)
(RESTORATION_TILESIZE_MAX * 3 / 2 + 2 * RESTORATION_EXTRA_HORZ)
typedef struct {
// Temporary buffers to save/restore 2 lines above/below the restoration
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment