void g729_init_lib(){ #ifdef IPPCORE_STATIC_INIT ippStaticInit(); #endif apiG729Decoder_Alloc(G729A_CODEC, &decoder_size); apiG729Encoder_Alloc(G729A_CODEC, &encoder_size); apiG729Codec_ScratchMemoryAlloc(&coder_size_scratch); }
static USC_Status MemAlloc(const USC_Option *options, USC_MemBank *pBanks) { unsigned int nbytes; pBanks->pMem = NULL; if (options->direction == 0) /* encode only */ { apiG729Encoder_Alloc(options->modes.bitrate, &nbytes); pBanks->nbytes = nbytes+sizeof(int); /* include direction in handle */ } else if (options->direction == 1) /* decode only */ { apiG729Decoder_Alloc(options->modes.bitrate, &nbytes); pBanks->nbytes = nbytes+sizeof(int); /* include direction in handle */ } else { return USC_NoOperation; } return USC_NoError; }