mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
swscale/swscale: Try to fix rgb48Toxyz12() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f580719b1a
commit
89ec11e096
@ -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)) {
|
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 */
|
/* 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);
|
av_free(rgb0_tmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user