From: Kostya Shishkov Date: Sat, 11 Jul 2020 17:06:29 +0000 (+0200) Subject: core/formats: fix grayscale format returned by NAPixelFormaton::from_str() X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=c031f98d54759403d8606dcc964f3a6ab9a33139;p=nihav.git core/formats: fix grayscale format returned by NAPixelFormaton::from_str() --- diff --git a/nihav-core/src/formats.rs b/nihav-core/src/formats.rs index bb47838..586fa6f 100644 --- a/nihav-core/src/formats.rs +++ b/nihav-core/src/formats.rs @@ -961,18 +961,18 @@ fn parse_yuv_format(s: &str) -> Result { return Ok(NAPixelFormaton { model: ColorModel::YUV(YUVSubmodel::YUVJ), components: 1, comp_info: [ - Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 8, shift: 0, comp_offs: 0, next_elem: 1 }), + Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: false, depth: 8, shift: 0, comp_offs: 0, next_elem: 1 }), None, None, None, None], - elem_size: 1, be: false, alpha: false, palette: false }); + elem_size: 1, be: true, alpha: false, palette: false }); }, "y8a" | "y400a" | "graya" => { return Ok(NAPixelFormaton { model: ColorModel::YUV(YUVSubmodel::YUVJ), components: 2, comp_info: [ - Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 8, shift: 0, comp_offs: 0, next_elem: 2 }), - Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 8, shift: 0, comp_offs: 1, next_elem: 2 }), + Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: false, depth: 8, shift: 0, comp_offs: 0, next_elem: 2 }), + Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: false, depth: 8, shift: 0, comp_offs: 1, next_elem: 2 }), None, None, None], - elem_size: 1, be: false, alpha: true, palette: false }); + elem_size: 1, be: true, alpha: true, palette: false }); }, "uyvy" | "y422" => { return Ok(NAPixelFormaton {