G279 Crashing.

G279 Crashing.

Hi, I downloaded the speech proessing example code from the IPP page on intel.com. The example program in the zip "w_ipp-G729_p_4.0.005.zip" throws an access violation when giving any 8khz 16bit pcm audio data. However, on the assumption that it's the fault of the example program and not the IPP libray itself, I simply call the following 3 or 4 IPP functions and it crashes with an access violation:

int required_size;
apiG729Decoder_Alloc((G729Codec_Type)G729A_CODEC, &required_size);

G729Decoder_Obj* decoder_ = (G729Decoder_Obj*)ippsMalloc_8u(required_size);
apiG729Decoder_Init(decoder_, (G729Codec_Type)G729A_CODEC);

unsigned char* compressed_buffer;
// compressed_buffer is filled with data from a Cisco7960 IP phone...

short* decompressed_buffer;
// decompressed_buffer is setup...

apiG729Decode(
decoder_,
compressed_buffer,
G729A_CODEC,
decompressed_buffer);

The call to apiG729Decode() throws an access violation on line 1442 of file decg729.c, does anybody have any idea why?

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

Could you look to expert's answer below:

I may suggest two reasons for exception/violation:

1) First one, let consider the user code snippet: (cleaned out of &amr; etc)

int required_size;

apiG729Decoder_Alloc((G729Codec_Type)G729A_CODEC, required_size);

G729Decoder_Obj* decoder_ = (G729Decoder_Obj*)ippsMalloc_8u(required_size);

apiG729Decoder_Init(decoder_, (G729Codec_Type)G729A_CODEC);

unsigned char* compressed_buffer;// compressed_buffer is filled with data from a Cisco7960 IP phone...

short* decompressed_buffer;// decompressed_buffer is setup...

apiG729Decode(decoder_,compressed_buffer,G729A_CODEC,decompressed_buffer);

I see the bug in

apiG729Decoder_Alloc(..., &required_size);

2) and second one, just to clarify for user proper use of input data, g729 sample supports a raw pcm input for encoder and the ITU G.729 bitstream test format input for decoder. RTP storage format not supported so far.

Regards,
Vladimir

Hi Vladimir,
I think if you changed the code as you specify it wouldn't even compile, and if it did it, running it would crash. The "g729api.h" file defines the two Alloc functions as follows:
Code:

G729_CODECAPI(APIG729_Status, apiG729Encoder_Alloc, (G729Codec_Type codecType, int *pCodecSize))
G729_CODECAPI(APIG729_Status, apiG729Decoder_Alloc, (G729Codec_Type codecType, int *pCodecSize))

Clearly you pass the address of an integer to this function, not an integer. It's my understanding that this function calculates how many bytes you need to allocate and returns it to you via this pointer.
Raw PCM data is being read and fed into the encoder routines, not the decoder - sorry, i should have been more clear here. The raw PCM data is 16 bit mono data, and it's being read at the standard rate of 8khz.
The code is as follows

Code:

int required_size;
apiG729Encoder_Alloc((G729Codec_Type)G729A_CODEC, &required_size);
encoder_ = (G729Encoder_Obj*)ippsMalloc_8u(required_size);
apiG729Encoder_Init(encoder_, (G729Codec_Type)G729A_CODEC, G729Encode_VAD_Disabled);
int frametype;
apiG729Encode(
    encoder_,
    souce_data,
    dest_data,
    G729A_CODEC,
    &frametype);

souce_data is filled with raw PCM data (16 bit mono), and dest_data is bitstream that gets the compressed data. The function apiG729Encode crashes as noted previously when it executes the line:

Code:

/* Clause 3.2.1 Windowing and autocorrelation computation */
ippsAutoCorr_G729B(LPC_WINDOW, &norm,r_auto);

which can be found in the Intel supplied code in the file "encg729.c"

Hi,

I think it would be better, if you submit this issue through technical support, so itcan be tracked, analized and so on.

Thanks,
Vladimir

Hi,

How do I convert the bitstream format to the format expected by RTP?

Is it better to convert the frame or to modify the G.729 encoder so that is natively generates frames in the format I want?

Where can I find documentation for the 'bitstream' format currently in use?

Regards,

Daniel

Leave a Comment

Please sign in to add a comment. Not a member? Join today