]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/atrac3.c
Set cur_channel in the AAC encoder context where needed.
[ffmpeg] / libavcodec / atrac3.c
index 2b956ec428bab2af5cf74637f34421b338a6f830..5179c345cfcd080ca537a724d2c2c9635ba1c6dc 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;
 
 
@@ -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
@@ -1016,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,