]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nellymoserdec.c
Fix RV40 chroma MC
[ffmpeg] / libavcodec / nellymoserdec.c
index 8045e4b8d0ee64d27bc4a41896a4934c3862e893..dfbb41caf4fcb0387ee472e08263adc31bb5e45e 100644 (file)
@@ -50,7 +50,6 @@ typedef struct NellyMoserDecodeContext {
     float           scale_bias;
     DSPContext      dsp;
     MDCTContext     imdct_ctx;
-    DECLARE_ALIGNED_16(float,imdct_tmp[NELLY_BUF_LEN]);
     DECLARE_ALIGNED_16(float,imdct_out[NELLY_BUF_LEN * 2]);
 } NellyMoserDecodeContext;
 
@@ -120,8 +119,7 @@ static void nelly_decode_block(NellyMoserDecodeContext *s,
         memset(&aptr[NELLY_FILL_LEN], 0,
                (NELLY_BUF_LEN - NELLY_FILL_LEN) * sizeof(float));
 
-        s->imdct_ctx.fft.imdct_calc(&s->imdct_ctx, s->imdct_out,
-                                    aptr, s->imdct_tmp);
+        ff_imdct_calc(&s->imdct_ctx, s->imdct_out, aptr);
         /* XXX: overlapping and windowing should be part of a more
            generic imdct function */
         overlap_and_window(s, s->state, aptr, s->imdct_out);
@@ -149,6 +147,8 @@ static av_cold int decode_init(AVCodecContext * avctx) {
     if (!sine_window[0])
         ff_sine_window_init(sine_window, 128);
 
+    avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = CH_LAYOUT_MONO;
     return 0;
 }