From cbc3c7a23f8d41c9cb395252a6b795817b5aec96 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 7 Mar 2019 15:30:56 +0100 Subject: [PATCH] gdv: fix palette order --- nihav-game/src/codecs/gremlinvideo.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nihav-game/src/codecs/gremlinvideo.rs b/nihav-game/src/codecs/gremlinvideo.rs index c7bdaf9..8c6e58f 100644 --- a/nihav-game/src/codecs/gremlinvideo.rs +++ b/nihav-game/src/codecs/gremlinvideo.rs @@ -376,7 +376,7 @@ impl NADecoder for GremlinVideoDecoder { let w = vinfo.get_width(); let h = vinfo.get_height(); if !vinfo.get_format().is_paletted() { return Err(DecoderError::NotImplemented); } - let fmt = formats::PAL8_FORMAT; + let fmt = PAL8_FORMAT; let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(w, h, false, fmt)); self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref(); @@ -393,7 +393,7 @@ impl NADecoder for GremlinVideoDecoder { for c in 0..256 { for i in 0..3 { let cc = edata[c * 3 + i]; - self.pal[c * 3 + (2 - i)] = (cc << 2) | (cc >> 4); + self.pal[c * 3 + i] = (cc << 2) | (cc >> 4); } } Ok(()) @@ -420,7 +420,7 @@ impl NADecoder for GremlinVideoDecoder { for c in 0..256 { for i in 0..3 { let b = br.read_byte()?; - self.pal[c * 3 + (2 - i)] = (b << 2) | (b >> 4); + self.pal[c * 3 + i] = (b << 2) | (b >> 4); } } if cmethod == 1 { -- 2.30.2