s->output[i+window_len] = audio[j] / n * win[window_len - i - 1];
s->frame_out[channel][i] = audio[j] / n * win[i];
}
- ff_mdct_calc(&s->mdct_ctx[window_index], s->coefs[channel], s->output, s->mdct_tmp);
+ ff_mdct_calc(&s->mdct_ctx[window_index], s->coefs[channel], s->output);
}
}
//FIXME use for decoding too
-static void init_exp(WMACodecContext *s, int ch, int *exp_param){
+static void init_exp(WMACodecContext *s, int ch, const int *exp_param){
int n;
const uint16_t *ptr;
float v, *q, max_scale, *q_end;
}
for(ch = 0; ch < s->nb_channels; ch++) {
- if (s->channel_coded[ch]= 1) { //FIXME
+ if ((s->channel_coded[ch]= 1)) { //FIXME only set channel_coded when needed, instead of always
init_exp(s, ch, fixed_exp);
}
}
unsigned char *buf, int buf_size, void *data){
WMACodecContext *s = avctx->priv_data;
short *samples = data;
- int i, total_gain, best;
+ int i, total_gain;
s->block_len_bits= s->frame_len_bits; //required by non variable block len
s->block_len = 1 << s->block_len_bits;
encode_init,
encode_superframe,
ff_wma_end,
+ .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+ .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
};
AVCodec wmav2_encoder =
encode_init,
encode_superframe,
ff_wma_end,
+ .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+ .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
};