Commit 4fdb3ea9 authored by Luc Trudeau's avatar Luc Trudeau

Fix left shift of negative value -1

Fix #40
parent bb8725fb
......@@ -159,7 +159,7 @@ void dav1d_thread_picture_wait(const Dav1dThreadPicture *const p,
// convert to luma units; include plane delay from loopfilters; clip
const int ss_ver = p->p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
y_unclipped <<= plane_type & ss_ver; // we rely here on PLANE_TYPE_UV being 1
y_unclipped *= 1 << (plane_type & ss_ver); // we rely here on PLANE_TYPE_UV being 1
y_unclipped += (plane_type != PLANE_TYPE_BLOCK) * 8; // delay imposed by loopfilter
const int y = iclip(y_unclipped, 0, p->p.p.h - 1);
atomic_uint *const progress = &p->progress[plane_type != PLANE_TYPE_BLOCK];
......
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