fdk-aac怎么使用

2025-04-20 05:47:33

1、Fdk-aac相比 faac以及其他的aac库,好处是输出码率控制精准,而且支持he-aac的编解码,看了下android源码里面,openmax的soft aac组件就是用fdk-aac实现的。

fdk-aac怎么使用

2、decoder decoder主要有两种模式, RAW和ADTS RAW模式: 需要在初始化decoder的时候传入AudioSpecInfo,表明即将送入的rawdata的samplerate, channel等; 送数据的时候把ADTS头去掉 m_hAacDecoder=aacDecoder_Open(TT_MP4_RAW,1);

fdk-aac怎么使用

3、aacDecoder_ConfigRaw(m_hAacDecoder,&m_SpecInfo,&m_SpecInfoSize) ADTS模式: 初始化时不需要传入AudioSpecInfo;送数据时要加上ADTS头 aacDecoder_Open(TT_MP4_ADTS,1);

fdk-aac怎么使用

4、送数倌栗受绽据时常用如下形式: UINT bytesValid = lInSize;while(bytesValid>0 && decoderErr==AAC_DEC_NOT_ENOUGH_BITS){aacDecoder_Fill( m_hAacDecoder,&pIn,(UINT*)&lInSize,&bytesValid); decoderErr = aacDecoder_DecodeFrame(m_hAacDecoder,(INT_PCM*)m_decodeBuffer,m_decodeBufSize,0);}

fdk-aac怎么使用

5、解码库会分配一个过渡性的decoder-坡纠课柩internal input buffer,这个buffer大小又RANSP晦倘佳鳎ORTDEC_INBUF_SIZE规定,可以任意设定但必须满足两个条件:1:each input channel requires 768 bytes2:the whole buffer must be of size 2^nSo for example a stereo decoder: TRANSPORTDEC_INBUF_SIZE = 2 768 = 1536 => 2048(选择2048bytes)。

fdk-aac怎么使用

6、aacDecoder_Fill就是从input buffer往ecoder-internalinput buffer里面拷贝数据,返回的是input buffer中还剩下多少没有被拷贝的数据(bytesValid)aacDecoder_DecodeFrame用来解码internal buffer中的数据,如果数据不足以解码。

fdk-aac怎么使用
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢