mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent
Fixes: tickets/3933/128.jls
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 011006874c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c1d8652b5b
commit
93506a7bf7
|
@ -122,7 +122,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
|
||||||
s->avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
s->avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||||
for (i=s->palette_index; i<=maxtab; i++) {
|
for (i=s->palette_index; i<=maxtab; i++) {
|
||||||
uint8_t k = i << shift;
|
uint8_t k = i << shift;
|
||||||
pal[k] = 0;
|
pal[k] = wt < 4 ? 0xFF000000 : 0;
|
||||||
for (j=0; j<wt; j++) {
|
for (j=0; j<wt; j++) {
|
||||||
pal[k] |= get_bits(&s->gb, 8) << (8*(wt-j-1));
|
pal[k] |= get_bits(&s->gb, 8) << (8*(wt-j-1));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue