/*====================================================================*/
/* MPEG-4 Audio (ISO/IEC 14496-3) Copyright Header */
/*====================================================================*/
/*
This software module was originally developed by Rakesh Taori and Andy
Gerrits (Philips Research Laboratories, Eindhoven, The Netherlands) in
the course of development of the MPEG-4 Audio (ISO/IEC 14496-3). This
software module is an implementation of a part of one or more MPEG-4
Audio (ISO/IEC 14496-3) tools as specified by the MPEG-4 Audio
(ISO/IEC 14496-3). ISO/IEC gives users of the MPEG-4 Audio (ISO/IEC
14496-3) free license to this software module or modifications thereof
for use in hardware or software products claiming conformance to the
MPEG-4 Audio (ISO/IEC 14496-3). Those intending to use this software
module in hardware or software products are advised that its use may
infringe existing patents. The original developer of this software
module and his/her company, the subsequent editors and their
companies, and ISO/IEC have no liability for use of this software
module or modifications thereof in an implementation. Copyright is not
released for non MPEG-4 Audio (ISO/IEC 14496-3) conforming products.
CN1 retains full right to use the code for his/her own purpose, assign
or donate the code to a third party and to inhibit third parties from
using the code for non MPEG-4 Audio (ISO/IEC 14496-3) conforming
products. This copyright notice must be included in all copies or
derivative works. Copyright 1996.
*/
/*====================================================================*/
/*======================================================================*/
/* */
/* SOURCE_FILE: PHI_LPC.C */
/* PACKAGE: WDBxx */
/* COMPONENT: Linear Prediction Subroutines */
/* */
/*======================================================================*/
/*======================================================================*/
/* I N C L U D E S */
/*======================================================================*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <malloc.h>
#include <float.h>
#include <assert.h>
#include "buffersHandle.h" /* handler, defines, enums */
#include "bitstream.h"
#include "phi_cons.h"
#include "phi_priv.h"
#include "phi_lpc.h"
#include "phi_lpcq.h"
#include "phi_lsfr.h"
#include "nec_abs_proto.h"
#include "pan_celp_const.h"
#include "pan_celp_proto.h"
#include "att_proto.h"
#include "nec_abs_const.h"
#include "nec_lspnw20.tbl"
#define NEC_PAI 3.141592
#define NEC_LSPPRDCT_ORDER 4
#define NEC_NUM_LSPSPLIT1 2
#define NEC_NUM_LSPSPLIT2 4
#define NEC_QLSP_CAND 2
#define NEC_LSP_MINWIDTH_FRQ16 0.028
#define NEC_MAX_LSPVQ_ORDER 20
#define DEBUG_YM /* flag for halting LPC analysis : '98/11/27 */
/*======================================================================*/
/* L O C A L F U N C T I O N S P R O T O T Y P E S */
/*======================================================================*/
/*======================================================================*/
/* Modified Panasonic/NEC functions */
/*======================================================================*/
static void mod_nec_lsp_sort( float x[], long order , PHI_PRIV_TYPE *PHI_Priv);
/*======================================================================*/
static void mod_nec_psvq( float *, float *, float *,
long, long, float *, long *, long );
/*======================================================================*/
static void mod_nb_abs_lsp_quantizer (
float current_lsp[], /* in: current LSP to be quantized */
float previous_Qlsp[], /* In: previous Quantised LSP */
float current_Qlsp[], /* out: quantized LSP */
long lpc_indices[], /* out: LPC code indices */
long lpc_order, /* in: order of LPC */
long num_lpc_indices, /* in: number of LPC indices */
long n_lpc_analysis /* in: number of LP analysis per frame */
);
/*======================================================================*/
static void mod_nec_bws_lsp_quantizer(
float lsp[], /* input */
float qlsp8[], /* input */
float qlsp[], /* output */
long indices[], /* output */
long lpc_order, /* configuration input */
long lpc_order_8, /* configuration input */
long num_lpc_indices, /* configuration input */
float blsp[NEC_LSPPRDCT_ORDER][NEC_MAX_LSPVQ_ORDER],
PHI_PRIV_TYPE *PHI_Priv /* In/Out: PHI private data (instance context) */
);
/*======================================================================*/
static void mod_nb_abs_lsp_decode(
unsigned long lpc_indices[], /* in: LPC code indices */
float prev_Qlsp[], /* in: previous LSP vector */
float current_Qlsp[], /* out: quantized LSP vector */
long lpc_order, /* in: order of LPC */
long num_lpc_indices /* in: number of LPC indices */
);
/*======================================================================*/
static void mod_nec_bws_lsp_decoder(
unsigned long indices[], /* input */
float qlsp8[], /* input */
float qlsp[], /* output */
long lpc_order, /* configuration input */
long lpc_order_8, /* configuration input */
long num_lpc_indices, /* configuration input */
float blsp[NEC_LSPPRDCT_ORDER][NEC_MAX_LSPVQ_ORDER],
PHI_PRIV_TYPE *PHI_Priv /* In/Out: PHI private data (instance context) */
);
/*======================================================================*/
static void mod_wb_celp_lsp_quantizer (
float current_lsp[], /* in: current LSP to be quantized */
float previous_Qlsp[], /* In: previous Quantised LSP */
float current_Qlsp[], /* out: quantized LSP */
long lpc_indices[], /* out: LPC code indices */
long lpc_order, /* in: order of LPC */
long num_lpc_indices, /* in: number of LPC indices */
long n_lpc_analysis /* in: number of LP analysis per frame */
);
/*======================================================================*/
static void mod_wb_celp_lsp_decode(
unsigned long lpc_indices[], /* in: LPC code indices */
float prev_Qlsp[], /* in: previous LSP vector */
float current_Qlsp[], /* out: quantized LSP vector */
long lpc_order, /* in: order of LPC */
long num_lpc_indices /* in: number of LPC indices */
);
/*======================================================================*/
/* Function Prototype: PHI_Apar2Rfc */
/*======================================================================*/
static void PHI_Apar2Rfc
(
int P, /* In: LPC Order */
float ap[], /* In: Polynomial coefficients [0..P-1] */
float rfc[] /* Out: Reflection coefficients [0..P-1] */
);
/*======================================================================*/
/* Function Prototype: PHI_Rfc2Apar */
/*======================================================================*/
static void PHI_Rfc2Apar
(
int P, /* In: LPC Order */
float rq[], /* In: Reflection coefficients [0..P-1] */
float aq[] /* Out: a-parameters [0..P-1] */
);
/*================================================
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
MPEG-4音频参考程序.gz_c6000_c语言编程_视频编解码_音频 视频 (396个子文件)
20b19s48bs 15KB
20b19s48sc 15KB
phi_lpc.c 127KB
scal_dec_frame.c 97KB
enc_tf.c 94KB
celp_encoder.c 86KB
mp4audec.c 74KB
dec_tf.c 73KB
scal_enc_frame.c 61KB
ntt_tf_proc_spectrum.c 60KB
aac_qc.c 49KB
celp_decoder.c 46KB
ntt_scale_coder.c 44KB
huffdec2.c 43KB
hufftables.c 42KB
bitstream.c 41KB
phi_xits.c 36KB
hvxcPchEnc.c 35KB
ntt_tools.c 34KB
ntt_vq_coder.c 33KB
nok_ltp_enc.c 31KB
mp4auenc.c 31KB
hvxcDec.c 28KB
dec_par.c 28KB
enc_par.c 26KB
imdct.c 26KB
dec_lpc.c 25KB
config.c 25KB
enc_lpc.c 24KB
nok_lt_prediction.c 24KB
nok_bwp_enc.c 23KB
decoder_tf.c 23KB
plotmtv_interf.c 22KB
bitmux.c 22KB
pan_lspqtz2_dd.c 22KB
nb_celp_enc.c 22KB
cmdline.c 21KB
hvxcEnc.c 21KB
hvxcVExtGenDec.c 20KB
tns3.c 20KB
tvqAUDecode.c 20KB
mp4ifc.c 19KB
flex_mux.c 18KB
phi_lsfr.c 18KB
hvxcVxcEnc.c 18KB
nok_prediction.c 18KB
phi_nec_lpc.c 18KB
phi_axit.c 18KB
ntt_tf_quantize_spectrum.c 18KB
pan_picola.c 18KB
monopred.c 17KB
psych.c 16KB
nb_celp_dec.c 16KB
audio.c 15KB
hvxcFExtEnc.c 15KB
coupling.c 14KB
nec_exc_mp_enc.c 14KB
hvxcFltDec.c 14KB
transfo.c 13KB
nok_pitch.c 13KB
huffdec1.c 13KB
hvxcQAmEnc.c 12KB
phi_gxit.c 12KB
ntt_TfInit.c 12KB
phi_apre.c 12KB
tf_celp_dmy.c 12KB
nec_abs_exc_analysis.c 11KB
nec_exc_module.c 11KB
att_pc2lsf.c 11KB
nec_bws_qlsp_enc.c 11KB
nec_bws_mp_enc.c 11KB
ntt_headerdec.c 10KB
hvxcQAmDec.c 10KB
ntt_scale_init.c 10KB
ntt_tf_pre_process.c 10KB
nec_enh_mp_enc.c 10KB
decdata.c 10KB
ntt_scale_tf_proc_spectrum_d.c 10KB
ntt_scale_vq_coder.c 9KB
nec_bws_exc_analysis.c 9KB
ntt_tf_proc_spectrum_d.c 9KB
celp_bitstream_demux.c 9KB
son_gc_common.c 9KB
ntt_BitUnPack.c 9KB
mod_buf.c 9KB
phi_post.c 8KB
son_gc_detecter.c 8KB
austream.c 8KB
enc_g723.c 8KB
celp_bitstream_mux.c 8KB
hvxcFPExtEnc.c 8KB
nec_exc_mp_config.c 8KB
pns.c 8KB
huffinit.c 8KB
phi_fbit.c 8KB
ntt_tf_perceptual_model.c 8KB
ntt_BitPack.c 8KB
hvxcVUVEnc.c 8KB
nec_abs_exc_generation.c 8KB
nec_bws_gain_enc.c 8KB
共 396 条
- 1
- 2
- 3
- 4
资源评论
weixin_42653672
- 粉丝: 92
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功