Asterisk - The Open Source Telephony Project GIT-master-1f1c5bb
Functions
gsm/src/decode.c File Reference
#include <stdio.h>
#include "private.h"
#include "gsm.h"
#include "proto.h"
Include dependency graph for gsm/src/decode.c:

Go to the source code of this file.

Functions

static void Postprocessing P2 ((S, s), struct gsm_state *S, register word *s)
 
void Gsm_Decoder P8 ((S, LARcr, Ncr, bcr, Mcr, xmaxcr, xMcr, s), struct gsm_state *S, word *LARcr, word *Ncr, word *bcr, word *Mcr, word *xmaxcr, word *xMcr, word *s)
 

Function Documentation

◆ P2()

static void Postprocessing P2 ( (S, s)  ,
struct gsm_state S,
register word s 
)
static

Definition at line 19 of file gsm/src/decode.c.

22{
23 register int k;
24 register word msr = S->msr;
25 register word tmp;
26
27 for (k = 160; k--; s++) {
28 tmp = (word)GSM_MULT_R( msr, 28180 );
29 msr = GSM_ADD(*s, tmp); /* Deemphasis */
30 *s = GSM_ADD(msr, msr) & 0xFFF8; /* Truncation & Upscaling */
31 }
32 S->msr = msr;
33}
#define S(e)
static int tmp()
Definition: bt_open.c:389
short word
#define GSM_MULT_R(a, b)
static word GSM_ADD(longword a, longword b)

References GSM_ADD(), GSM_MULT_R, S, and tmp().

◆ P8()

void Gsm_Decoder P8 ( (S, LARcr, Ncr, bcr, Mcr, xmaxcr, xMcr, s)  ,
struct gsm_state S,
word LARcr,
word Ncr,
word bcr,
word Mcr,
word xmaxcr,
word xMcr,
word s 
)

Definition at line 35 of file gsm/src/decode.c.

47{
48 int j, k;
49 word erp[40], wt[160];
50 word * drp = S->dp0 + 120;
51
52 for (j=0; j <= 3; j++, xmaxcr++, bcr++, Ncr++, Mcr++, xMcr += 13) {
53
54 Gsm_RPE_Decoding( S, *xmaxcr, *Mcr, xMcr, erp );
55 Gsm_Long_Term_Synthesis_Filtering( S, *Ncr, *bcr, erp, drp );
56
57 for (k = 0; k <= 39; k++) wt[ j * 40 + k ] = drp[ k ];
58 }
59
60 Gsm_Short_Term_Synthesis_Filter( S, LARcr, wt, s );
61 Postprocessing(S, s);
62}

References S.