Mercurial > libavcodec.hg
comparison nellymoserdec.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 | f1dc62781766 |
children | 38ab367d4231 |
comparison
equal
deleted
inserted
replaced
9657:8a65ae8929fb | 9658:67a20f0eb42c |
---|---|
128 static av_cold int decode_init(AVCodecContext * avctx) { | 128 static av_cold int decode_init(AVCodecContext * avctx) { |
129 NellyMoserDecodeContext *s = avctx->priv_data; | 129 NellyMoserDecodeContext *s = avctx->priv_data; |
130 | 130 |
131 s->avctx = avctx; | 131 s->avctx = avctx; |
132 av_lfg_init(&s->random_state, ff_random_get_seed()); | 132 av_lfg_init(&s->random_state, ff_random_get_seed()); |
133 ff_mdct_init(&s->imdct_ctx, 8, 1); | 133 ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0); |
134 | 134 |
135 dsputil_init(&s->dsp, avctx); | 135 dsputil_init(&s->dsp, avctx); |
136 | 136 |
137 if(s->dsp.float_to_int16 == ff_float_to_int16_c) { | 137 if(s->dsp.float_to_int16 == ff_float_to_int16_c) { |
138 s->add_bias = 385; | 138 s->add_bias = 385; |