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.

G722 provides wrong data

Hi,

I'm trying to integrate with the g722 library from TI on my C6748. I did the unit test according to the given example and it was fine. Now I'm doing the same on my real system and get garbage instead.

I has two task in my system, one is init task which run at the beggining and initializing all the g722 and then another task which processing the data.

I insert sin of 1k at 16k sample rate: 

[32767 30274 23170 12540 0 -12540 -23170 -30274 -32768 -30274 -23170
-12540 0 12540 23170 30274 32767 30274 23170 12540 0 -12540
-23170 -30274 -32768 -30274 -23170 -12540 0 12540 23170 30274 32767
30274 23170 12540 0 -12540 -23170 -30274 -32768 -30274 -23170 -12540
0 12540 23170 30274 32767 30274 23170 12540 0 -12540 -23170
-30274 -32768 -30274 -23170 -12540 0 12540 23170 30274 32767 30274
23170 12540 0 -12540 -23170 -30274 -32768 -30274 -23170 -12540 0
12540 23170 30274 32767 30274 23170 12540 0 -12540 -23170 -30274
-32768 -30274 -23170 -12540 0 12540 23170 30274 32767 30274 23170
12540 0 -12540 -23170 -30274 -32768 -30274 -23170 -12540 0 12540
23170 30274 32767 30274 23170 12540 0 -12540 -23170 -30274 -32768
-30274 -23170 -12540 0 12540 23170 30274 32767 30274 23170 12540
0 -12540 -23170 -30274 -32768 -30274 -23170 -12540 0 12540 23170
30274 32767 30274 23170 12540 0 -12540 -23170 -30274 -32768 -30274
-23170 -12540 0 12540 23170 30274];

And the output from decoder is like that:

[-32768 6329 -32768 13980 -5417 28178 -28098 30234 -32768 8064 -32768
17449 16171 20675 -32768 32398 -32768 2968 8648 12075 32767 -7373
-9477 3899 -32768 11211 17714 4578 32767 -13544 -11763 3475 -29439
-65 15250 661 32316 -2286 -32768 -1041 2559 792 32767 1134
1680 -3415 -32768 -948 32767 1727 32767 772 6723 -4333 -32768
-2075 32767 1727 32767 -123 32767 -2316 -32768 -1348 30269 1442
32767 -815 32767 -1771 -32768 -1476 9976 850 15389 -275 28652
-721 -22872 -803 -1273 207 11855 8165 -32768 3737 7239 3537
-415 -386 12733 5023 -32768 9925 -32768 9076 32767 19366 17768
32767 -32768 32767 -32768 32767 32767 -3351 32767 -13315 -32768 20111
-32768 32767 32767 14556 32767 13405 -24788 19789 -32768 -32768 -28128
-5697 32767 18074 -30924 32767 -32768 -11534 -32768 13486 -27492 15898
-26911 29899 7830 -20186 787 -25639 -32768 25820 -27223 15889 32767
-3456 -32768 8630 -32768 -264 -30655 11779 -32768 29690 -32768 32767
-28528 -5986 -28140 4748 -32768 32767];

 which is totally wrong. What could be the problem.

 Attached functions I'm using for the init and the processing.

Thanks,

Pavel

  • Hi,

      Can you please provide absolute values of the configuration parameters including inArgs and outArgs? We could not get the actual values of your definition. Codec was tested for number of streams including tones(like your test case of 1KHz sine wave). Probably the issue is due to incorrect encoder/decoder configuration.

    thanks,

    Venkat

  • Hi,

    All the configuration and calls I do you may find in the attached file to the post (code_c_g722.txt).

    I wandering is there any memory issues I need to consider? When I tested the codec as unit test I put it all in IRAM but on the real system I'm using external DDR memory with L2 caching. Also the output from the codec is wrong the return status from the init and process is ISPHENC1_EOK.

    Regards,

    Pavel

  • Apologies for the delayed response.

     We checked G722 again and it works fine. From your attachment, we did not get absolute values for some of the configurations. # define is used at places, we need absolute values of each of the configurations to replicate the issue at our end.

    thanks,

    Venkat