Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Omx AAC decoder dm816x Raw format issue.

Hi,

I'm running into an issue with the  aac decoder when processing raw input. I'm using the ezsdk 5_05_02_00 witht the c674x-aaclcdec_01_41_00_00_elf DSP AAC decoder on a dm816x EVM. The decoder is able to process the data but I only am able to hear a buzz sound at the output adts work fine. For creating the files I'm using gstreamer on a PC:
File with ADTS stream format:
gst-launch audiotestsrc ! "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)2" ! faac outputformat=1 ! perf !  aacparse ! filesink location=file_faac_adts.aac -v

File with RAW stream format:
gst-launch audiotestsrc ! "audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)2" ! faac ! perf !  aacparse ! filesink location=file_faac_raw.aac -v

For decoding the files I'm using the adec_snt_a8host_debug.xv5T example application for decoding:
This works:

adec_snt_a8host_debug.xv5T -i /file_faac_adts.aac -c aaclc -r 0 -s 48000



This causes a buzzing sound:

adec_snt_a8host_debug.xv5T -i /file_faac_raw.aac -c aaclc -r 1 -s 48000

 


Any ideas or suggestions?

 

  • Hello,

    Could you check this file_faac_raw.aac on the PC first?
    Let me know.

    BR
    Margarita
  • Hello,

    Here is what the ADEC component supports:

    • Supports MP3 and AAC-LC decode. It does not support any other
    compression format.
    • Supports single input/output port with single input buffer and single output
    buffer.
    • Supports bit-stream bucket based decoding. Encoded data should be given
    as a pool of 4KB input buffer, the component will consume x amount of
    bytes required to decode a frame. Application will refill the buffer to
    maintain again 4KB input buffer pool.
    • Decoded output PCM is Stereo channels with 16-bit bit-precision per
    sample. If the stream is mono, internal codec performs mono to stereo
    conversion
    • Does not support run time configuration of its dynamic parameters using
    the OMX_GetConfig and OMX_SetConfig apis
    In AAC-LC, raw data format is not supported.

    To run the example you shall load the DPS firmware dm816x_c6xdsp.xe674 via firmware loader.

    ./adec_snt_a8host_debug.xv5T –i sample.aac –o output.pcm –c aaclc -r 1 -s 48000

    where:
    -i input file;
    -o output file;
    -c codec;
    -r 1 AAC raw format, 0 ADTS
    -s samplerate;

    You could check the OMX user guide in the component-sources/omx folder.

    BR
    Margarita
  • Hi Margarita,

    Thanks for your response, both files
     file_faac_adts.aac : /cfs-file/__key/communityserver-discussions-components-files/791/0624.file_5F00_faac_5F00_adts.aac

    and file_faac_raw.aac /cfs-file/__key/communityserver-discussions-components-files/791/7271.file_5F00_faac_5F00_raw.aac

    Play on the PC with the correct pipeline:
    gst-launch filesrc location= file_faac_raw.aac ! "audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true" ! aacparse ! ffdec_aac ! autoaudiosink -v

    From the Omx documentation I can confirm that in the ADEC statement says:

    • In AAC-LC, raw data format is not supported.

    Not sure why this is the case,  since the c674x-aaclcdec_01_41_00_00_elf documentation states that Raw and ADTS stream formats are supported (MPEG4AAC_LC_Decoder_C674X_DataSheet.pdf, page 1):

    • RAW data input format supported
    • Audio Data Interchange Format (ADIF) and Audio Data Transport Stream (ADTS) inputformats, encoded with ISO/IEC 13818-7 or 14496-3 compliant encoders supported

    Also, the omx test application has an option to select between both. Any particular reason why that was left behind?  any leads to solving this isuee will be much appreciated.

    Thanks again,
    JJ

  • Hello,

    When you are using ./adec_snt_a8host_debug.xv5T –i sample.aac –o output.pcm –c aaclc -r 1 -s 48000 the output file is it correct?

    Are you have the overlay package?

    BR
    Margarita

  • Hi,
    Thanks for your reply; no, after decoding a aac raw file using that command, the pcm output file looks corrupted and trying to play it with

    aplay -r 48000 -f S16_LE ./output.pcm

    Outputs again the buzzing sound (as oposed of a 440Hz tone I encoded). Yes I have access to the overlay package. Any Ideas?

    Thanks again.
    JJ

  • Hello JJ,

    In the file omx_adec.c in the overlay package could you comment this line and give a try?

     }
                      pAudDecComPvt->bCodecCreate = OMX_FALSE;
     
                     //pAudDecComPvt->fpSet_DynamicParams(pAudDecComPvt->pDecDynParams);
     
                      /* call control to get buffer info */

    line 1358. Let me know the result.

    BR

    Margarita

  • Yes, thanks a lot for for the help. That fixed it.
  • Hello Jose,

    I am glad that issue is resolved.

    Are you need the gstreamer patch as well or you are using OMX demo?

    BR
    Margarita