switch to better FFT interface and more flexible FFT implementation
[nihav.git] / nihav-commonfmt / src / codecs / ts102366.rs
index a4d457024a7b76e9f031e5a8da929f01a8eccc5a..4858eaa05b00c4044587c62adea07e8e456e4bcc 100644 (file)
@@ -42,7 +42,7 @@ impl IMDCTContext {
             xsincos[k].re = -factor.cos();
             xsincos[k].im = -factor.sin();
         }
-        let fft = FFTBuilder::new_fft(FFTMode::SplitRadix, size/4);
+        let fft = FFTBuilder::new_fft(size/4, false);
         IMDCTContext { xsincos: xsincos, size: size, fft: fft }
     }
     #[allow(non_snake_case)]
@@ -107,7 +107,7 @@ fn do_imdct_core(fft: &mut FFT, xsc: &[FFTComplex; BLOCK_LEN/2], size: usize, il
         let c = FFTComplex { re: c0, im: c1 };
         z[k] = c * xsc[k];
     }
-    fft.do_fft_inplace(z, false);
+    fft.do_ifft_inplace(z);
     for k in 0..N4 {
         y[k] = z[k] * xsc[k];
     }
@@ -1157,7 +1157,7 @@ impl AudioBlock {
 }
 
 impl NADecoder for AudioDecoder {
-    fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> {
+    fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
         if let NACodecTypeInfo::Audio(_) = info.get_properties() {
             self.info = info.clone();
             Ok(())
@@ -1165,7 +1165,7 @@ impl NADecoder for AudioDecoder {
             Err(DecoderError::InvalidData)
         }
     }
-    fn decode(&mut self, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
+    fn decode(&mut self, _supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
         let info = pkt.get_stream().get_info();
         validate!(info.get_properties().is_audio());
         let pktbuf = pkt.get_buffer();