diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-03-07 15:30:56 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-04-29 14:58:16 +0200 |
commit | cbc3c7a23f8d41c9cb395252a6b795817b5aec96 (patch) | |
tree | 50a361355bab698203f05a6795942f5af6169fdc | |
parent | 51bcc8ea224efabe86e8676a6fc4b23f5e2079e5 (diff) | |
download | nihav-cbc3c7a23f8d41c9cb395252a6b795817b5aec96.tar.gz |
gdv: fix palette order
-rw-r--r-- | nihav-game/src/codecs/gremlinvideo.rs | 6 |
1 files 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 { |