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>
(cherry picked from commit a6ca22c118)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-01-21 22:52:19 +01:00
parent 0e517ef459
commit 8a9c9711cf
1 changed files with 2 additions and 2 deletions

View File

@ -300,8 +300,8 @@ static int swscale(SwsContext *c, const uint8_t *src[],
srcStride[2] = srcStride[2] =
srcStride[3] = srcStride[0]; srcStride[3] = srcStride[0];
} }
srcStride[1] <<= c->vChrDrop; srcStride[1] *= 1 << c->vChrDrop;
srcStride[2] <<= 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", 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], src[0], srcStride[0], src[1], srcStride[1],