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

problem with G.722.1 codec

Balakrishna_Jd
Beginner
555 Views

Hello all,

I'm using the IPP library of the year 2005-2006(As per the source code not sure about the version). As per the documentation it has support for

- "G.722 speech codec" (g722sb.h & g722sbapi.h)

- "G.722.1 speech codec" (g722.h & g722api.h)

I'm able to encode/decode the tone samples using g722sbapi.h api calls. However the same PCM samples are not working to encode or decode with g722api.h api calls. My observation is after apiG722Decode func, pDst data is '0'.

The APIs used for G.722.1 are as given below:

G722_CODECAPI( APIG722_Status, apiG722Encode, (G722Encoder_Obj* pEncoderObj,

Ipp32s nBitsPerFrame, Ipp16s *pSrc, Ipp16s *pDst))

G722_CODECAPI( APIG722_Status, apiG722Decode, (G722Decoder_Obj* pDecoderObj,

Ipp16s errFlag, Ipp32s nBitsPerFrame, Ipp16s *pSrc, Ipp16s *pDst))

The following is the sample code explaining how we are trying to use for encoding 722.1:

================= =========

G722Encoder_Obj *encoderObj;

Ipp32u size;

APIG722_Status status;

apiG722Encoder_Alloc(&size);

encoderObj = (G722Encoder_Obj *)ippsMalloc_8u(size);

if (NULL == encoderObj) {

throw "out of memory";

}

apiG722Encoder_Init(encoderObj);

status = apiG722Encode(encoderObj, inbufLen, inbuf, (Ipp16s *)outbufr);

if (APIG722_StsNoErr != status) {

ippsFree(encoderObj);

throw "apiG722Encode() failed error";

}

ippsFree(encoderObj);

For decoding:
apiG722Decoder_Alloc(&size1);

decoderStateBuf = ippsMalloc_8u(size1);

apiG722Decoder_Init((G722Decoder_Obj*)decoderStateBuf);

apiG722Decode((G722Decoder_Obj*)decoderStateBuf,

1, 160, (Ipp16s *)payloadPtr, (Ipp16s *)pcmSamples);

============== ===========

Please let me know if there is anything wrong with my code.

Thanks in advane,
Balakrishna

0 Kudos
4 Replies
Vladimir_Dudnik
Employee
555 Views
Hello,

could you please clarify what version of IPP do you use? If that is not the latest one, is there possibility for you to check IPP 7.0.1 version?

Regards,
Vladimir
0 Kudos
Balakrishna_Jd
Beginner
555 Views
Hi Vladimir,

Really appreciateyour quick response.

I amusing version windows 6.1 (ESD).We do not have any possibility to check in IPP 7.0.1.

Does it mean G.722.1 is not supported inearlier versions of IPP 7.0.1?

Also pls let me know the procedure i'm following for G.722.1 is correct. I dont have IPP 7.0.1. Also i'm using IPP 6.1 for somany other codec modules in the same code base. Upgrading might lead to possible integration issues and testing effort

Thanks
Bala
0 Kudos
Balakrishna_Jd
Beginner
555 Views
Hi Vladimir,

I just checked for the version in the code and in "ippversion.h" i see the following string defined

IPP_VERSION_STR "5.2"


Thanks,
Bala
0 Kudos
Vladimir_Dudnik
Employee
555 Views
Hi Bala,

G.722 codec was supported in IPP 5.2. The problem is that we can try to help you with the latest version of IPP but not that much with five years old version. Product from 2005 is out of technical support terms defined by the license once you have bought it.

Regards,
Vladimir
0 Kudos
Reply