AnsweredAssumed Answered

Need Help Buffering Data Through AC-3 Decoder

Question asked by trentrolf on Jun 18, 2015

Hi there,

 

I am a new user of the AC-3 decoder module and I'm learning how it works.  I've worked through most of my initial issues but I am hung up on some logistics for buffering the data.  My current goal is to receive Dolby Digital stream into the S/PDIF module, unpack the IEC-61937 packet, send the raw AC-3 data though the decoder, then output the data to the DACs on the ADSP-21489 EZ-Board.  I have been relying heavily on the "Dolby Digital (AC-3) 5.1 Decoder Product Reference Guide".

 

I believe I have the first few steps working.  It looks like I am getting valid float values out of the AC-3 decoder, so now I am trying to output the data to the DACs.  The problem is that it takes me like 11 blocks of 256 samples before I the decoder tells me that the frame is complete (decoder_status.frame_completed == 1).  The output of the decoder is 6 channels of 256 samples.  So I need 11 blocks of input data before I can produce 1 block of output data.

 

So there must be something I am missing.  I was thinking that maybe the Dolby data was coming in faster than the audio sampling rate, but I probed the S/PDIF recovered frame sync (DIR_FS_O) and it was running at 48kHz which is the audio sampling rate.

 

Can you provide me with any clues about what I am doing wrong?

 

Thanks,

Trent

Outcomes