1 use nihav_core::codecs::*;
3 macro_rules! validate {
4 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } };
7 #[cfg(feature="decoder_intel263")]
9 #[cfg(feature="decoder_indeo2")]
11 #[cfg(feature="decoder_indeo3")]
13 #[cfg(feature="decoder_indeo4")]
15 #[cfg(feature="decoder_indeo5")]
18 #[cfg(any(feature="decoder_indeo4", feature="decoder_indeo5"))]
20 #[cfg(any(feature="decoder_indeo4", feature="decoder_indeo5"))]
22 #[cfg(any(feature="decoder_indeo4", feature="decoder_indeo5"))]
23 #[allow(clippy::erasing_op)]
26 #[cfg(feature="decoder_imc")]
27 #[allow(clippy::excessive_precision)]
28 #[allow(clippy::unreadable_literal)]
31 const INDEO_CODECS: &[DecoderInfo] = &[
32 #[cfg(feature="decoder_indeo2")]
33 DecoderInfo { name: "indeo2", get_decoder: indeo2::get_decoder },
34 #[cfg(feature="decoder_indeo3")]
35 DecoderInfo { name: "indeo3", get_decoder: indeo3::get_decoder },
36 #[cfg(feature="decoder_indeo4")]
37 DecoderInfo { name: "indeo4", get_decoder: indeo4::get_decoder },
38 #[cfg(feature="decoder_indeo5")]
39 DecoderInfo { name: "indeo5", get_decoder: indeo5::get_decoder },
40 #[cfg(feature="decoder_intel263")]
41 DecoderInfo { name: "intel263", get_decoder: intel263::get_decoder },
43 #[cfg(feature="decoder_imc")]
44 DecoderInfo { name: "imc", get_decoder: imc::get_decoder_imc },
45 #[cfg(feature="decoder_imc")]
46 DecoderInfo { name: "iac", get_decoder: imc::get_decoder_iac },
49 pub fn indeo_register_all_codecs(rd: &mut RegisteredDecoders) {
50 for decoder in INDEO_CODECS.iter() {
51 rd.add_decoder(decoder.clone());