diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-12-24 12:44:30 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-12-24 12:44:30 +0100 |
commit | 32c49389bcf6c73b9708cf593dd6b0074164709f (patch) | |
tree | bbd4352bb8bb04cba20cdd3d9bb877179ff6f5bb /libavformat/idcin.c | |
parent | f2ed1158998019c38ef5a598b5a5c50aea60e072 (diff) | |
download | ffmpeg-32c49389bcf6c73b9708cf593dd6b0074164709f.tar.gz |
Make the palette in Quake II CIN files opaque and increase its dynamics.
Diffstat (limited to 'libavformat/idcin.c')
-rw-r--r-- | libavformat/idcin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/idcin.c b/libavformat/idcin.c index 0cca69f088..878378febd 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -248,7 +248,9 @@ static int idcin_read_packet(AVFormatContext *s, r = palette_buffer[i * 3 ] << palette_scale; g = palette_buffer[i * 3 + 1] << palette_scale; b = palette_buffer[i * 3 + 2] << palette_scale; - palette[i] = (r << 16) | (g << 8) | (b); + palette[i] = (0xFFU << 24) | (r << 16) | (g << 8) | (b); + if (palette_scale == 2) + palette[i] |= palette[i] >> 6 & 0x30303; } } |