git-svn-id: http://webrtc.googlecode.com/svn/trunk@156 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
141
src/modules/audio_coding/codecs/iSAC/fix/source/codec.h
Normal file
141
src/modules/audio_coding/codecs/iSAC/fix/source/codec.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
/*
|
||||
* codec.h
|
||||
*
|
||||
* This header file contains the calls to the internal encoder
|
||||
* and decoder functions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_
|
||||
|
||||
#include "structs.h"
|
||||
|
||||
|
||||
int WebRtcIsacfix_EstimateBandwidth(BwEstimatorstr *bwest_str,
|
||||
Bitstr_dec *streamdata,
|
||||
WebRtc_Word32 packet_size,
|
||||
WebRtc_UWord16 rtp_seq_number,
|
||||
WebRtc_UWord32 send_ts,
|
||||
WebRtc_UWord32 arr_ts);
|
||||
|
||||
WebRtc_Word16 WebRtcIsacfix_DecodeImpl(WebRtc_Word16 *signal_out16,
|
||||
ISACFIX_DecInst_t *ISACdec_obj,
|
||||
WebRtc_Word16 *current_framesamples);
|
||||
|
||||
WebRtc_Word16 WebRtcIsacfix_DecodePlcImpl(WebRtc_Word16 *decoded,
|
||||
ISACFIX_DecInst_t *ISACdec_obj,
|
||||
WebRtc_Word16 *current_framesample );
|
||||
|
||||
int WebRtcIsacfix_EncodeImpl(WebRtc_Word16 *in,
|
||||
ISACFIX_EncInst_t *ISACenc_obj,
|
||||
BwEstimatorstr *bw_estimatordata,
|
||||
WebRtc_Word16 CodingMode);
|
||||
|
||||
int WebRtcIsacfix_EncodeStoredData(ISACFIX_EncInst_t *ISACenc_obj,
|
||||
int BWnumber,
|
||||
float scale,
|
||||
WebRtc_Word16 CodingMode);
|
||||
|
||||
/************************** initialization functions *************************/
|
||||
|
||||
void WebRtcIsacfix_InitMaskingEnc(MaskFiltstr_enc *maskdata);
|
||||
void WebRtcIsacfix_InitMaskingDec(MaskFiltstr_dec *maskdata);
|
||||
|
||||
void WebRtcIsacfix_InitPreFilterbank(PreFiltBankstr *prefiltdata);
|
||||
|
||||
void WebRtcIsacfix_InitPostFilterbank(PostFiltBankstr *postfiltdata);
|
||||
|
||||
void WebRtcIsacfix_InitPitchFilter(PitchFiltstr *pitchfiltdata);
|
||||
|
||||
void WebRtcIsacfix_InitPitchAnalysis(PitchAnalysisStruct *State);
|
||||
|
||||
void WebRtcIsacfix_InitPlc( PLCstr *State );
|
||||
|
||||
|
||||
/**************************** transform functions ****************************/
|
||||
|
||||
void WebRtcIsacfix_InitTransform();
|
||||
|
||||
|
||||
void WebRtcIsacfix_Time2Spec(WebRtc_Word16 *inre1Q9,
|
||||
WebRtc_Word16 *inre2Q9,
|
||||
WebRtc_Word16 *outre,
|
||||
WebRtc_Word16 *outim);
|
||||
|
||||
|
||||
|
||||
void WebRtcIsacfix_Spec2Time(WebRtc_Word16 *inreQ7,
|
||||
WebRtc_Word16 *inimQ7,
|
||||
WebRtc_Word32 *outre1Q16,
|
||||
WebRtc_Word32 *outre2Q16);
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************** filterbank functions **************************/
|
||||
|
||||
|
||||
|
||||
void WebRtcIsacfix_SplitAndFilter1(WebRtc_Word16 *in,
|
||||
WebRtc_Word16 *LP16,
|
||||
WebRtc_Word16 *HP16,
|
||||
PreFiltBankstr *prefiltdata);
|
||||
|
||||
void WebRtcIsacfix_FilterAndCombine1(WebRtc_Word16 *tempin_ch1,
|
||||
WebRtc_Word16 *tempin_ch2,
|
||||
WebRtc_Word16 *out16,
|
||||
PostFiltBankstr *postfiltdata);
|
||||
|
||||
#ifdef NB_CALLS
|
||||
|
||||
void WebRtcIsacfix_SplitAndFilter2(WebRtc_Word16 *in,
|
||||
WebRtc_Word16 *LP16,
|
||||
WebRtc_Word16 *HP16,
|
||||
PreFiltBankstr *prefiltdata);
|
||||
|
||||
void WebRtcIsacfix_FilterAndCombine2(WebRtc_Word16 *tempin_ch1,
|
||||
WebRtc_Word16 *tempin_ch2,
|
||||
WebRtc_Word16 *out16,
|
||||
PostFiltBankstr *postfiltdata,
|
||||
WebRtc_Word16 len);
|
||||
|
||||
#endif
|
||||
|
||||
/************************* normalized lattice filters ************************/
|
||||
|
||||
|
||||
void WebRtcIsacfix_NormLatticeFilterMa(WebRtc_Word16 orderCoef,
|
||||
WebRtc_Word32 *stateGQ15,
|
||||
WebRtc_Word16 *lat_inQ0,
|
||||
WebRtc_Word16 *filt_coefQ15,
|
||||
WebRtc_Word32 *gain_lo_hiQ17,
|
||||
WebRtc_Word16 lo_hi,
|
||||
WebRtc_Word16 *lat_outQ9);
|
||||
|
||||
|
||||
void WebRtcIsacfix_NormLatticeFilterAr(WebRtc_Word16 orderCoef,
|
||||
WebRtc_Word16 *stateGQ0,
|
||||
WebRtc_Word32 *lat_inQ25,
|
||||
WebRtc_Word16 *filt_coefQ15,
|
||||
WebRtc_Word32 *gain_lo_hiQ17,
|
||||
WebRtc_Word16 lo_hi,
|
||||
WebRtc_Word16 *lat_outQ0);
|
||||
|
||||
int WebRtcIsacfix_AutocorrFix(WebRtc_Word32 *r,
|
||||
const WebRtc_Word16 *x,
|
||||
WebRtc_Word16 N,
|
||||
WebRtc_Word16 order,
|
||||
WebRtc_Word16 *scale);
|
||||
|
||||
#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_ */
|
||||
Reference in New Issue
Block a user