Asterisk - The Open Source Telephony Project  18.5.0
Functions
code.c File Reference
#include "config.h"
#include "proto.h"
#include "private.h"
#include "gsm.h"
Include dependency graph for code.c:

Go to the source code of this file.

Functions

char *memcpy P ((char *, char *, int))
 
void Gsm_Coder P8 ((S, s, LARc, Nc, bc, Mc, xmaxc, xMc), struct gsm_state *S, word *s, word *LARc, word *Nc, word *bc, word *Mc, word *xmaxc, word *xMc)
 

Function Documentation

◆ P()

char* memcpy P ( (char *, char *, int)  )

◆ P8()

void Gsm_Coder P8 ( (S, s, LARc, Nc, bc, Mc, xmaxc, xMc)  ,
struct gsm_state S,
word s,
word LARc,
word Nc,
word bc,
word Mc,
word xmaxc,
word xMc 
)

Definition at line 26 of file code.c.

References gsm_state::dp0, and GSM_ADD().

56 {
57  int k;
58  word * dp = S->dp0 + 120; /* [ -120...-1 ] */
59  word * dpp = dp; /* [ 0...39 ] */
60 
61  word e[50];
62 
63  word so[160];
64 
65  memset(e,0,sizeof e);
66  Gsm_Preprocess (S, s, so);
67  Gsm_LPC_Analysis (S, so, LARc);
68  Gsm_Short_Term_Analysis_Filter (S, LARc, so);
69 
70  for (k = 0; k <= 3; k++, xMc += 13) {
71 
72  Gsm_Long_Term_Predictor ( S,
73  so+k*40, /* d [0..39] IN */
74  dp, /* dp [-120..-1] IN */
75  e + 5, /* e [0..39] OUT */
76  dpp, /* dpp [0..39] OUT */
77  Nc++,
78  bc++);
79 
80  Gsm_RPE_Encoding ( S,
81  e + 5, /* e ][0..39][ IN/OUT */
82  xmaxc++, Mc++, xMc );
83  /*
84  * Gsm_Update_of_reconstructed_short_time_residual_signal
85  * ( dpp, e + 5, dp );
86  */
87 
88  { register int i;
89  for (i = 0; i <= 39; i++)
90  dp[ i ] = GSM_ADD( e[5 + i], dpp[i] );
91  }
92  dp += 40;
93  dpp += 40;
94 
95  }
96  (void)memcpy( (char *)S->dp0, (char *)(S->dp0 + 160),
97  120 * sizeof(*S->dp0) );
98 }
static word GSM_ADD(longword a, longword b)
#define bc
#define Mc
#define xmaxc
#define Nc
#define LARc
short word