Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-09-02 17:52:55 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-02 22:53:53 +0300
commit89ec11e096131bf0b74e04e3c19ec2007600fa94 (patch)
tree8e6b0cd2857722f049d8a62b1cd9d1a7f69d7c65 /libswscale/swscale.c
parentf580719b1a24a311ef9e38efce214fd77373dbc2 (diff)
swscale/swscale: Try to fix rgb48Toxyz12() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 63d16bd669..a192a1fb3f 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -978,8 +978,14 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
if (c->dstXYZ && !(c->srcXYZ && c->srcW==c->dstW && c->srcH==c->dstH)) {
+ int dstY = c->dstY ? c->dstY : srcSliceY + srcSliceH;
+ av_assert0(dstY >= ret);
+ av_assert0(ret >= 0);
+ av_assert0(c->dstH >= dstY);
+
+ uint16_t *dst16 = (uint16_t*)(dst2[0] + (dstY - ret) * dstStride2[0]);
/* replace on the same data */
- rgb48Toxyz12(c, (uint16_t*)dst2[0], (const uint16_t*)dst2[0], dstStride[0]/2, ret);
+ rgb48Toxyz12(c, dst16, dst16, dstStride2[0]/2, ret);
}
av_free(rgb0_tmp);