diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-21 22:52:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-22 18:41:46 +0100 |
commit | a6ca22c11834c0ff075592e3f051d41068c407db (patch) | |
tree | 503871d6d0cea6639fda6fd3c38f194e64697f53 /libswscale | |
parent | a00fa73f47c7b201d2b82475f88f94a754b5b87c (diff) | |
download | ffmpeg-a6ca22c11834c0ff075592e3f051d41068c407db.tar.gz |
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>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 4ecfa88ff7..8436f056d4 100644 --- a/libswscale/swscale.c +++ b/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], |