Message ID | 20210531075515.19544-19-anton@khirnov.net |
---|---|
State | Accepted |
Commit | 37c0fe49b70ce5f18b67dc7b7578900a684bd0b0 |
Headers | show |
Series | [FFmpeg-devel,01/24] sws: remove unnecessary braces | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Mon, May 31, 2021 at 09:55:10AM +0200, Anton Khirnov wrote: > It does not interact in any way with the code setting up the image > pointers/strides, so it should not be intermixed with it. > --- > libswscale/swscale.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) ok thx [...]
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index b9b2826911..3b03fd16dd 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -911,6 +911,9 @@ int attribute_align_arg sws_scale(struct SwsContext *c, for (i = 0; i < 4; i++) 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(dst2, dst, sizeof(dst2)); memcpy(srcStride2, srcStride, sizeof(srcStride2)); @@ -925,9 +928,6 @@ int attribute_align_arg sws_scale(struct SwsContext *c, 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)) { uint8_t *base; int x,y;