[FFmpeg-cvslog] avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent

Michael Niedermayer git at videolan.org
Mon May 3 22:35:31 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun May  2 15:49:55 2021 +0200| [011006874cb46325b6bc83234f81879ff421c05f] | committer: Michael Niedermayer

avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent

Fixes: tickets/3933/128.jls

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=011006874cb46325b6bc83234f81879ff421c05f
---

 libavcodec/jpeglsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index bd9224d97d..c61cb14f49 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -124,7 +124,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
 
             for (i=s->palette_index; i<=maxtab; i++) {
                 uint8_t k = i << shift;
-                pal[k] = 0;
+                pal[k] = wt < 4 ? 0xFF000000 : 0;
                 for (j=0; j<wt; j++) {
                     pal[k] |= get_bits(&s->gb, 8) << (8*(wt-j-1));
                 }



More information about the ffmpeg-cvslog mailing list