]> git.sesse.net Git - ffmpeg/commitdiff
swscale: fix for sliced scaling artifacts
authorPedro Arthur <bygrandao@gmail.com>
Thu, 8 Sep 2016 18:57:40 +0000 (15:57 -0300)
committerPedro Arthur <bygrandao@gmail.com>
Fri, 16 Sep 2016 14:25:28 +0000 (11:25 -0300)
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
libswscale/swscale.c

index 08745561f7a2f474e76b0e38150efdea7b74e503..c3a8d0efd42894ef93d537c77f0c22593e8f7055 100644 (file)
@@ -440,7 +440,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
             firstPosY = FFMAX(firstLumSrcY, posY);
             lastPosY = FFMIN(firstLumSrcY + hout_slice->plane[0].available_lines - 1, srcSliceY + srcSliceH - 1);
         } else {
-            firstPosY = lastInLumBuf + 1;
+            firstPosY = posY;
             lastPosY = lastLumSrcY;
         }
 
@@ -449,7 +449,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
             firstCPosY = FFMAX(firstChrSrcY, cPosY);
             lastCPosY = FFMIN(firstChrSrcY + hout_slice->plane[1].available_lines - 1, AV_CEIL_RSHIFT(srcSliceY + srcSliceH, c->chrSrcVSubSample) - 1);
         } else {
-            firstCPosY = lastInChrBuf + 1;
+            firstCPosY = cPosY;
             lastCPosY = lastChrSrcY;
         }