aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-21 22:52:19 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-05-19 17:17:35 +0200
commit8a9c9711cf0d0bd7b0335ce2a5160c3d3eb9b5a4 (patch)
tree5a9d6914ba3942e65ca85510684537bbc8383870
parent0e517ef4598b89691d8f3afed5d4441d4c17fa57 (diff)
downloadffmpeg-8a9c9711cf0d0bd7b0335ce2a5160c3d3eb9b5a4.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> (cherry picked from commit a6ca22c11834c0ff075592e3f051d41068c407db) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libswscale/swscale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 40695503ad..36f7aa9a03 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -300,8 +300,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],