Mercurial > libavcodec.hg
comparison vorbis_enc.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 | 4cb7c65fc775 |
children | 7955db355703 |
comparison
equal
deleted
inserted
replaced
9657:8a65ae8929fb | 9658:67a20f0eb42c |
---|---|
357 venc->coeffs = av_malloc(sizeof(float) * venc->channels * (1 << venc->log2_blocksize[1]) / 2); | 357 venc->coeffs = av_malloc(sizeof(float) * venc->channels * (1 << venc->log2_blocksize[1]) / 2); |
358 | 358 |
359 venc->win[0] = ff_vorbis_vwin[venc->log2_blocksize[0] - 6]; | 359 venc->win[0] = ff_vorbis_vwin[venc->log2_blocksize[0] - 6]; |
360 venc->win[1] = ff_vorbis_vwin[venc->log2_blocksize[1] - 6]; | 360 venc->win[1] = ff_vorbis_vwin[venc->log2_blocksize[1] - 6]; |
361 | 361 |
362 ff_mdct_init(&venc->mdct[0], venc->log2_blocksize[0], 0); | 362 ff_mdct_init(&venc->mdct[0], venc->log2_blocksize[0], 0, 1.0); |
363 ff_mdct_init(&venc->mdct[1], venc->log2_blocksize[1], 0); | 363 ff_mdct_init(&venc->mdct[1], venc->log2_blocksize[1], 0, 1.0); |
364 } | 364 } |
365 | 365 |
366 static void put_float(PutBitContext * pb, float f) { | 366 static void put_float(PutBitContext * pb, float f) { |
367 int exp, mant; | 367 int exp, mant; |
368 uint32_t res = 0; | 368 uint32_t res = 0; |