summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-12 17:26:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-12 17:26:39 +0200
commit91f4a44ff4fa55e0a48f71c432a1dc3158d662b9 (patch)
tree94adee8f031ede68d73b3a6a909636cbdd39472e /libswscale
parent63725d158d34f8c57c9baa4ec6138d8c70d77581 (diff)
sws/packed_16bpc_bswap: fix handling of negative stride
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale_unscaled.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 8889183893..e0a585137b 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -324,11 +324,11 @@ static int packed_16bpc_bswap(SwsContext *c, const uint8_t *src[],
int i, j, p;
for (p = 0; p < 4; p++) {
- int srcstr = srcStride[p] >> 1;
- int dststr = dstStride[p] >> 1;
+ int srcstr = srcStride[p] / 2;
+ int dststr = dstStride[p] / 2;
uint16_t *dstPtr = (uint16_t *) dst[p];
const uint16_t *srcPtr = (const uint16_t *) src[p];
- int min_stride = FFMIN(srcstr, dststr);
+ int min_stride = FFMIN(FFABS(srcstr), FFABS(dststr));
if(!dstPtr || !srcPtr)
continue;
for (i = 0; i < (srcSliceH >> c->chrDstVSubSample); i++) {