Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

AACDecoder

selea
Beginner
110 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
110 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.
selea
Beginner
110 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
Pavel_V_Intel
Employee
110 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.
selea
Beginner
110 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
Reply