Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6671 Discussions

uscg711.c GetInfoU nPcmTypes should return 1?

jmatthewsr
Beginner
204 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
204 Views
Hello Justin,

Perhaps this forum thread will help answer the question:


Paul
jmatthewsr
Beginner
204 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
204 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