mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
Only expand raw and packed 1bpp tiff horizontally if it is palettised.
This commit is contained in:
parent
9d9316ae34
commit
714d2f9796
@ -224,7 +224,8 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin
|
|||||||
if (ssrc + size - src < width)
|
if (ssrc + size - src < width)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
if (!s->fill_order) {
|
if (!s->fill_order) {
|
||||||
horizontal_fill(s->bpp, dst, 1, src, 0, width, 0);
|
horizontal_fill(s->bpp * (s->avctx->pix_fmt == PIX_FMT_PAL8),
|
||||||
|
dst, 1, src, 0, width, 0);
|
||||||
} else {
|
} else {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < width; i++)
|
for (i = 0; i < width; i++)
|
||||||
@ -241,7 +242,8 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin
|
|||||||
av_log(s->avctx, AV_LOG_ERROR, "Copy went out of bounds\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Copy went out of bounds\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
horizontal_fill(s->bpp, dst, 1, src, 0, code, pixels);
|
horizontal_fill(s->bpp * (s->avctx->pix_fmt == PIX_FMT_PAL8),
|
||||||
|
dst, 1, src, 0, code, pixels);
|
||||||
src += code;
|
src += code;
|
||||||
pixels += code;
|
pixels += code;
|
||||||
}else if(code != -128){ // -127..-1
|
}else if(code != -128){ // -127..-1
|
||||||
@ -251,7 +253,8 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
c = *src++;
|
c = *src++;
|
||||||
horizontal_fill(s->bpp, dst, 0, NULL, c, code, pixels);
|
horizontal_fill(s->bpp * (s->avctx->pix_fmt == PIX_FMT_PAL8),
|
||||||
|
dst, 0, NULL, c, code, pixels);
|
||||||
pixels += code;
|
pixels += code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user