X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fcodecs%2Fcinepakenc.rs;fp=nihav-commonfmt%2Fsrc%2Fcodecs%2Fcinepakenc.rs;h=99194ceae268f82af995ce0d0d22a712794c525e;hb=13704efd78d1055406fead7d801edada74c2ddf3;hp=8273de0197a8755914560af7ce6464189f315c7e;hpb=252f4009f1e79679923058be5ea7f89cdce4d506;p=nihav.git diff --git a/nihav-commonfmt/src/codecs/cinepakenc.rs b/nihav-commonfmt/src/codecs/cinepakenc.rs index 8273de0..99194ce 100644 --- a/nihav-commonfmt/src/codecs/cinepakenc.rs +++ b/nihav-commonfmt/src/codecs/cinepakenc.rs @@ -214,7 +214,6 @@ impl MaskWriter { #[derive(Clone,Copy,PartialEq)] enum QuantMode { ELBG, - Hybrid, MedianCut, } @@ -222,7 +221,6 @@ impl std::string::ToString for QuantMode { fn to_string(&self) -> String { match *self { QuantMode::ELBG => "elbg".to_string(), - QuantMode::Hybrid => "hybrid".to_string(), QuantMode::MedianCut => "mediancut".to_string(), } } @@ -606,20 +604,6 @@ impl CinepakEncoder { fn quant_vectors(&mut self) { match self.qmode { QuantMode::ELBG => { - let mut elbg_v1: ELBG = ELBG::new(&self.v1_cb[self.cur_strip]); - let mut elbg_v4: ELBG = ELBG::new(&self.v4_cb[self.cur_strip]); - - for entry in self.v1_cb[self.cur_strip].iter_mut().skip(self.v1_len) { - self.rng.fill_entry(entry); - } - for entry in self.v4_cb[self.cur_strip].iter_mut().skip(self.v4_len) { - self.rng.fill_entry(entry); - } - - self.v1_len = elbg_v1.quantise(&self.v1_entries, &mut self.v1_cur_cb[self.cur_strip]); - self.v4_len = if !self.force_v1 { elbg_v4.quantise(&self.v4_entries, &mut self.v4_cur_cb[self.cur_strip]) } else { 0 }; - }, - QuantMode::Hybrid => { let v1_len = quantise_median_cut::(&self.v1_entries, &mut self.v1_cur_cb[self.cur_strip]); let v4_len = if !self.force_v1 { quantise_median_cut::(&self.v4_entries, &mut self.v4_cur_cb[self.cur_strip]) @@ -1057,7 +1041,7 @@ const ENCODER_OPTS: &[NAOptionDefinition] = &[ opt_type: NAOptionDefinitionType::Int(Some(0), Some(16)) }, NAOptionDefinition { name: "quant_mode", description: "Quantisation mode", - opt_type: NAOptionDefinitionType::String(Some(&["elbg", "hybrid", "mediancut"])) }, + opt_type: NAOptionDefinitionType::String(Some(&["elbg", "mediancut"])) }, NAOptionDefinition { name: "force_v1", description: "Force coarse (V1-only) mode", opt_type: NAOptionDefinitionType::Bool }, @@ -1084,7 +1068,6 @@ impl NAOptionHandler for CinepakEncoder { if let NAValue::String(ref strval) = option.value { match strval.as_str() { "elbg" => self.qmode = QuantMode::ELBG, - "hybrid" => self.qmode = QuantMode::Hybrid, "mediancut" => self.qmode = QuantMode::MedianCut, _ => {}, };