all_decoders = ["all_video_decoders", "all_audio_decoders"]
decoders = []
-all_video_decoders = ["decoder_bmv", "decoder_bmv3", "decoder_fstvid", "decoder_gdvvid", "decoder_imax", "decoder_ipma", "decoder_midivid", "decoder_midivid3", "decoder_q", "decoder_smush", "decoder_vmd", "decoder_vx"]
+all_video_decoders = ["decoder_bmv", "decoder_bmv3", "decoder_fstvid", "decoder_gdvvid", "decoder_imax", "decoder_ipma", "decoder_midivid", "decoder_midivid3", "decoder_q", "decoder_smush_video", "decoder_vmd", "decoder_vx"]
decoder_bmv = ["decoders"]
decoder_bmv3 = ["decoders"]
decoder_fstvid = ["decoders"]
decoder_midivid = ["decoders"]
decoder_midivid3 = ["decoders"]
decoder_q = ["decoders"]
-decoder_smush = ["decoders"]
+decoder_smush_video = ["decoders"]
decoder_vmd = ["decoders"]
decoder_vx = ["decoders"]
-all_audio_decoders = ["decoder_fstaud", "decoder_lhst500f22"]
+all_audio_decoders = ["decoder_fstaud", "decoder_lhst500f22", "decoder_smush_audio"]
decoder_fstaud = ["decoders"]
decoder_lhst500f22 = ["decoders"]
+decoder_smush_audio = ["decoders"]
pub mod midivid3;
#[cfg(feature="decoder_q")]
pub mod q;
-#[cfg(feature="decoder_smush")]
+#[cfg(any(feature="decoder_smush_video", feature="decoder_smush_audio"))]
pub mod smush;
#[cfg(feature="decoder_vmd")]
pub mod vmd;
DecoderInfo { name: "ipma2", get_decoder: ipma::get_decoder_v2 },
#[cfg(feature="decoder_q")]
DecoderInfo { name: "legend-q-video", get_decoder: q::get_decoder },
-#[cfg(feature="decoder_smush")]
+#[cfg(feature="decoder_smush_video")]
DecoderInfo { name: "smushv1", get_decoder: smush::get_decoder_video_v1 },
-#[cfg(feature="decoder_smush")]
+#[cfg(feature="decoder_smush_video")]
DecoderInfo { name: "smushv2", get_decoder: smush::get_decoder_video_v2 },
-#[cfg(feature="decoder_smush")]
+#[cfg(feature="decoder_smush_audio")]
DecoderInfo { name: "smush-iact", get_decoder: smush::get_decoder_iact },
-#[cfg(feature="decoder_smush")]
+#[cfg(feature="decoder_smush_audio")]
DecoderInfo { name: "smush-vima", get_decoder: smush::get_decoder_vima },
#[cfg(feature="decoder_vmd")]
DecoderInfo { name: "vmd-audio", get_decoder: vmd::get_decoder_audio },
+#[cfg(feature="decoder_smush_video")]
enum GlyphEdge {
Left,
Top,
None
}
+#[cfg(feature="decoder_smush_video")]
impl GlyphEdge {
fn get(x: usize, y: usize, size: usize) -> Self {
if y == 0 {
}
}
+#[cfg(feature="decoder_smush_video")]
enum GlyphDir {
Left,
Up,
None
}
+#[cfg(feature="decoder_smush_video")]
impl GlyphDir {
fn get(edge0: GlyphEdge, edge1: GlyphEdge) -> Self {
match (edge0, edge1) {
}
}
+#[cfg(feature="decoder_smush_video")]
const XVEC4: [usize; 16] = [0, 1, 2, 3, 3, 3, 3, 2, 1, 0, 0, 0, 1, 2, 2, 1];
+#[cfg(feature="decoder_smush_video")]
const YVEC4: [usize; 16] = [0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 2, 1, 1, 1, 2, 2];
+#[cfg(feature="decoder_smush_video")]
const XVEC8: [usize; 16] = [0, 2, 5, 7, 7, 7, 7, 7, 7, 5, 2, 0, 0, 0, 0, 0];
+#[cfg(feature="decoder_smush_video")]
const YVEC8: [usize; 16] = [0, 0, 0, 0, 1, 3, 4, 6, 7, 7, 7, 7, 6, 4, 3, 1];
+#[cfg(feature="decoder_smush_video")]
fn make_glyphs_47(glyphs4: &mut [[u8; 16]; 256], glyphs8: &mut [[u8; 64]; 256]) {
for (n, glyph) in glyphs4.iter_mut().enumerate() {
let i = n >> 4;
make_glyph_47(glyph, XVEC8[i], YVEC8[i], XVEC8[j], YVEC8[j], 8);
}
}
+#[cfg(feature="decoder_smush_video")]
fn make_glyph_47(dst: &mut [u8], xi: usize, yi: usize, xj: usize, yj: usize, size: usize) {
let edge0 = GlyphEdge::get(xi, yi, size);
let edge1 = GlyphEdge::get(xj, yj, size);
};
}
}
+#[cfg(feature="decoder_smush_video")]
fn interpolate(a: usize, b: usize, pos1: usize, range: usize) -> usize {
(a * pos1 + b * (range - pos1) + range / 2) / range
}
+#[cfg(feature="decoder_smush_video")]
mod v1;
+#[cfg(feature="decoder_smush_video")]
pub use v1::get_decoder_video_v1;
+#[cfg(feature="decoder_smush_video")]
mod v2;
+#[cfg(feature="decoder_smush_video")]
pub use v2::get_decoder_video_v2;
+#[cfg(feature="decoder_smush_audio")]
mod iact;
+#[cfg(feature="decoder_smush_audio")]
pub use iact::get_decoder_iact;
+#[cfg(feature="decoder_smush_audio")]
mod vima;
+#[cfg(feature="decoder_smush_audio")]
pub use vima::get_decoder_vima;