diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-11-13 03:08:25 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-11-13 03:08:25 +0100 |
commit | 7ea77a61979612488d6058a35b1af16fde9c4ffb (patch) | |
tree | 895888621995b4b87736ab25204404414f020cfb /libavcodec/pictordec.c | |
parent | 0d49dd37253e850d433874cd134701a624082ebc (diff) | |
download | ffmpeg-7ea77a61979612488d6058a35b1af16fde9c4ffb.tar.gz |
Set some Pictor/PC Paint palettes opaque.
Diffstat (limited to 'libavcodec/pictordec.c')
-rw-r--r-- | libavcodec/pictordec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c index 2bbb63633d..ae6e488161 100644 --- a/libavcodec/pictordec.c +++ b/libavcodec/pictordec.c @@ -175,13 +175,15 @@ static int decode_frame(AVCodecContext *avctx, palette[i] = ff_ega_palette[ FFMIN(buf[i], 63)]; } else if (etype == 4 || etype == 5) { npal = FFMIN(esize / 3, 256); - for (i = 0; i < npal; i++) + for (i = 0; i < npal; i++) { palette[i] = AV_RB24(buf + i*3) << 2; + palette[i] |= 0xFF << 24; + } } else { if (bpp == 1) { npal = 2; - palette[0] = 0x000000; - palette[1] = 0xFFFFFF; + palette[0] = 0xFF000000; + palette[1] = 0xFFFFFFFF; } else if (bpp == 2) { npal = 4; for (i = 0; i < npal; i++) |