📄 bsynz.c
字号:
/*
$Log: bsynz.c,v $
Revision 1.1 2006/06/26 03:02:51 joegenbaclor
I have decided to include the latest development realease of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development. This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.
Revision 2.2 2005/08/08 03:28:41 dereksmithies
Eradicate all "/ * within comments" messages from GCC compilations.
Revision 2.1 2003/03/14 09:53:26 robertj
Updated to openH323 v1.11.7
Revision 1.2 2002/02/15 03:57:55 yurik
Warnings removed during compilation, patch courtesy of Jehan Bing, jehan@bravobrava.com
Revision 1.1 2000/06/05 04:45:12 robertj
Added LPC-10 2400bps codec
* Revision 1.2 1996/08/20 20:18:55 jaf
* Removed all static local variables that were SAVE'd in the Fortran
* code, and put them in struct lpc10_decoder_state that is passed as an
* argument.
*
* Removed init function, since all initialization is now done in
* init_lpc10_decoder_state().
*
* Revision 1.1 1996/08/19 22:32:58 jaf
* Initial revision
*
*/
#ifdef P_R_O_T_O_T_Y_P_E_S
extern int bsynz_(real *coef, integer *ip, integer *iv, real *sout, real *rms, real *ratio, real *g2pass, struct lpc10_decoder_state *st);
/* comlen contrl_ 12 */
/*:ref: random_ 4 0 */
#endif
/* -- translated by f2c (version 19951025).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Common Block Declarations */
extern struct {
integer order, lframe;
logical corrp;
} contrl_;
#define contrl_1 contrl_
/* ***************************************************************** */
/* BSYNZ Version 54 */
/*
* $Log: bsynz.c,v $
* Revision 1.1 2006/06/26 03:02:51 joegenbaclor
* I have decided to include the latest development realease of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development. This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.
*
* Revision 2.2 2005/08/08 03:28:41 dereksmithies
* Eradicate all "/ * within comments" messages from GCC compilations.
*
* Revision 2.1 2003/03/14 09:53:26 robertj
* Updated to openH323 v1.11.7
*
* Revision 1.2 2002/02/15 03:57:55 yurik
* Warnings removed during compilation, patch courtesy of Jehan Bing, jehan@bravobrava.com
*
* Revision 1.1 2000/06/05 04:45:12 robertj
* Added LPC-10 2400bps codec
*
* Revision 1.2 1996/08/20 20:18:55 jaf
* Removed all static local variables that were SAVE'd in the Fortran
* code, and put them in struct lpc10_decoder_state that is passed as an
* argument.
*
* Removed init function, since all initialization is now done in
* init_lpc10_decoder_state().
*
* Revision 1.1 1996/08/19 22:32:58 jaf
* Initial revision
* */
/* Revision 1.4 1996/03/27 18:11:22 jaf */
/* Changed the range of NOISE printed out in the debugging statements, */
/* even though they are commented out. I didn't discover this until I */
/* tried comparing two different versions of the LPC-10 coder, each with */
/* full tracing enabled. */
/* Revision 1.3 1996/03/26 19:33:23 jaf */
/* Commented out trace statements. */
/* Revision 1.2 1996/03/20 17:12:54 jaf */
/* Added comments about which indices of array arguments are read or */
/* written. */
/* Rearranged local variable declarations to indicate which need to be */
/* saved from one invocation to the next. Added entry INITBSYNZ to */
/* reinitialize the local state variables, if desired. */
/* Revision 1.1 1996/02/07 14:43:15 jaf */
/* Initial revision */
/* ***************************************************************** */
/* Synthesize One Pitch Epoch */
/* Input: */
/* COEF - Predictor coefficients */
/* Indices 1 through ORDER read. */
/* IP - Pitch period (number of samples to synthesize) */
/* IV - Voicing for the current epoch */
/* RMS - Energy for the current epoch */
/* RATIO - Energy slope for plosives */
/* G2PASS- Sharpening factor for 2 pass synthesis */
/* Output: */
/* SOUT - Synthesized speech */
/* Indices 1 through IP written. */
/* This subroutine maintains local state from one call to the next. If */
/* you want to switch to using a new audio stream for this filter, or */
/* reinitialize its state for any other reason, call the ENTRY */
/* INITBSYNZ. */
/* Subroutine */ int bsynz_(real *coef, integer *ip, integer *iv,
real *sout, real *rms, real *ratio, real *g2pass,
struct lpc10_decoder_state *st)
{
/* Initialized data */
integer *ipo;
real *rmso;
static integer kexc[25] = { 8,-16,26,-48,86,-162,294,-502,718,-728,184,
672,-610,-672,184,728,718,502,294,162,86,48,26,16,8 };
real *exc;
real *exc2;
real *lpi1;
real *lpi2;
real *lpi3;
real *hpi1;
real *hpi2;
real *hpi3;
/* System generated locals */
integer i__1, i__2;
real r__1, r__2;
/* Builtin functions */
double sqrt(doublereal);
/* Local variables */
real gain, xssq;
integer i__, j, k;
real noise[166], pulse;
integer px;
real sscale;
extern integer random_(struct lpc10_decoder_state *);
real xy, sum, ssq;
real lpi0, hpi0;
/*
* $Log: bsynz.c,v $
* Revision 1.1 2006/06/26 03:02:51 joegenbaclor
* I have decided to include the latest development realease of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development. This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.
*
* Revision 2.2 2005/08/08 03:28:41 dereksmithies
* Eradicate all "/ * within comments" messages from GCC compilations.
*
* Revision 2.1 2003/03/14 09:53:26 robertj
* Updated to openH323 v1.11.7
*
* Revision 1.2 2002/02/15 03:57:55 yurik
* Warnings removed during compilation, patch courtesy of Jehan Bing, jehan@bravobrava.com
*
* Revision 1.1 2000/06/05 04:45:12 robertj
* Added LPC-10 2400bps codec
*
* Revision 1.2 1996/08/20 20:18:55 jaf
* Removed all static local variables that were SAVE'd in the Fortran
* code, and put them in struct lpc10_decoder_state that is passed as an
* argument.
*
* Removed init function, since all initialization is now done in
* init_lpc10_decoder_state().
*
* Revision 1.1 1996/08/19 22:32:58 jaf
* Initial revision
* */
/* Revision 1.3 1996/03/29 22:03:47 jaf */
/* Removed definitions for any constants that were no longer used. */
/* Revision 1.2 1996/03/26 19:34:33 jaf */
/* Added comments indicating which constants are not needed in an */
/* application that uses the LPC-10 coder. */
/* Revision 1.1 1996/02/07 14:43:51 jaf */
/* Initial revision */
/* LPC Configuration parameters: */
/* Frame size, Prediction order, Pitch period */
/* Arguments
* $Log: bsynz.c,v $
* Revision 1.1 2006/06/26 03:02:51 joegenbaclor
* I have decided to include the latest development realease of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development. This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.
*
* Revision 2.2 2005/08/08 03:28:41 dereksmithies
* Eradicate all "/ * within comments" messages from GCC compilations.
*
* Revision 2.1 2003/03/14 09:53:26 robertj
* Updated to openH323 v1.11.7
*
* Revision 1.2 2002/02/15 03:57:55 yurik
* Warnings removed during compilation, patch courtesy of Jehan Bing, jehan@bravobrava.com
*
* Revision 1.1 2000/06/05 04:45:12 robertj
* Added LPC-10 2400bps codec
*
* Revision 1.2 1996/08/20 20:18:55 jaf
* Removed all static local variables that were SAVE'd in the Fortran
* code, and put them in struct lpc10_decoder_state that is passed as an
* argument.
*
* Removed init function, since all initialization is now done in
* init_lpc10_decoder_state().
*
* Revision 1.1 1996/08/19 22:32:58 jaf
* Initial revision
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -