diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2018-11-19 00:58:52 +0300 |
---|---|---|
committer | Janne Grunau <janne-vlc@jannau.net> | 2018-11-19 01:11:16 +0300 |
commit | ecf72597ef8d5fdae4a069f18704e6d079b792a2 (patch) | |
tree | 9ea3411ecd72d8fb2f40d0780dcaa4c0b8efd8f4 | |
parent | 9202089979a8dc0d5890288201f2e6e38b0aed49 (diff) |
Clip resize height to image size
Fixes #183.
-rw-r--r-- | src/recon_tmpl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/recon_tmpl.c b/src/recon_tmpl.c index 72927b9..2a2d080 100644 --- a/src/recon_tmpl.c +++ b/src/recon_tmpl.c @@ -1616,9 +1616,10 @@ void bytefn(dav1d_filter_sbrow)(Dav1dFrameContext *const f, const int sby) { 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]); } } |