X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-indeo%2Fsrc%2Fcodecs%2Findeo3enc%2Fmod.rs;h=558e11bc958a29596b1bbfe274b9e59af5fda1b8;hb=a6627cc2d0a55f200fea53af94a89367e08e43f4;hp=84764eca64cb10e44d4baefcb4b66f69bba49ec5;hpb=bafe9cd4a4016dc550e2cd5311628024c8368023;p=nihav.git diff --git a/nihav-indeo/src/codecs/indeo3enc/mod.rs b/nihav-indeo/src/codecs/indeo3enc/mod.rs index 84764ec..558e11b 100644 --- a/nihav-indeo/src/codecs/indeo3enc/mod.rs +++ b/nihav-indeo/src/codecs/indeo3enc/mod.rs @@ -148,7 +148,7 @@ impl Indeo3Encoder { } let mut iw = Indeo3Writer::new(dbuf); - self.cframe.plane[planeno].encode_tree(&mut iw, &tree, &mut self.cenc, is_intra, ref_plane); + self.cframe.plane[planeno].encode_tree(&mut iw, &tree, &mut self.cenc, ref_plane); drop(iw); while (dbuf.len() & 3) != 0 { dbuf.push(0); @@ -355,7 +355,7 @@ impl NAEncoder for Indeo3Encoder { self.encode_planes(&mut dbuf, &trees, is_intra)?; let cur_quant = self.cenc.quant.unwrap_or(42); - if !is_intra && cur_quant < 8 { + if self.try_again && !is_intra && cur_quant < 8 { let expected_size = self.rc.get_expected_size(); if expected_size > 0 { let cur_size = dbuf.len() as u32; @@ -590,7 +590,7 @@ mod test { let enc_options = &[ NAOption { name: super::TRY_AGAIN_OPTION, value: NAValue::Bool(true) }, ]; - encode_test("indeo3.avi", enc_options, Some(4), &[0xc23464a1, 0xd319a38f, 0x7421165e, 0x42786e50]); + encode_test("indeo3.avi", enc_options, Some(4), &[0x17d742bc, 0x6f4c1200, 0x79422bac, 0xc46b5dd0]); } /*#[test] fn test_indeo3_roundtrip() {