📄 pvamrwbdecoder_acelp.h
字号:
/* ------------------------------------------------------------------ * Copyright (C) 2008 PacketVideo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. * See the License for the specific language governing permissions * and limitations under the License. * ------------------------------------------------------------------- *//****************************************************************************************Portions of this file are derived from the following 3GPP standard: 3GPP TS 26.173 ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec Available from http://www.3gpp.org(C) 2007, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)Permission to distribute, modify and use this file under the standard licenseterms listed above has been obtained from the copyright holder.****************************************************************************************//*------------------------------------------------------------------------------ Pathname: ./cpp/include/pvamrwbdecoder_acelp.h Date: 01/04/2007------------------------------------------------------------------------------ REVISION HISTORY Description:------------------------------------------------------------------------------ INCLUDE DESCRIPTION------------------------------------------------------------------------------*/#ifndef PVAMRWBDECODER_ACELP_H#define PVAMRWBDECODER_ACELP_H/*----------------------------------------------------------------------------; INCLUDES----------------------------------------------------------------------------*/#include "pv_amr_wb_type_defs.h"#include "pvamrwbdecoder_mem_funcs.h"#ifdef __cplusplusextern "C"{#endif /*-----------------------------------------------------------------* * LPC prototypes * *-----------------------------------------------------------------*/ void isf_extrapolation(int16 HfIsf[]); void Init_Lagconc(int16 lag_hist[]); void lagconceal( int16 gain_hist[], /* (i) : Gain history */ int16 lag_hist[], /* (i) : Subframe size */ int16 * T0, int16 * old_T0, int16 * seed, int16 unusable_frame ); void agc2_amr_wb( int16 * sig_in, /* input : postfilter input signal */ int16 * sig_out, /* in/out: postfilter output signal */ int16 l_trm /* input : subframe size */ ); void low_pass_filt_7k_init(int16 mem[]); void low_pass_filt_7k( int16 signal[], /* input: signal */ int16 lg, /* input: length of input */ int16 mem[], /* in/out: memory (size=30) */ int16 x[] ); int16 median5(int16 x[]); void Isp_Az( int16 isp[], /* (i) Q15 : Immittance spectral pairs */ int16 a[], /* (o) Q12 : predictor coefficients (order = M) */ int16 m, int16 adaptive_scaling /* (i) 0 : adaptive scaling disabled */ /* 1 : adaptive scaling enabled */ ); void Isf_isp( int16 isf[], /* (i) Q15 : isf[m] normalized (range: 0.0<=val<=0.5) */ int16 isp[], /* (o) Q15 : isp[m] (range: -1<=val<1) */ int16 m /* (i) : LPC order */ ); void interpolate_isp( int16 isp_old[], /* input : isps from past frame */ int16 isp_new[], /* input : isps from present frame */ const int16 frac[], /* input : fraction for 3 first subfr (Q15) */ int16 Az[] /* output: LP coefficients in 4 subframes */ ); void weight_amrwb_lpc( int16 a[], /* (i) Q12 : a[m+1] LPC coefficients */ int16 ap[], /* (o) Q12 : Spectral expanded LPC coefficients */ int16 gamma, /* (i) Q15 : Spectral expansion factor. */ int16 m /* (i) : LPC order. */ ); /*-----------------------------------------------------------------* * isf quantizers * *-----------------------------------------------------------------*/ void Disf_ns( int16 * indice, /* input: quantization indices */ int16 * isf_q /* input : ISF in the frequency domain (0..0.5) */ ); void Dpisf_2s_46b( int16 * indice, /* input: quantization indices */ int16 * isf_q, /* output: quantized ISF in frequency domain (0..0.5) */ int16 * past_isfq, /* i/0 : past ISF quantizer */ int16 * isfold, /* input : past quantized ISF */ int16 * isf_buf, /* input : isf buffer */ int16 bfi, /* input : Bad frame indicator */ int16 enc_dec ); void Dpisf_2s_36b( int16 * indice, /* input: quantization indices */ int16 * isf_q, /* output: quantized ISF in frequency domain (0..0.5) */ int16 * past_isfq, /* i/0 : past ISF quantizer */ int16 * isfold, /* input : past quantized ISF */ int16 * isf_buf, /* input : isf buffer */ int16 bfi, /* input : Bad frame indicator */ int16 enc_dec ); void Reorder_isf( int16 * isf, /* (i/o) Q15: ISF in the frequency domain (0..0.5) */ int16 min_dist, /* (i) Q15 : minimum distance to keep */ int16 n /* (i) : number of ISF */ ); /*-----------------------------------------------------------------* * filter prototypes * *-----------------------------------------------------------------*/ void oversamp_12k8_to_16k_init( int16 mem[] /* output: memory (2*NB_COEF_UP) set to zeros */ ); void oversamp_12k8_to_16k( int16 sig12k8[], /* input: signal to oversampling */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -