h264: add SIMD optimisations for x86_64 (not enabled by default)
[nihav.git] / nihav-itu / src / codecs / mod.rs
CommitLineData
696e4e20
KS
1use nihav_core::codecs::*;
2
3macro_rules! validate {
4 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } };
5}
6
42005e25 7#[allow(clippy::collapsible_else_if)]
4a1ca15c 8#[allow(clippy::too_many_arguments)]
42005e25 9#[allow(clippy::upper_case_acronyms)]
696e4e20
KS
10#[cfg(feature="decoder_h264")]
11mod h264;
12
13const ITU_CODECS: &[DecoderInfo] = &[
14#[cfg(feature="decoder_h264")]
15 DecoderInfo { name: "h264", get_decoder: h264::get_decoder },
16];
17
18/// Registers all available codecs provided by this crate.
19pub fn itu_register_all_decoders(rd: &mut RegisteredDecoders) {
20 for decoder in ITU_CODECS.iter() {
b7c882c1 21 rd.add_decoder(*decoder);
696e4e20
KS
22 }
23}