]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/atrac3.c
Simplify pix_fmt_id instead of listing a subset of non-simplified ones.
[ffmpeg] / libavcodec / atrac3.c
index 6015ef6ab6edf7f2fcde200a17da16bb09f65cad..708627edbc2af32774ea3e29d3a34a00ecd62ee7 100644 (file)
@@ -108,7 +108,6 @@ typedef struct {
     float               outSamples[2048];
     uint8_t*            decoded_bytes_buffer;
     float               tempBuf[1070];
-    DECLARE_ALIGNED_16(float,mdct_tmp[512]);
     //@}
     //@{
     /** extradata */
@@ -189,10 +188,9 @@ static void iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float
  * @param pInput    float input
  * @param pOutput   float output
  * @param odd_band  1 if the band is an odd band
- * @param mdct_tmp  aligned temporary buffer for the mdct
  */
 
-static void IMLT(float *pInput, float *pOutput, int odd_band, float* mdct_tmp)
+static void IMLT(float *pInput, float *pOutput, int odd_band)
 {
     int     i;
 
@@ -210,7 +208,7 @@ static void IMLT(float *pInput, float *pOutput, int odd_band, float* mdct_tmp)
             FFSWAP(float, pInput[i], pInput[255-i]);
     }
 
-    mdct_ctx.fft.imdct_calc(&mdct_ctx,pOutput,pInput,mdct_tmp);
+    ff_imdct_calc(&mdct_ctx,pOutput,pInput);
 
     /* Perform windowing on the output. */
     dsp.vector_fmul(pOutput,mdct_window,512);
@@ -306,7 +304,6 @@ static void readQuantSpectralCoeffs (GetBitContext *gb, int selector, int coding
 
     if (codingFlag != 0) {
         /* constant length coding (CLC) */
-        //FIXME we don't have any samples coded in CLC mode
         numBits = CLCLengthTab[selector];
 
         if (selector > 1) {
@@ -758,7 +755,7 @@ static int decodeChannelSoundUnit (ATRAC3Context *q, GetBitContext *gb, channel_
     for (band=0; band<4; band++) {
         /* Perform the IMDCT step without overlapping. */
         if (band <= numBands) {
-            IMLT(&(pSnd->spectrum[band*256]), pSnd->IMDCT_buf, band&1,q->mdct_tmp);
+            IMLT(&(pSnd->spectrum[band*256]), pSnd->IMDCT_buf, band&1);
         } else
             memset(pSnd->IMDCT_buf, 0, 512 * sizeof(float));
 
@@ -1059,6 +1056,7 @@ static int atrac3_decode_init(AVCodecContext *avctx)
         return AVERROR(ENOMEM);
     }
 
+    avctx->sample_fmt = SAMPLE_FMT_S16;
     return 0;
 }
 
@@ -1072,5 +1070,5 @@ AVCodec atrac3_decoder =
     .init = atrac3_decode_init,
     .close = atrac3_decode_close,
     .decode = atrac3_decode_frame,
-    .long_name = "Atrac 3 (Adaptive TRansform Acoustic Coding 3)",
+    .long_name = NULL_IF_CONFIG_SMALL("Atrac 3 (Adaptive TRansform Acoustic Coding 3)"),
 };