Commit c627f16f authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Janne Grunau

Don't set LR coefficient defaults at image edges

These edges don't encode LR coefficients anyway. Fixes
clusterfuzz-testcase-minimized-dav1d_fuzzer-5731769337249792.
Credits to oss-fuzz.
parent 86fd0b6d
...@@ -2250,7 +2250,9 @@ static void setup_tile(Dav1dTileState *const ts, ...@@ -2250,7 +2250,9 @@ static void setup_tile(Dav1dTileState *const ts,
const int x = ((4 * ts->tiling.col_start * d >> ss_hor) + rnd) >> shift; const int x = ((4 * ts->tiling.col_start * d >> ss_hor) + rnd) >> shift;
const int px_x = x << (unit_size_log2 + ss_hor); const int px_x = x << (unit_size_log2 + ss_hor);
const int u_idx = unit_idx + ((px_x & 64) >> 6); const int u_idx = unit_idx + ((px_x & 64) >> 6);
ts->lr_ref[p] = &f->lf.lr_mask[sb_idx + (px_x >> 7)].lr[p][u_idx]; const int sb128x = px_x >> 7;
if (sb128x >= f->sr_sb128w) continue;
ts->lr_ref[p] = &f->lf.lr_mask[sb_idx + sb128x].lr[p][u_idx];
} else { } else {
ts->lr_ref[p] = &f->lf.lr_mask[sb_idx].lr[p][unit_idx]; ts->lr_ref[p] = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
} }
......
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