X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-flash%2Fsrc%2Fcodecs%2Fflashsv.rs;fp=nihav-flash%2Fsrc%2Fcodecs%2Fflashsv.rs;h=9e577d1499c5b1cfe8edb8af58fbb42ac57f10d8;hp=0cc98ba254b1c43ab1105d3cfc4d99561c669e00;hb=d1de08f431ebff4c20f7cb7567e85258a364c7a2;hpb=964dffda42954044e7628b212bd389ff554c1027 diff --git a/nihav-flash/src/codecs/flashsv.rs b/nihav-flash/src/codecs/flashsv.rs index 0cc98ba..9e577d1 100644 --- a/nihav-flash/src/codecs/flashsv.rs +++ b/nihav-flash/src/codecs/flashsv.rs @@ -229,7 +229,7 @@ impl NADecoder for FSVDecoder { if let NACodecTypeInfo::Video(vinfo) = info.get_properties() { let w = vinfo.get_width(); let h = vinfo.get_height(); - let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(w, h, true, RGB24_FORMAT)); + let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(w, h, true, BGR24_FORMAT)); self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref(); Ok(()) @@ -417,3 +417,16 @@ const DEFAULT_PAL: [u8; 128 * 3] = [ 0x11, 0x11, 0x11, 0x22, 0x22, 0x22, 0x44, 0x44, 0x44, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0xBB, 0xDD, 0xDD, 0xDD, 0xEE, 0xEE, 0xEE ]; + +const BGR24_FORMAT: NAPixelFormaton = NAPixelFormaton { + model: ColorModel::RGB(RGBSubmodel::RGB), components: 3, + comp_info: [ + Some(NAPixelChromaton{ + h_ss: 0, v_ss: 0, packed: true, depth: 8, shift: 0, comp_offs: 2, next_elem: 3 }), + Some(NAPixelChromaton{ + h_ss: 0, v_ss: 0, packed: true, depth: 8, shift: 0, comp_offs: 1, next_elem: 3 }), + Some(NAPixelChromaton{ + h_ss: 0, v_ss: 0, packed: true, depth: 8, shift: 0, comp_offs: 0, next_elem: 3 }), + None, None], + elem_size: 3, be: false, alpha: false, palette: false +};