]> git.nihav.org Git - nihav.git/blob - nihav-realmedia/src/codecs/mod.rs
vp5: fix chroma MV
[nihav.git] / nihav-realmedia / src / codecs / mod.rs
1 use nihav_core::codecs::*;
2
3 macro_rules! validate {
4 ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } };
5 }
6
7 #[cfg(any(feature="decoder_realvideo3", feature="decoder_realvideo4"))]
8 mod rv3040;
9 #[cfg(any(feature="decoder_realvideo3", feature="decoder_realvideo4"))]
10 #[allow(clippy::erasing_op)]
11 mod rv34codes;
12 #[cfg(any(feature="decoder_realvideo3", feature="decoder_realvideo4"))]
13 #[allow(clippy::erasing_op)]
14 #[allow(clippy::many_single_char_names)]
15 mod rv34dsp;
16
17 #[cfg(feature="decoder_realvideo1")]
18 pub mod rv10;
19 #[cfg(feature="decoder_realvideo2")]
20 pub mod rv20;
21 #[cfg(feature="decoder_realvideo3")]
22 pub mod rv30;
23 #[cfg(feature="decoder_realvideo3")]
24 #[allow(clippy::erasing_op)]
25 #[allow(clippy::many_single_char_names)]
26 #[allow(clippy::neg_multiply)]
27 pub mod rv30dsp;
28 #[cfg(feature="decoder_realvideo4")]
29 pub mod rv40;
30 #[cfg(feature="decoder_realvideo4")]
31 #[allow(clippy::erasing_op)]
32 #[allow(clippy::many_single_char_names)]
33 pub mod rv40dsp;
34 #[cfg(feature="decoder_realvideo6")]
35 pub mod rv60;
36 #[cfg(feature="decoder_realvideo6")]
37 pub mod rv60codes;
38 #[cfg(feature="decoder_realvideo6")]
39 #[allow(clippy::erasing_op)]
40 #[allow(clippy::many_single_char_names)]
41 pub mod rv60dsp;
42
43 #[cfg(feature="decoder_realaudio144")]
44 pub mod ra144;
45 #[cfg(feature="decoder_realaudio288")]
46 pub mod ra288;
47 #[cfg(feature="decoder_cook")]
48 pub mod cook;
49 #[cfg(feature="decoder_ralf")]
50 pub mod ralf;
51
52 const RM_CODECS: &[DecoderInfo] = &[
53 #[cfg(feature="decoder_realvideo1")]
54 DecoderInfo { name: "realvideo1", get_decoder: rv10::get_decoder },
55 #[cfg(feature="decoder_realvideo2")]
56 DecoderInfo { name: "realvideo2", get_decoder: rv20::get_decoder },
57 #[cfg(feature="decoder_realvideo3")]
58 DecoderInfo { name: "realvideo3", get_decoder: rv30::get_decoder },
59 #[cfg(feature="decoder_realvideo4")]
60 DecoderInfo { name: "realvideo4", get_decoder: rv40::get_decoder },
61 #[cfg(feature="decoder_realvideo6")]
62 DecoderInfo { name: "realvideo6", get_decoder: rv60::get_decoder },
63
64 #[cfg(feature="decoder_realaudio144")]
65 DecoderInfo { name: "ra14.4", get_decoder: ra144::get_decoder },
66 #[cfg(feature="decoder_realaudio288")]
67 DecoderInfo { name: "ra28.8", get_decoder: ra288::get_decoder },
68 #[cfg(feature="decoder_cook")]
69 DecoderInfo { name: "cook", get_decoder: cook::get_decoder },
70 #[cfg(feature="decoder_ralf")]
71 DecoderInfo { name: "ralf", get_decoder: ralf::get_decoder },
72 ];
73
74 pub fn realmedia_register_all_codecs(rd: &mut RegisteredDecoders) {
75 for decoder in RM_CODECS.iter() {
76 rd.add_decoder(decoder.clone());
77 }
78 }