Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6621 Discussions

uscg711.c GetInfoU nPcmTypes should return 1?

jmatthewsr
Beginner
158 Views
There is only a single PCM record entry for G711 but GetInfoU will return 2 for

pInfo->nPcmTypes, which reads off the end of an array. GetInfoA is correct.

-justin

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
158 Views
Hello Justin,

Perhaps this forum thread will help answer the question:


Paul
jmatthewsr
Beginner
158 Views
Sorry, I still don't see how this can work without running off the end of the array.

uscg711.c GetInfoU() sets:

pInfo->nPcmTypes = 2;
pInfo->pPcmTypesTbl = pcmTypesTbl_G711;

A search for nPcmTypes shows a function SetUSCEncoderPCMType() iterating over the pcmTypesTbl_G711 using nPcmTypes as the upper bound:

for(i=0;ipInfo->nPcmTypes;i++) {

pcmTypesTbl_G711 has only 1 record.

What am I missing?

thanks.
Vyacheslav_Baranniko
New Contributor II
158 Views
Quoting - jmatthewsr
Sorry, I still don't see how this can work without running off the end of the array.

uscg711.c GetInfoU() sets:

pInfo->nPcmTypes = 2;
pInfo->pPcmTypesTbl = pcmTypesTbl_G711;

A search for nPcmTypes shows a function SetUSCEncoderPCMType() iterating over the pcmTypesTbl_G711 using nPcmTypes as the upper bound:

for(i=0;ipInfo->nPcmTypes;i++) {

pcmTypesTbl_G711 has only 1 record.

What am I missing?

thanks.

Hello,

thank you very much for using IPP USC codecs and finding a bug.
Thisis definitely a bug andit will be fixed in one of the nearest IPP samples release.

Vyacheslav, IPP speech
Reply