- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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?
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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:
G729_CODECAPI(APIG729_Status, apiG729Encoder_Alloc, (G729Codec_Type codecType, int *pCodecSize)) G729_CODECAPI(APIG729_Status, apiG729Decoder_Alloc, (G729Codec_Type codecType, int *pCodecSize))
The code is as follows
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);
/* Clause 3.2.1 Windowing and autocorrelation computation */ ippsAutoCorr_G729B(LPC_WINDOW, &norm,r_auto);
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I took Damian's source code as template and it also crashed. The reason is missing calls to apiG729Encoder_InitBuffer and apiG729Decoder_InitBuffer. Useful template code can be found at https://github.com/vir/yate-g72X-ipp/blob/master/g729codec.cpp
Kind regards,
Ulrich
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Dear Ulrich and All,
thanks for the update and sharing.
Just notes, the speech codec functionality including G729 were deprecated from IPP 8.0 version (2 years before). So no further investigate on all of the related questions. Sorry for the bad news.
Best Regards,
Ying

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite