swscale/swscale_unscaled: Fix packed_16bpc_bswap() with slices
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 2 Sep 2016 18:25:24 +0000 (20:25 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 2 Sep 2016 19:53:53 +0000 (21:53 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libswscale/swscale_unscaled.c

index b231abe..8df0694 100644 (file)
@@ -352,6 +352,7 @@ static int packed_16bpc_bswap(SwsContext *c, const uint8_t *src[],
         int min_stride         = FFMIN(FFABS(srcstr), FFABS(dststr));
         if(!dstPtr || !srcPtr)
             continue;
+        dstPtr += (srcSliceY >> c->chrDstVSubSample) * dststr;
         for (i = 0; i < (srcSliceH >> c->chrDstVSubSample); i++) {
             for (j = 0; j < min_stride; j++) {
                 dstPtr[j] = av_bswap16(srcPtr[j]);