Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

AACDecoder

selea
Beginner
395 Views

Hi all, I'm develop an AACDecoder in my application using UMC::AACDecoder. I have to decode RTP AAC packet. I have already have a look to

http://software.intel.com/en-us/forums/topic/287391

and

http://software.intel.com/en-us/forums/topic/289752

And was very useful. I can decode and hear audio. Anyway I think the documentation is still missing of clear information about that: I mean it's not clear that you have to initialize the decoder in AAC_MPEG4_STREAM mode giving to the init a 2byte buffer from RTSP negotiation.

Anyway the problem is that documentation explain the "Typical Usage" that fill the input buffer with m_SuggestedInputSize and give it to the GetFrame. The problem is that in AAC_MPEG4_STREAM, after the decoding is performed the MediaData input buffer has always the GetDataSize=0 because of these decoder lines:

if (AAC_MPEG4_STREAM == m_info.m_init_stream_type) {
in->MoveDataPointer((Ipp32s)in->GetDataSize());
} else {
in->MoveDataPointer(nDecodedBytes);
}

So, why you do a in->MoveDataPointer((Ipp32s)in->GetDataSize()); even if nDecodedBytes is less then in->GetDataSize()? this way I can't fill it with m_SuggestedInputSize but I have to fill exactly 1 AAC packet otherwise I do not know if you have some remain size inside.

Can I walk around this? and Why there's in->MoveDataPointer((Ipp32s)in->GetDataSize()); line?

 

0 Kudos
4 Replies
Pavel_V_Intel
Employee
395 Views
Good day. AAC_MPEG4_STREAM is suppose to be decoded in pair with MP4 splitter and splitter always returns one data packet. In 7.1.1 samples there is umc_audio_dec_con sample where you can see example of audio decoding pipeline for various formats.
0 Kudos
selea
Beginner
395 Views
Ok I understand AAC_MPEG4_STREAM stay for MP4 stream...but I can't understand why you have nDecodedBytes but you move the pointer of in size (probably for mp4 stream behavior). Anyway if you want to decode the AAC audio from a RTP source you have to do some tricks, like 2 byte buffer decoder initialization or change the m_info.m_init_stream_type after initialize: now I do that, for correctly decode AAC stream
0 Kudos
Pavel_V_Intel
Employee
395 Views
This is very old workaround for some MP4 streams. Probably it has no value anymore, I think it is better to comment out this condition and use only actual decoded size value.
0 Kudos
selea
Beginner
395 Views
I think it's a good idea ;) just for future release so I don't have to subclass the AACDecoder to change the stream type
0 Kudos
Reply