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.

OPUS code for the ARM Cortex-A15

Other Parts Discussed in Thread: TMS320C6657

The code for the DSP C66 is available to download and use. The article includes comparison between the DSP and the A15. Is the A15 code available that was used in the comparison? We want to try on the A15. The opus website lets me download the code, however trying to use in CCS v6 is having numerous problems that need to be fixed and taking some time.

Thanks,

Dan

  • Dan,

    Moving this thread to the Multicore forum.
    Could you also please provide specific details on what the "numerous problems" are, so that we can provide assistance. Thanks.

    Lali

  • The current problem is with several math routines that are redefined from double to float. The message says, for example, "undefined reference to 'sqrt'." This message also shows up for exp(), floor(), and log(). There are apparently some define (-D) macros that will help solve this problem that I have not figured out yet.
    I am also having a few problems trying to use the OPU 'configure' program with the defines needed to compile for the Cortex-A15.
  • I was able to resolve these by adding the math library to the list of libraries.
    I still have a few more that depend on whether I use FIXED_POINT or not. If I use FIXED_POINT some float routines are not found to link to and if I do not use FIXED_POINT some fixed point routines are not found that are compiled if FIXED_POINT is defined.
  • Dan,What article you are referring to? Regards, Eric
  • Dan,

    If you are referring to http://www.ti.com/tool/tidep0036, "Reference Design using TMS320C6657 to Implement Efficient OPUS Codec Solution":

    - We have K2H cards running full Ubuntu 14.04 system on A15, so it contains arm gcc compiler

    - The Opus 1.1 source code is downloaded from the link given in the article

    - there is make file you can build the linux application (opus_demo), we are not using CCS to build it

    - We add some profiling code to record the timestamp for encoder and decoder

    - And run it directly it as a Linux application on the A15 Ubuntu

    Regards, Eric

     

  • Thanks Eric,

    We tried to run in on an A15 as a simple microprocessor program with no OS. The malloc does not work for some unknown reason. It does not appear to be because of some type of memory limitation.

  • We optimized Opus codec running on DSP, either C64x+ or C66x structure. Runing on ARM A15 is for performace comparsion purpose. We didn't do any Opus porting work on ARM bare metal and have no plan for this.

    You may check with our partner Couth IT (http://www.couthit.com/) if they have Opus on A15 bare metal.

    Regards, Eric

  • The performance comparison code reads and does a comparison. For C66x do you have an example that does encoding? That is it reads .wav (or RAW) files or inputs RAW data and then saves in the OPUS format? This example code is a lot different from the OPUS examples. For instance, they use the OGG streaming API to read and write the audio data.

    Thanks

  • In the C66x Opus package we provided, it has Opus encoder to read .wav file and encoded it into Opus encoder format. Did you read the user guide then try to run the encoder example? I am not sure what you are looking for.

    Below is a test example we used in Opus package: 1 48000 1 128000 1 0 4 10  3 0 0 0  0  ..\..\..\test\testvecs\Input\sample.wav  ..\..\..\test\testvecs\Bitstream\sample_audio_48k_mono_128kbps_FB_c3.bit

    Regards, Eric

  • There are the .wav and .big files, and the output file that reports the comparison. I want to read the .wav and save as a .opus formated file.
    Also, is the .bit file a raw data file?
    Thanks, Dan
  • Dan,.bit is .opus format.Regards, Eric
  • I thought there was a comment that the .bit file is an OPUS formatted file. Possibly a streaming type of format.

    I need to save to an OPUS formatted file. I checked the beginning of the .bit file and it does not have the OPUS header meta-data that I see in other OPUS files. For that reason, at least partly, it does not play using an audio player that can play OPUS.

    Is there an example that saves this DSP version of OPUS data? I do not see anything useful in the variables, such as the outBufs structure.

    Thanks,

    Dan

  • "I need to save to an OPUS formatted file. I checked the beginning of the .bit file and it does not have the OPUS header meta-data that I see in other OPUS files. For that reason, at least partly, it does not play using an audio player that can play OPUS."

    This is just the raw data without header/metadata information. Like the standard Opus testing vectors available at http://opus-codec.org/testvectors/. The .bit doesn't contain header info.

    Regards, Eric

  • Thanks, Eric.
    I still need to know how to write the header so that I can play the OPUS output.
    Also, the read of the .wav file does not appear to read its header data. Parameters such as the sampling rate are in the header information of the file.
    Dan
  • Actually the more important question is, how do I know that the opus encode program is reading RAW data as opposed to WAV data that is part of the test file? The TI OPUS version for DSP does not appear to have a variable that says what type of format the input file is in.
    Thanks,
    Dan
  • Dan,

    Thanks for pointing this out: Our Opus encoder test uses C66x_OPUS_01_00_03_00_LE_ELF\packages\ti\sdo\codecs\opusenc\App\Client\Test\TestVecs\input\sample.wav, the input is .wav file, which contains 44-byte of header like how many channels and sampling rate, etc. Our test application opens this as a binary file, and read it chuck by chunk. That is, the header is treated as part of PCM sample and encoded. Our test application expects RAW files only as input, having wav file may be not correct. We filed a ticket for this.

    Adding metadata info to bit file is not supported by our implementation. We will output the raw payload only. The standard provides some tools to convert the bit files to opus files, please check http://opus-codec.org/downloads/.

    Regards, Eric

     

     

  • Thanks for the update,

    Dan