Fixes: alphablend=checkerboard
Signed-off-by: Michael Niedermayer <[email protected]>
---
libswscale/swscale.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index c7069ae7b2f..18a74abd6b7 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1020,7 +1020,7 @@ static int scale_internal(SwsContext *c,
int offset = srcSliceY_internal;
int slice_h = srcSliceH;
- // for dst slice scaling, offset the src pointers to match the dst
slice
+ // for dst slice scaling, offset the pointers to match the unscaled API
if (scale_dst) {
av_assert0(offset == 0);
for (i = 0; i < 4 && src2[i]; i++) {
@@ -1028,7 +1028,13 @@ static int scale_internal(SwsContext *c,
break;
src2[i] += (dstSliceY >> ((i == 1 || i == 2) ?
c->chrSrcVSubSample : 0)) * srcStride2[i];
}
- offset = 0;
+
+ for (i = 0; i < 4 && dst2[i]; i++) {
+ if (!dst2[i] || (i > 0 && usePal(c->dstFormat)))
+ break;
+ dst2[i] -= (dstSliceY >> ((i == 1 || i == 2) ?
c->chrDstVSubSample : 0)) * dstStride2[i];
+ }
+ offset = dstSliceY;
slice_h = dstSliceH;
}
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".