swscale/swscale: Fix several invalid shifts related to vChrDrop

Fixes: Invalid shifts
Fixes: #8166
Fixes: filter-crop_scale_vflip FATE-test

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/343/head
Michael Niedermayer 5 years ago
parent a00fa73f47
commit a6ca22c118
  1. 4
      libswscale/swscale.c

@ -295,8 +295,8 @@ static int swscale(SwsContext *c, const uint8_t *src[],
srcStride[2] =
srcStride[3] = srcStride[0];
}
srcStride[1] <<= c->vChrDrop;
srcStride[2] <<= c->vChrDrop;
srcStride[1] *= 1 << c->vChrDrop;
srcStride[2] *= 1 << c->vChrDrop;
DEBUG_BUFFERS("swscale() %p[%d] %p[%d] %p[%d] %p[%d] -> %p[%d] %p[%d] %p[%d] %p[%d]\n",
src[0], srcStride[0], src[1], srcStride[1],

Loading…
Cancel
Save