]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/atrac3.c
Fix misspelled parameter names in Doxygen documentation.
[ffmpeg] / libavcodec / atrac3.c
index 91dc80bfd4f7c5d23684cfa690fd7120bd3cc3e2..150f20171c2d012aa15213d67cadd1485f4f33d4 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @file libavcodec/atrac3.c
+ * @file
  * Atrac 3 compatible decoder.
  * This decoder handles Sony's ATRAC3 data.
  *
@@ -40,6 +40,7 @@
 #include "get_bits.h"
 #include "dsputil.h"
 #include "bytestream.h"
+#include "fft.h"
 
 #include "atrac.h"
 #include "atrac3data.h"
@@ -73,8 +74,8 @@ typedef struct {
     int               gcBlkSwitch;
     gain_block        gainBlock[2];
 
-    DECLARE_ALIGNED_16(float, spectrum[1024]);
-    DECLARE_ALIGNED_16(float, IMDCT_buf[1024]);
+    DECLARE_ALIGNED(16, float, spectrum)[1024];
+    DECLARE_ALIGNED(16, float, IMDCT_buf)[1024];
 
     float             delayBuf1[46]; ///<qmf delay buffers
     float             delayBuf2[46];
@@ -119,11 +120,11 @@ typedef struct {
     //@}
 } ATRAC3Context;
 
-static DECLARE_ALIGNED_16(float,mdct_window[512]);
+static DECLARE_ALIGNED(16, float,mdct_window)[512];
 static VLC              spectral_coeff_tab[7];
 static float            gain_tab1[16];
 static float            gain_tab2[31];
-static MDCTContext      mdct_ctx;
+static FFTContext       mdct_ctx;
 static DSPContext       dsp;
 
 
@@ -165,9 +166,9 @@ static void IMLT(float *pInput, float *pOutput, int odd_band)
 /**
  * Atrac 3 indata descrambling, only used for data coming from the rm container
  *
- * @param in        pointer to 8 bit array of indata
- * @param bits      amount of bits
+ * @param inbuffer  pointer to 8 bit array of indata
  * @param out       pointer to 8 bit array of outdata
+ * @param bytes     amount of bytes
  */
 
 static int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){
@@ -192,7 +193,6 @@ static int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){
 
 static av_cold void init_atrac3_transforms(ATRAC3Context *q) {
     float enc_window[256];
-    float s;
     int i;
 
     /* Generate the mdct window, for details see
@@ -206,13 +206,6 @@ static av_cold void init_atrac3_transforms(ATRAC3Context *q) {
             mdct_window[511-i] = mdct_window[i];
         }
 
-    /* Generate the QMF window. */
-    for (i=0 ; i<24; i++) {
-        s = qmf_48tap_half[i] * 2.0;
-        qmf_window[i] = s;
-        qmf_window[47 - i] = s;
-    }
-
     /* Initialize the MDCT transform. */
     ff_mdct_init(&mdct_ctx, 9, 1, 1.0);
 }
@@ -1023,7 +1016,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
 AVCodec atrac3_decoder =
 {
     .name = "atrac3",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_ATRAC3,
     .priv_data_size = sizeof(ATRAC3Context),
     .init = atrac3_decode_init,