mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
sws: move updating the palette higher up
It does not interact in any way with the code setting up the image pointers/strides, so it should not be intermixed with it.
This commit is contained in:
parent
d6649d9a3b
commit
37c0fe49b7
@ -911,6 +911,9 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
|
|||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
memset(c->dither_error[i], 0, sizeof(c->dither_error[0][0]) * (c->dstW+2));
|
memset(c->dither_error[i], 0, sizeof(c->dither_error[0][0]) * (c->dstW+2));
|
||||||
|
|
||||||
|
if (usePal(c->srcFormat))
|
||||||
|
update_palette(c, (const uint32_t *)srcSlice[1]);
|
||||||
|
|
||||||
memcpy(src2, srcSlice, sizeof(src2));
|
memcpy(src2, srcSlice, sizeof(src2));
|
||||||
memcpy(dst2, dst, sizeof(dst2));
|
memcpy(dst2, dst, sizeof(dst2));
|
||||||
memcpy(srcStride2, srcStride, sizeof(srcStride2));
|
memcpy(srcStride2, srcStride, sizeof(srcStride2));
|
||||||
@ -925,9 +928,6 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
|
|||||||
c->sliceDir = (srcSliceY == 0) ? 1 : -1;
|
c->sliceDir = (srcSliceY == 0) ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usePal(c->srcFormat))
|
|
||||||
update_palette(c, (const uint32_t *)srcSlice[1]);
|
|
||||||
|
|
||||||
if (c->src0Alpha && !c->dst0Alpha && isALPHA(c->dstFormat)) {
|
if (c->src0Alpha && !c->dst0Alpha && isALPHA(c->dstFormat)) {
|
||||||
uint8_t *base;
|
uint8_t *base;
|
||||||
int x,y;
|
int x,y;
|
||||||
|
Loading…
Reference in New Issue
Block a user