[FFmpeg-cvslog] Make the palette in Quake II CIN files opaque and increase its dynamics.

Carl Eugen Hoyos git at videolan.org
Sat Dec 24 12:55:14 CET 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Dec 24 12:44:30 2011 +0100| [32c49389bcf6c73b9708cf593dd6b0074164709f] | committer: Carl Eugen Hoyos

Make the palette in Quake II CIN files opaque and increase its dynamics.

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

 libavformat/idcin.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 0cca69f..878378f 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;
             }
         }
 



More information about the ffmpeg-cvslog mailing list