Also rename to/from BGR555_FORMAT where appropriate.
use nihav_codec_support::codecs::imaadpcm::*;
use std::convert::TryFrom;
use std::str::FromStr;
-use super::RGB555_FORMAT;
use super::yuvtab::YUV2RGB;
-const BGR555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
trait ReadECode {
fn read_ecode(&mut self) -> DecoderResult<usize>;
}
impl NADecoder for Escape102Decoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, super::BGR555_FORMAT));
validate!((vinfo.get_width() | vinfo.get_height()) & 1 == 0);
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.frame = vec![0; vinfo.get_width() * vinfo.get_height()];
impl NADecoder for Escape124Decoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, BGR555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
validate!((vinfo.get_width() | vinfo.get_height()) & 7 == 0);
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.frame = vec![0; vinfo.get_width() * vinfo.get_height()];
use nihav_core::codecs::*;
use nihav_core::io::byteio::*;
-use super::RGB555_FORMAT;
use super::yuvtab::YUV2RGB;
#[derive(Default)]
impl NADecoder for LinePackDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, super::BGR555_FORMAT));
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.cur_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
self.prev_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
}
#[allow(dead_code)]
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
+const BGR555_FORMAT: NAPixelFormaton = NAPixelFormaton::make_rgb16_fmt(5, 5, 5, false, false);
#[allow(dead_code)]
mod yuvtab;
use nihav_core::codecs::*;
use nihav_core::io::bitreader::*;
-use super::RGB555_FORMAT;
use super::yuvtab::YUV2RGB;
fn get_mv(br: &mut BitReader, is_4x4: bool) -> DecoderResult<((i8, i8), bool)> {
impl NADecoder for MBDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, super::BGR555_FORMAT));
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.cur_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
self.prev_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
use nihav_core::io::bitreader::*;
use nihav_core::io::codebook::*;
-use super::RGB555_FORMAT;
use super::yuvtab::YUV2RGB;
struct DeltaCodebook {
impl NADecoder for MBDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, super::BGR555_FORMAT));
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.cur_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
self.prev_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
use nihav_core::codecs::*;
use nihav_core::io::byteio::*;
-use super::RGB555_FORMAT;
use super::yuvtab::YUV2RGB;
const END_CODE: u16 = 0x7300;
impl NADecoder for MLDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, super::BGR555_FORMAT));
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.cur_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
self.prev_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
use nihav_core::io::byteio::*;
use nihav_core::io::bitreader::*;
-use super::RGB555_FORMAT;
use super::yuvtab::YUV2RGB;
const YUV422_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::
}
let fmt = match self.codec_id {
- 2 => RGB555_FORMAT,
+ 2 => super::BGR555_FORMAT,
3 if self.is_yuv => {
validate!((self.width & 1) == 0);
YUV422_FORMAT
use nihav_core::io::bitreader::*;
use nihav_core::io::codebook::*;
-use super::RGB555_FORMAT;
-
struct DeltaCodebook {
cb: Codebook<u16>,
}
impl NADecoder for MBDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, RGB555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, super::BGR555_FORMAT));
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
self.cur_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
self.prev_frm = vec![0; vinfo.get_width() * vinfo.get_height()];
use nihav_core::codecs::*;
use nihav_core::io::byteio::*;
-const BGR555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
pub 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 }),
let depth = if vinfo.format.is_paletted() { 8 } else { vinfo.format.get_total_depth() } as usize;
vinfo.format = match depth {
8 => PAL8_FORMAT,
- 15 | 16 => BGR555_FORMAT,
+ 15 | 16 => RGB555_FORMAT,
24 => BGR24_FORMAT,
_ if vinfo.format.has_alpha() => BGR32_FORMAT,
_ => BGR24_FORMAT,
const INTRA_FLAG: u8 = 0x01;
const DELTA_PAL: u8 = 0x02;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
const RGB24_0_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: 4 }),
use nihav_core::compr::deflate::{Deflate, DeflateMode, DeflateWriter};
use nihav_core::io::byteio::*;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
const RGB24_0_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: 4 }),
use nihav_core::muxers::*;
use crate::*;
use nihav_codec_support::test::enc_video::*;
- use super::{RGB555_FORMAT, RGB24_0_FORMAT};
+ use super::RGB24_0_FORMAT;
// samples are from https://samples.mplayerhq.hu/V-codecs/ZMBV/
#[test]
});
}
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton {
- model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: true, alpha: false, palette: false };
+const QT_RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton::make_rgb16_fmt(5, 5, 5, true, true);
pub const ARGB_FORMAT: NAPixelFormaton = NAPixelFormaton {
model: ColorModel::RGB(RGBSubmodel::RGB), components: 4,
} else {
match depth {
1..=8 | 33..=40 => PAL8_FORMAT,
- 15 | 16 => RGB555_FORMAT,
+ 15 | 16 => QT_RGB555_FORMAT,
24 => RGB24_FORMAT,
32 => ARGB_FORMAT,
_ => {
use nihav_core::formats::*;
-pub const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
pub const BGR0_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: 4 }),
use crate::*;
use nihav_commonfmt::*;
use nihav_codec_support::test::enc_video::*;
- use super::super::truemotion1data::{RGB555_FORMAT, BGR0_FORMAT};
+ use super::super::truemotion1data::BGR0_FORMAT;
#[allow(unused_variables)]
fn encode_test(name: &'static str, enc_options: &[NAOption], hash: &[u32; 4], is16: bool) {
}
}
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 1, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 2, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
impl NADecoder for GremlinVideoDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
use nihav_core::codecs::*;
use nihav_core::io::byteio::*;
-const BGR555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 1, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 2, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
+const BGR555_FORMAT: NAPixelFormaton = NAPixelFormaton::make_rgb16_fmt(5, 5, 5, false, false);
struct HybridReader<'a> {
src: MemoryReader<'a>,
use nihav_core::codecs::*;
use nihav_core::io::byteio::*;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 1, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 2, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
const OPCODE_SKIP: usize = 91;
struct DPVideoDecoder {
}
}
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 1, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 2, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
impl NADecoder for VMDVideoDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
use nihav_core::frame::*;
use nihav_core::demuxers::*;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 1, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 2, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
struct SGADemuxer<'a> {
src: &'a mut dyn ByteIO,
subtype: u8,
fn is_dos(self) -> bool { self == MPVersion::MotionPixelsDOS }
}
-const BGR555_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
#[derive(Clone,Copy,Debug,Default)]
struct MPFlags(u16);
}
self.dec.init(w, h, mode, self.version.is_dos());
let flipped = !self.version.is_dos() && self.flags.is_flipped();
- let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(w, h, flipped, BGR555_FORMAT));
+ let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(w, h, flipped, RGB555_FORMAT));
self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
Ok(())
} else {
use nihav_core::io::byteio::*;
use nihav_codec_support::codecs::HAMShuffler;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton {
- model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
#[derive(Default)]
struct Video1Decoder {
info: NACodecInfoRef,
}
}
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton {
- model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
impl NAEncoder for MSVideo1Encoder {
fn negotiate_format(&self, encinfo: &EncodeParameters) -> EncoderResult<EncodeParameters> {
match encinfo.format {
use crate::*;
use nihav_commonfmt::*;
use nihav_codec_support::test::enc_video::*;
- use super::RGB555_FORMAT;
#[test]
fn test_ms_video1_encoder_pal() {
use nihav_core::io::byteio::*;
use nihav_codec_support::codecs::HAMShuffler;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton {
- model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
pub const ARGB_FORMAT: NAPixelFormaton = NAPixelFormaton {
model: ColorModel::RGB(RGBSubmodel::RGB), components: 4,
comp_info: [
use nihav_core::io::byteio::*;
use nihav_codec_support::codecs::HAMShuffler;
-const RGB555_FORMAT: NAPixelFormaton = NAPixelFormaton {
- model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
- comp_info: [
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 10, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 5, comp_offs: 0, next_elem: 2 }),
- Some(NAPixelChromaton{ h_ss: 0, v_ss: 0, packed: true, depth: 5, shift: 0, comp_offs: 0, next_elem: 2 }),
- None, None],
- elem_size: 2, be: false, alpha: false, palette: false };
-
#[derive(Default)]
struct RpzaDecoder {
info: NACodecInfoRef,