diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2020-04-02 02:34:16 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2020-04-02 03:44:27 +0300 |
commit | 41cd4199f149760a4d16326342d646b2eb66e8b0 (patch) | |
tree | 90519a0e838a81c5f80429d3e569b32b6392f497 /src/lr_apply_tmpl.c | |
parent | 4687c4696f780207bbb7f8d14038302f0e9c63bd (diff) |
Skip loop restoration cache buffer resize for too-small buffers
Fixes crashes in dav1d_resize_{avx2,ssse3} on very small resolutions
with super_res enabled but skipped because the width is too small.
Diffstat (limited to 'src/lr_apply_tmpl.c')
-rw-r--r-- | src/lr_apply_tmpl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lr_apply_tmpl.c b/src/lr_apply_tmpl.c index 7550406..02413b9 100644 --- a/src/lr_apply_tmpl.c +++ b/src/lr_apply_tmpl.c @@ -73,7 +73,7 @@ static void backup_lpf(const Dav1dFrameContext *const f, dst += 4 * PXSTRIDE(dst_stride); src += (stripe_h - 2) * PXSTRIDE(src_stride); - if (f->frame_hdr->super_res.enabled) { + if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) { while (row + stripe_h <= row_h) { const int n_lines = 4 - (row + stripe_h + 1 == h); f->dsp->mc.resize(dst, dst_stride, src, src_stride, |