*/
/**
- * @file libavcodec/atrac3.c
+ * @file
* Atrac 3 compatible decoder.
* This decoder handles Sony's ATRAC3 data.
*
#include "get_bits.h"
#include "dsputil.h"
#include "bytestream.h"
+#include "fft.h"
#include "atrac.h"
#include "atrac3data.h"
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];
//@}
} 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;
/**
* 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){
static av_cold void init_atrac3_transforms(ATRAC3Context *q) {
float enc_window[256];
- float s;
int i;
/* Generate the mdct window, for details see
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);
}
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,