Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

uscg711.c GetInfoU nPcmTypes should return 1?

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

Perhaps this forum thread will help answer the question:


Paul
0 Kudos
jmatthewsr
Beginner
339 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.
0 Kudos
Vyacheslav_Baranniko
New Contributor II
339 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
0 Kudos
Reply