#include "get_bits.h"
#include "dsputil.h"
#include "bytestream.h"
+#include "fft.h"
#include "cookdata.h"
AVLFG random_state;
/* transform data */
- MDCTContext mdct_ctx;
+ FFTContext mdct_ctx;
float* mlt_window;
/* VLC data */
/* data buffers */
uint8_t* decoded_bytes_buffer;
- DECLARE_ALIGNED_16(float,mono_mdct_output[2048]);
+ DECLARE_ALIGNED(16, float,mono_mdct_output)[2048];
float decode_buffer_1[1024];
float decode_buffer_2[1024];
float decode_buffer_0[1060]; /* static allocation for joint decode */
q->mlt_window[j] *= sqrt(2.0 / q->samples_per_channel);
/* Initialize the MDCT. */
- if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1)) {
+ if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1, 1.0)) {
av_free(q->mlt_window);
return -1;
}
q->bit_rate = avctx->bit_rate;
/* Initialize RNG. */
- av_lfg_init(&q->random_state, ff_random_get_seed());
+ av_lfg_init(&q->random_state, 0);
while(edata_ptr < edata_ptr_end){
/* 8 for mono, 16 for stereo, ? for multichannel
AVCodec cook_decoder =
{
.name = "cook",
- .type = CODEC_TYPE_AUDIO,
+ .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_COOK,
.priv_data_size = sizeof(COOKContext),
.init = cook_decode_init,