📄 vq.h
字号:
/*
2.4 kbps MELP Proposed Federal Standard speech coder
Fixed-point C code, version 1.0
Copyright (c) 1998, Texas Instruments, Inc.
Texas Instruments has intellectual property rights on the MELP
algorithm. The Texas Instruments contact for licensing issues for
commercial and non-government use is William Gordon, Director,
Government Contracts, Texas Instruments Incorporated, Semiconductor
Group (phone 972 480 7442).
The fixed-point version of the voice codec Mixed Excitation Linear
Prediction (MELP) is based on specifications on the C-language software
simulation contained in GSM 06.06 which is protected by copyright and
is the property of the European Telecommunications Standards Institute
(ETSI). This standard is available from the ETSI publication office
tel. +33 (0)4 92 94 42 58. ETSI has granted a license to United States
Department of Defense to use the C-language software simulation contained
in GSM 06.06 for the purposes of the development of a fixed-point
version of the voice codec Mixed Excitation Linear Prediction (MELP).
Requests for authorization to make other use of the GSM 06.06 or
otherwise distribute or modify them need to be addressed to the ETSI
Secretariat fax: +33 493 65 47 16.
*/
/*
vq.h VQ include file.
(Search/decode/distortion/weighting functions for VQ)
Copyright (c) 1997 by Texas Instruments Incorporated. All rights reserved.
*/
#ifndef _vq_h_
#define _vq_h_
Shortword *vq_lspw(Shortword *w, Shortword *lsp, Shortword *a,
Shortword p);
Shortword vq_ms4(Shortword *cb, Shortword *u, Shortword *u_est,
Shortword *levels, Shortword ma, Shortword stages,
Shortword p, Shortword *w, Shortword *u_hat,
Shortword *indices, Shortword max_inner);
Shortword *vq_msd2(Shortword *cb, Shortword *u, Shortword *u_est,
Shortword *a, Shortword *indices, Shortword *levels,
Shortword stages, Shortword p, Shortword conversion,
Shortword diff_Q);
Longword vq_enc(Shortword *cb,Shortword *u,Shortword levels,Shortword p,
Shortword *u_hat,Shortword *indices);
void vq_fsw(Shortword *w_fs, Shortword num_harm, Shortword pitch);
/* Structure definition */
struct msvq_param { /* Multistage VQ parameters */
Shortword num_stages;
Shortword *num_levels;
Shortword *num_bits;
Shortword dimension;
Shortword num_best;
Shortword *indices;
char *fname_cb;
Shortword *cb;
Shortword *cb_mean;
};
/* External function definitions */
#define msvq_enc(u,w,u_hat,par)\
vq_ms4(par.cb,u,par.cb_mean,par.num_levels,\
par.num_best,par.num_stages,par.dimension,w,u_hat,\
par.indices,MSVQ_MAXCNT)
#define fsvq_enc(u,u_hat,par)\
vq_enc(par.cb,u,*(par.num_levels),\
par.dimension,u_hat,\
par.indices)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -