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

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

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

References GSM_ADD(), GSM_MULT_R, gsm_state::msr, and tmp().

00022 {
00023    register int      k;
00024    register word     msr = S->msr;
00025    register word     tmp;
00026 
00027    for (k = 160; k--; s++) {
00028       tmp = (word)GSM_MULT_R( msr, 28180 );
00029       msr = GSM_ADD(*s, tmp);       /* Deemphasis       */
00030       *s  = GSM_ADD(msr, msr) & 0xFFF8;  /* Truncation & Upscaling */
00031    }
00032    S->msr = msr;
00033 }

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.

References gsm_state::dp0.

00047 {
00048    int      j, k;
00049    word     erp[40], wt[160];
00050    word     * drp = S->dp0 + 120;
00051 
00052    for (j=0; j <= 3; j++, xmaxcr++, bcr++, Ncr++, Mcr++, xMcr += 13) {
00053 
00054       Gsm_RPE_Decoding( S, *xmaxcr, *Mcr, xMcr, erp );
00055       Gsm_Long_Term_Synthesis_Filtering( S, *Ncr, *bcr, erp, drp );
00056 
00057       for (k = 0; k <= 39; k++) wt[ j * 40 + k ] =  drp[ k ];
00058    }
00059 
00060    Gsm_Short_Term_Synthesis_Filter( S, LARcr, wt, s );
00061    Postprocessing(S, s);
00062 }


Generated on Thu Apr 16 06:30:37 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6