X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-indeo%2Fsrc%2Fcodecs%2Fimc.rs;h=3bf57f8a36ceb30e892d877a9add102332bf5f9f;hb=3a1d1cfa508161305c7e2499dab3196ded109faf;hp=ceac0d1062e33de26dbeb77b7bab7fc33b73d9e2;hpb=2422d9699cd56cbb86ac32b3e8dd026e20a89db5;p=nihav.git diff --git a/nihav-indeo/src/codecs/imc.rs b/nihav-indeo/src/codecs/imc.rs index ceac0d1..3bf57f8 100644 --- a/nihav-indeo/src/codecs/imc.rs +++ b/nihav-indeo/src/codecs/imc.rs @@ -835,7 +835,7 @@ impl IMDCTContext { pretwiddle2: pretwiddle2, posttwiddle: posttwiddle, tmp: [FFTC_ZERO; COEFFS/2], - fft: FFTBuilder::new_fft(FFTMode::SplitRadix, COEFFS/2), + fft: FFTBuilder::new_fft(COEFFS/2, false), window: window, } } @@ -848,7 +848,7 @@ impl IMDCTContext { self.tmp[i].re = -(c2 * in1 + c1 * in2); self.tmp[i].im = c1 * in1 - c2 * in2; } - self.fft.do_fft_inplace(&mut self.tmp, false); + self.fft.do_ifft_inplace(&mut self.tmp); for i in 0..COEFFS/2 { let tmp = !(self.tmp[i] * self.posttwiddle[i]); let c1 = self.window[i * 2]; @@ -865,7 +865,7 @@ const CHMAP_MONO: [NAChannelType; 1] = [NAChannelType::C]; const CHMAP_STEREO: [NAChannelType; 2] = [NAChannelType::L, NAChannelType::R]; impl NADecoder for IMCDecoder { - fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> { + fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Audio(ainfo) = info.get_properties() { self.chmap = NAChannelMap::new(); match ainfo.get_channels() { @@ -886,7 +886,7 @@ impl NADecoder for IMCDecoder { Err(DecoderError::InvalidData) } } - fn decode(&mut self, pkt: &NAPacket) -> DecoderResult { + fn decode(&mut self, _supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult { let info = pkt.get_stream().get_info(); validate!(info.get_properties().is_audio()); let pktbuf = pkt.get_buffer(); @@ -920,7 +920,7 @@ impl NADecoder for IMCDecoder { let mut frm = NAFrame::new_from_pkt(pkt, self.info.clone(), abuf); frm.set_keyframe(true); - Ok(Rc::new(RefCell::new(frm))) + Ok(frm.into_ref()) } }