Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-24 15:44:30 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-24 15:44:30 +0400
commit32c49389bcf6c73b9708cf593dd6b0074164709f (patch)
treebbd4352bb8bb04cba20cdd3d9bb877179ff6f5bb /libavformat/idcin.c
parentf2ed1158998019c38ef5a598b5a5c50aea60e072 (diff)
Make the palette in Quake II CIN files opaque and increase its dynamics.
Diffstat (limited to 'libavformat/idcin.c')
-rw-r--r--libavformat/idcin.c4
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;
}
}