Mercurial > libavcodec.hg
comparison aacdec.c @ 11932:ebe049799f6d libavcodec
aactab: Tablegenify ff_aac_pow2sf_tab.
author | alexc |
---|---|
date | Wed, 23 Jun 2010 19:30:01 +0000 |
parents | 062aab998a98 |
children | c69dd071f7d4 |
comparison
equal
deleted
inserted
replaced
11931:980030a3e315 | 11932:ebe049799f6d |
---|---|
535 size); | 535 size); |
536 | 536 |
537 static av_cold int aac_decode_init(AVCodecContext *avctx) | 537 static av_cold int aac_decode_init(AVCodecContext *avctx) |
538 { | 538 { |
539 AACContext *ac = avctx->priv_data; | 539 AACContext *ac = avctx->priv_data; |
540 int i; | |
541 | 540 |
542 ac->avctx = avctx; | 541 ac->avctx = avctx; |
543 ac->m4ac.sample_rate = avctx->sample_rate; | 542 ac->m4ac.sample_rate = avctx->sample_rate; |
544 | 543 |
545 if (avctx->extradata_size > 0) { | 544 if (avctx->extradata_size > 0) { |
579 ac->add_bias = 0.0f; | 578 ac->add_bias = 0.0f; |
580 ac->sf_scale = 1. / -1024.; | 579 ac->sf_scale = 1. / -1024.; |
581 ac->sf_offset = 60; | 580 ac->sf_offset = 60; |
582 } | 581 } |
583 | 582 |
584 #if !CONFIG_HARDCODED_TABLES | 583 ff_aac_tableinit(); |
585 for (i = 0; i < 428; i++) | |
586 ff_aac_pow2sf_tab[i] = pow(2, (i - 200) / 4.); | |
587 #endif /* CONFIG_HARDCODED_TABLES */ | |
588 | 584 |
589 INIT_VLC_STATIC(&vlc_scalefactors,7,FF_ARRAY_ELEMS(ff_aac_scalefactor_code), | 585 INIT_VLC_STATIC(&vlc_scalefactors,7,FF_ARRAY_ELEMS(ff_aac_scalefactor_code), |
590 ff_aac_scalefactor_bits, sizeof(ff_aac_scalefactor_bits[0]), sizeof(ff_aac_scalefactor_bits[0]), | 586 ff_aac_scalefactor_bits, sizeof(ff_aac_scalefactor_bits[0]), sizeof(ff_aac_scalefactor_bits[0]), |
591 ff_aac_scalefactor_code, sizeof(ff_aac_scalefactor_code[0]), sizeof(ff_aac_scalefactor_code[0]), | 587 ff_aac_scalefactor_code, sizeof(ff_aac_scalefactor_code[0]), sizeof(ff_aac_scalefactor_code[0]), |
592 352); | 588 352); |