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.

Voice quality issue with TI Opus Decoder on C6678 for a full band (48kHz) input signal

We have observed voice quality issue with TI Opus Decoder on C6678 for a full band (48k Hz) input signal.

Following are the test details and how to reproduce the issue on the 6678 EVM using the TI Opus demo program.

TI OPUS Decoder Version: REL.OPUS.C66X.01.00.02.00 and running the C66X_OPUS_BE_ELF application (DSP in big endian mode).

The attached “All_test_vectors_dec.txt” file was used to specify decoder configuration when reproducing the issue.

The configuration is as follows:  8000 1 0 ..\..\..\test\testvecs\Bitstream\speech_opus_48_mono_64_cbr_20_1.bit  ..\..\..\test\testvecs\Output\speech_opus_48_mono_64_cbr_20_1.dec  0

The attached “speech_opus_48_mono_64_cbr_20_1.bit ” file is the input bit stream (speech 48k Hz mono), used as input to decoder.

The attached “decout_dump.pcm” file is the Opus decoder output dump, please note that we have added the piece of the code to dump the decoder out under test application while running the test.

Observations:

decout_dump.pcm (decoder output) voice quality is poor and also has some distortion.

The issue observed only for a full band input signal (48k Hz) and both for mono and stereo.

The issue observed for any of the decoder output sampling rate configuration i.e. for 8k or 16k or 48k.

There is no issue observed for other bands NB, MB, WB and SWB of input signals.

 

 

 

 attachment.zip

  • Hi Venkatesh,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    We will get back to you on the above query shortly. Thank you for your patience.

  • Could you clarify:

    The configuration is as follows:  8000 1 0 ..\..\..\test\testvecs\Bitstream\speech_opus_48_mono_64_cbr_20_1.bit  ..\..\..\test\testvecs\Output\speech_opus_48_mono_64_cbr_20_1.dec  0

    1) why you use 8000 Hz, shouldn't 48000 Hz?

    2) speech_opus_48_mono_64_cbr_20_1.dec, is this decout_dump.pcm?

    Regards, Eric

  • Hello Eric,

    Please find the clarifications below:

    1. The decoder output sampling rate can be configured to any value from NB (8k Hz) upto FB (48k Hz), at present in our application we are using decoder configured to either NB (8k Hz) or WB (16 kHz) only.

    I hope that even if the decoder output sampling rate configured to either NB or WB the incoming bit stream can be up to FB (48k Hz), there is no restriction to get the incoming media same as decoder output sampling rate configured.

    As I mentioned the issue observed only when the incoming meida is FB (48k Hz), I don't see any issue if the the incoming media is NB (8k Hz) or WB (16k Hz) or SWB (24k Hz) and irrespective of the decoder output sampling rate configured to either NB or WB.

    2. speech_opus_48_mono_64_cbr_20_1.dec is the dummy reference file configured sinc ethe TI test application expecting that to compare with the decoded output.

    decout_dump.pcm is the actual decoder output dump i.e. the decoder output buffer (16 bit pcm samples) written to a file and played using cool edit to observe the voice quality issue.

    Regards,
    Venkatesh
  • Hi Venkatesh,

    We could able to decode the bitstream shared by you and no distortion was observed, please find attached the decoder output for your reference.

    You mentioned that you made some changes to write the decoder output to file, can you please share the changes?

    -Venkat

    speech_opus_48_mono_64_cbr_20_1.zip

  • Hello Venkat,

    Thank you for the update, below is the piece of the code added under decoder main file to dump the output.

    // For debug only
    FILE* decout=NULL;
    decout = fopen("..\\..\\..\\test\\testvecs\\output\\decout_dump.pcm", "wb");
    if(decout == NULL)
    {
    printf("Error opening decout.pcm!!\n");
    return (-1);
    }


    ret_val = algD->fxns->process ((ISPHDEC1_Handle) algD,
    &inBufs, &outBufs,
    (ISPHDEC1_InArgs *)&dInargs,
    (ISPHDEC1_OutArgs *)&dOutargs);

    // Dump the Dec out for debug only
    fwrite(outBufs.buf, sizeof(short int), outBufs.bufSize, decout);

    Regards,
    Venkatesh
  • Hello Venkat,

    Thank you for the update, just want to check that the test executed at your end on c6678 EVM, OPUS Decoder Version: REL.OPUS.C66X.01.00.02.00 and C66X_OPUS_BE_ELF application.

    Regards,
    Venkatesh
  • Hello Venkat,

    Below is the piece of the code added under decoder main to dump the output, just want to check that did the test tried at your end on c6678 EVM for TI OPUS Decoder Version: REL.OPUS.C66X.01.00.02.00  running the C66X_OPUS_BE_ELF application?

    // For debug only

    FILE* decout=NULL;

    decout = fopen("..\\..\\..\\test\\testvecs\\output\\decout_dump.pcm", "wb");

    if(decout == NULL)

    {

           printf("Error opening decout.pcm!!\n");

           return (-1);

    }

    ret_val = algD->fxns->process ((ISPHDEC1_Handle) algD,

                                                &inBufs, &outBufs,

                                                (ISPHDEC1_InArgs *)&dInargs,

                                                (ISPHDEC1_OutArgs *)&dOutargs);

    // Dump the Dec out for debug only

    fwrite(outBufs.buf, sizeof(short int), outBufs.bufSize, decout);

    Regards,

    Venkatesh

  • Hi Venkatesh,

    This code should be OK, but, you need to be careful as you are dumping this output on BE platform.

    However, if we check the size of the dump file you shared, it points something is wrong. The decoder output should be multiples of 160, but your file is not. Please double check and carefully the outBufs.bufSize every frame. And also, the input bitstream has only 541 frames, whereas your dump file has more data.

    -Venkat
  • Hello Venkat,

    While dumping the the decoder output I have also printed the outBufs.bufSize on console and found it's always 160 therefore I don't think any problem with this.

    I have opened the output dump file under windows while dumping and found that the file update is very slow and might missed some last frames of data otherwise the dump should be fine.

    Just want to check that did the test ran at your end on c6678 EVM and with version REL.OPUS.C66X.01.00.02.00 and C66X_OPUS_BE_ELF application?

    Regards,
    Venkatesh
  • HI Venkatesh,

    Yes. I have verified it on c6678 EVM and with version REL.OPUS.C66X.01.00.02.00 and C66X_OPUS_BE_ELF.

    Your dump file is having more samples than the expected, shall we explore why? How are you executing the decoder on C6678 EVM, using CCS, or any other way? Also, you are running on BE platform and writing the output under windows (which will be LE platform), do you see any issues here?

    If every frame is returning 160samples, it should write a total of 2x160x541=173120bytes to your file. But, your file is having more bytes.

    -Venkat
  • Hello Venkat,

    Thank you for the confirmation, yes I am using CCS only, let me check about BE vs LE, I will get 160x541 not 2x160x541 since I am not using stereo.

    Regards,
    Venkatesh
  • HI Venkatesh,

    The outBufs.bufSize returned by the decoder is the number of samples (not bytes). As each sample is 16-bit, you should see 2x160x541 bytes in the output file.

    -Venkat
  • Hello Venkat,

    I ran the same test with C66X_OPUS_LE_ELF (little endian application) and observed that there is no issue with full band input signal.
    So the issue may be the dumping under BE application as you mentioned, just to confirm the same can you please share me the BE test application code or may be the piece of the code to dump the output which you are using to dump. I will use the same at my end and verify the same.

    Regards,
    Venkatesh
  • Hi Venkatesh,

    That's good to hear!!

    You can use the dump file generated by LE build and test the BE build compliance, it should work.

    I will share the sample code by tomorrow.

    -Venkat
  • opus_tii_dec_main.zipHI Venkatesh,

    Please find attached the wrapper to dump the code in BE build. FOR loop at line 341 needs to be commented for LE build.

    -Venkat

  • Thank you Venkat, I used the attached sample code and I don't see any problem i.e. decoder output dump looks good without any distortion.

    Regards,
    Venkatesh
  • Hello Venkat,

    I need one help, I have ran the TI test app using CCS for BE-ELF and found that the app using opusdec_tii.le66e lib which is already present.

    I don't find any doc how to build and create the opusdec_tii.le66e lib so that I will use it for test rather than already existing lib.

    Can you please give me the instructions how to build and create the opusdec_tii.le66e lib.

    Regards,

    Venkatesh  

  • Hello Venkat,

    I need one help, I have ran the TI test app using CCS for BE-ELF and found that the app using opusdec_tii.le66e lib which is already present.

    I don't find any doc how to build and create the opusdec_tii.le66e lib so that I will use it for test rather than already existing lib.

    Can you please give me the instructions how to build and create the opusdec_tii.le66e lib.

    Regards,

    Venkatesh
  • Hi,


    Do you have access to the source code?

    -Venkat

  • Yes Venkat, I have the access to source code.

    Regards,
    Venkatesh
  • Hello Venkat,

    I have the access for source code, can you please share the instructions to build the lib and then run, I am awaiting for your response and can you please share ASAP.

    Regards,
    Venkatesh
  • Hello Venkat,

    Just want to remind you that I am waiting for the instructions to build the lib as I requested in my earlier mail.

    Regards,
    Venkatesh