Mercurial > libavcodec.hg
comparison wmaenc.c @ 9658:67a20f0eb42c libavcodec
Support for getting (i)MDCT output multiplied by a constant scaling factor.
Scaling (i)MDCT output has no runtime overhead and can be used to improve
performance of audio codecs. All the changes are only needed in
'ff_mdct_init' function and slow down initialization a bit.
author | serge |
---|---|
date | Sat, 16 May 2009 14:17:08 +0000 |
parents | 932543edc1d2 |
children | 5cc32c474caf |
comparison
equal
deleted
inserted
replaced
9657:8a65ae8929fb | 9658:67a20f0eb42c |
---|---|
61 | 61 |
62 ff_wma_init(avctx, flags2); | 62 ff_wma_init(avctx, flags2); |
63 | 63 |
64 /* init MDCT */ | 64 /* init MDCT */ |
65 for(i = 0; i < s->nb_block_sizes; i++) | 65 for(i = 0; i < s->nb_block_sizes; i++) |
66 ff_mdct_init(&s->mdct_ctx[i], s->frame_len_bits - i + 1, 0); | 66 ff_mdct_init(&s->mdct_ctx[i], s->frame_len_bits - i + 1, 0, 1.0); |
67 | 67 |
68 avctx->block_align= | 68 avctx->block_align= |
69 s->block_align= avctx->bit_rate*(int64_t)s->frame_len / (avctx->sample_rate*8); | 69 s->block_align= avctx->bit_rate*(int64_t)s->frame_len / (avctx->sample_rate*8); |
70 //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate); | 70 //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate); |
71 avctx->frame_size= s->frame_len; | 71 avctx->frame_size= s->frame_len; |