ref: ecf72597ef8d5fdae4a069f18704e6d079b792a2
parent: 9202089979a8dc0d5890288201f2e6e38b0aed49
author: Ronald S. Bultje <rsbultje@gmail.com>
date: Sun Nov 18 11:58:52 EST 2018
Clip resize height to image size Fixes #183.
--- a/src/recon_tmpl.c
+++ b/src/recon_tmpl.c
@@ -1616,9 +1616,10 @@
const int ss_hor = pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
const int dst_w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
const int src_w = (4 * f->bw + ss_hor) >> ss_hor;
+ const int img_h = (f->cur.p.h - sbsz * 4 * sby + ss_ver) >> ss_ver;
f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w, src_w,
- h_end + h_start, f->resize_step[!!pl],
+ imin(img_h, h_end) + h_start, f->resize_step[!!pl],
f->resize_start[!!pl]);
}
}