Пример #1
0
NsxHandle* WebRtcNsx_Create() {
  NoiseSuppressionFixedC* self = malloc(sizeof(NoiseSuppressionFixedC));
  WebRtcSpl_Init();
  self->real_fft = NULL;
  self->initFlag = 0;
  return (NsxHandle*)self;
}
Пример #2
0
VadInst* WebRtcVad_Create() {
  VadInstT* self = (VadInstT*)malloc(sizeof(VadInstT));

  WebRtcSpl_Init();
  self->init_flag = 0;

  return (VadInst*)self;
}
Пример #3
0
int16_t WebRtcIlbcfix_DecoderCreate(IlbcDecoderInstance **iLBC_decinst) {
  *iLBC_decinst=(IlbcDecoderInstance*)malloc(sizeof(IlbcDecoder));
  if (*iLBC_decinst!=NULL) {
    WebRtcSpl_Init();
    return(0);
  } else {
    return(-1);
  }
}
Пример #4
0
WebRtc_Word16 WebRtcIlbcfix_DecoderCreate(iLBC_decinst_t **iLBC_decinst) {
  *iLBC_decinst=(iLBC_decinst_t*)malloc(sizeof(iLBC_Dec_Inst_t));
  if (*iLBC_decinst!=NULL) {
    WebRtcSpl_Init();
    return(0);
  } else {
    return(-1);
  }
}
Пример #5
0
MS_PLUGIN_DECLARE ( void ) libmsisac_init() {
    char isac_version[64];
    isac_version[0] = 0;

    WebRtcSpl_Init();
    WebRtcIsacfix_version(isac_version);

    ms_filter_register ( &ms_isac_enc_desc );
    ms_filter_register ( &ms_isac_dec_desc );

    ms_message ( " libmsisac " VERSION " plugin loaded, iSAC codec version %s", isac_version );
}
int WebRtcNsx_Create(NsxHandle** nsxInst) {
  NsxInst_t* self = malloc(sizeof(NsxInst_t));
  *nsxInst = (NsxHandle*)self;

  if (self != NULL) {
    WebRtcSpl_Init();
    self->real_fft = NULL;
    self->initFlag = 0;
    return 0;
  } else {
    return -1;
  }

}
Пример #7
0
int16_t WebRtcIsacfix_Create(ISACFIX_MainStruct **ISAC_main_inst)
{
  ISACFIX_SubStruct *tempo;
  tempo = malloc(1 * sizeof(ISACFIX_SubStruct));
  *ISAC_main_inst = (ISACFIX_MainStruct *)tempo;
  if (*ISAC_main_inst!=NULL) {
    (*(ISACFIX_SubStruct**)ISAC_main_inst)->errorcode = 0;
    (*(ISACFIX_SubStruct**)ISAC_main_inst)->initflag = 0;
    (*(ISACFIX_SubStruct**)ISAC_main_inst)->ISACenc_obj.SaveEnc_ptr = NULL;
    WebRtcSpl_Init();
    return(0);
  } else {
    return(-1);
  }
}
Пример #8
0
int16_t WebRtcIlbcfix_InitEncode(  /* (o) Number of bytes encoded */
    iLBC_Enc_Inst_t *iLBCenc_inst,  /* (i/o) Encoder instance */
    int16_t mode) {  /* (i) frame size mode */
  WebRtcSpl_Init();
  iLBCenc_inst->mode = mode;

  /* Set all the variables that are dependent on the frame size mode */
  if (mode==30) {
    iLBCenc_inst->blockl = BLOCKL_30MS;
    iLBCenc_inst->nsub = NSUB_30MS;
    iLBCenc_inst->nasub = NASUB_30MS;
    iLBCenc_inst->lpc_n = LPC_N_30MS;
    iLBCenc_inst->no_of_bytes = NO_OF_BYTES_30MS;
    iLBCenc_inst->no_of_words = NO_OF_WORDS_30MS;
    iLBCenc_inst->state_short_len=STATE_SHORT_LEN_30MS;
  }
  else if (mode==20) {
    iLBCenc_inst->blockl = BLOCKL_20MS;
    iLBCenc_inst->nsub = NSUB_20MS;
    iLBCenc_inst->nasub = NASUB_20MS;
    iLBCenc_inst->lpc_n = LPC_N_20MS;
    iLBCenc_inst->no_of_bytes = NO_OF_BYTES_20MS;
    iLBCenc_inst->no_of_words = NO_OF_WORDS_20MS;
    iLBCenc_inst->state_short_len=STATE_SHORT_LEN_20MS;
  }
  else {
    return(-1);
  }

  /* Clear the buffers and set the previous LSF and LSP to the mean value */
  WebRtcSpl_MemSetW16(iLBCenc_inst->anaMem, 0, LPC_FILTERORDER);
  WEBRTC_SPL_MEMCPY_W16(iLBCenc_inst->lsfold, WebRtcIlbcfix_kLsfMean, LPC_FILTERORDER);
  WEBRTC_SPL_MEMCPY_W16(iLBCenc_inst->lsfdeqold, WebRtcIlbcfix_kLsfMean, LPC_FILTERORDER);
  WebRtcSpl_MemSetW16(iLBCenc_inst->lpc_buffer, 0, LPC_LOOKBACK + BLOCKL_MAX);

  /* Set the filter state of the HP filter to 0 */
  WebRtcSpl_MemSetW16(iLBCenc_inst->hpimemx, 0, 2);
  WebRtcSpl_MemSetW16(iLBCenc_inst->hpimemy, 0, 4);

#ifdef SPLIT_10MS
  /*Zeroing the past samples for 10msec Split*/
  WebRtcSpl_MemSetW16(iLBCenc_inst->past_samples,0,160);
  iLBCenc_inst->section = 0;
#endif

  return (iLBCenc_inst->no_of_bytes);
}
Пример #9
0
int WebRtcVad_Create(VadInst** handle) {
  VadInstT* self = NULL;

  if (handle == NULL) {
    return -1;
  }

  *handle = NULL;
  self = (VadInstT*) malloc(sizeof(VadInstT));
  *handle = (VadInst*) self;

  if (self == NULL) {
    return -1;
  }

  WebRtcSpl_Init();

  self->init_flag = 0;

  return 0;
}
Пример #10
0
MS_PLUGIN_DECLARE ( void ) libmswebrtc_init() {
#ifdef BUILD_ISAC
	char isac_version[64];
	isac_version[0] = 0;
#endif

	WebRtcSpl_Init();

#ifdef BUILD_ISAC
	WebRtcIsacfix_version(isac_version);
	ms_filter_register(&ms_isac_enc_desc);
	ms_filter_register(&ms_isac_dec_desc);
#endif
#ifdef BUILD_AEC
	ms_filter_register(&ms_webrtc_aec_desc);
#endif

	ms_message("libmswebrtc " VERSION " plugin loaded"
#ifdef BUILD_ISAC
	", iSAC codec version %s", isac_version
#endif
	);
}