www.pudn.com > source.rar > LD8A.H


/* ITU-T G.729 Software Package Release 2 (November 2006) */ 
/* 
   ITU-T G.729 Annex C - Reference C code for floating point 
                         implementation of G.729 Annex A 
                         Version 1.01 of 15.September.98 
*/ 
 
/* 
---------------------------------------------------------------------- 
                    COPYRIGHT NOTICE 
---------------------------------------------------------------------- 
   ITU-T G.729 Annex C ANSI C source code 
   Copyright (C) 1998, AT&T, France Telecom, NTT, University of 
   Sherbrooke.  All rights reserved. 
 
---------------------------------------------------------------------- 
*/ 
 
 
/*-----------------------------------------------------------* 
 * ld8a.h - include file for G.729a 8.0 kb/s codec           * 
 *-----------------------------------------------------------*/ 
 
#include  
#include  
 
#ifdef PI 
#undef PI 
#endif 
#ifdef PI2 
#undef PI2 
#endif 
#define PI              (F)3.141592654 
#define PI2             (F)6.283185307 
#define FLT_MAX_G729    (F)1.0e38    /* largest floating point number      */ 
#define FLT_MIN_G729    (F)-1.0e38   /* largest floating point number      */ 
 
/*--------------------------------------------------------------------------* 
 *       Codec constant parameters (coder, decoder, and postfilter)         * 
 *--------------------------------------------------------------------------*/ 
 
#define L_TOTAL         240     /* Total size of speech buffer              */ 
#define L_WINDOW        240     /* LPC analysis window size                 */ 
#define L_NEXT          40      /* Samples of next frame needed for LPC ana.*/ 
#define L_FRAME         80      /* LPC update frame size                    */ 
#define L_SUBFR         40      /* Sub-frame size                           */ 
 
#define PIT_MIN         20      /* Minimum pitch lag in samples             */ 
#define PIT_MAX         143     /* Maximum pitch lag in samples             */ 
#define L_INTERPOL      (10+1)  /* Length of filter for interpolation.      */ 
#define GAMMA1       (F)0.75    /* Bandwitdh expansion for W(z)             */ 
 
 
/*--------------------------------------------------------------------------* 
 * constants for lpc analysis and lsp quantizer                             * 
 *--------------------------------------------------------------------------*/ 
 
#define M               10      /* LPC order                                */ 
#define MP1             (M+1)   /* LPC order+1                              */ 
#define NC              (M/2)   /* LPC order / 2                            */ 
#define WNC          (F)1.0001  /* white noise correction factor            */ 
#define GRID_POINTS      50     /* resolution of lsp search                 */ 
 
#define MA_NP           4       /* MA prediction order for LSP              */ 
#define MODE            2       /* number of modes for MA prediction        */ 
#define NC0_B           7       /* number of bits in first stage            */ 
#define NC0          (1<