GNU Radio 3.5.1 C++ API
private.h File Reference
#include "proto.h"
#include "unproto.h"
Include dependency graph for private.h:

Go to the source code of this file.

Classes

struct  gsm_state

Defines

#define MIN_WORD   (-32767 - 1)
#define MAX_WORD   32767
#define MIN_LONGWORD   (-2147483647 - 1)
#define MAX_LONGWORD   2147483647
#define SASR(x, by)   ((x) >= 0 ? (x) >> (by) : (~(-((x) + 1) >> (by))))
#define GSM_MULT_R(a, b)
#define GSM_MULT(a, b)
#define GSM_L_MULT(a, b)
#define GSM_L_ADD(a, b)
#define GSM_ADD(a, b)
#define GSM_SUB(a, b)
#define GSM_ABS(a)   ((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a))

Typedefs

typedef short word
typedef long longword
typedef unsigned short uword
typedef unsigned long ulongword

Functions

word gsm_mult P ((word a, word b))
word gsm_div P ((word num, word denum))
longword gsm_L_add P ((longword a, longword b))
word gsm_abs P ((word a))
word gsm_norm P ((longword a))
longword gsm_L_asl P ((longword a, int n))
word gsm_asl P ((word a, int n))
void Gsm_Coder P ((struct gsm_state *S, word *s, word *LARc, word *Nc, word *bc, word *Mc, word *xmaxc, word *xMc))
void Gsm_Long_Term_Predictor P ((struct gsm_state *S, word *d, word *dp, word *e, word *dpp, word *Nc, word *bc))
void Gsm_LPC_Analysis P ((struct gsm_state *S, word *s, word *LARc))
void Gsm_Preprocess P ((struct gsm_state *S, word *s, word *so))
void Gsm_Encoding P ((struct gsm_state *S, word *e, word *ep, word *xmaxc, word *Mc, word *xMc))
void Gsm_Short_Term_Analysis_Filter P ((struct gsm_state *S, word *LARc, word *d))
void Gsm_Decoder P ((struct gsm_state *S, word *LARcr, word *Ncr, word *bcr, word *Mcr, word *xmaxcr, word *xMcr, word *s))
void Gsm_Decoding P ((struct gsm_state *S, wordxmaxcr, word Mcr, word *xMcr, word *erp))
void
Gsm_Long_Term_Synthesis_Filtering 
P ((struct gsm_state *S, word Ncr, word bcr, word *erp, word *drp))
void Gsm_RPE_Decoding P ((struct gsm_state *S, word xmaxcr, word Mcr, word *xMcr, word *erp))
void Gsm_RPE_Encoding P ((struct gsm_state *S, word *e, word *xmaxc, word *Mc, word *xMc))
void
Gsm_Short_Term_Synthesis_Filter 
P ((struct gsm_state *S, word *LARcr, word *drp, word *s))
void
Gsm_Update_of_reconstructed_short_time_residual_signal 
P ((word *dpp, word *ep, word *dp))
void gsm_debug_words P ((char *name, int, int, word *))
void gsm_debug_longwords P ((char *name, int, int, longword *))
void gsm_debug_longword P ((char *name, longword))
void gsm_debug_word P ((char *name, word))

Variables

word gsm_A [8]
word gsm_B [8]
word gsm_MIC [8]
word gsm_MAC [8]
word gsm_INVA [8]
word gsm_DLB [4]
word gsm_QLB [4]
word gsm_H [11]
word gsm_NRFAC [8]
word gsm_FAC [8]

Define Documentation

#define GSM_ABS (   a)    ((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a))
#define GSM_ADD (   a,
 
)
Value:
((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \
                MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp)
#define GSM_L_ADD (   a,
 
)
Value:
( (a) <  0 ? ( (b) >= 0 ? (a) + (b)     \
                 : (utmp = (ulongword)-((a) + 1) + (ulongword)-((b) + 1)) \
                   >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)utmp-2 )   \
        : ((b) <= 0 ? (a) + (b)   \
                  : (utmp = (ulongword)(a) + (ulongword)(b)) >= MAX_LONGWORD \
                    ? MAX_LONGWORD : utmp))
#define GSM_L_MULT (   a,
 
)
Value:
/* word a, word b */    \
        (((longword)(a) * (longword)(b)) << 1)
#define GSM_MULT (   a,
 
)
Value:
/* word a, word b, !(a == b == MIN_WORD) */     \
        (SASR( ((longword)(a) * (longword)(b)), 15 ))
#define GSM_MULT_R (   a,
 
)
Value:
/* word a, word b, !(a == b == MIN_WORD) */     \
        (SASR( ((longword)(a) * (longword)(b) + 16384), 15 ))
#define GSM_SUB (   a,
 
)
Value:
((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \
        ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
#define MAX_LONGWORD   2147483647
#define MAX_WORD   32767
#define MIN_LONGWORD   (-2147483647 - 1)
#define MIN_WORD   (-32767 - 1)
#define SASR (   x,
  by 
)    ((x) >= 0 ? (x) >> (by) : (~(-((x) + 1) >> (by))))

Typedef Documentation

typedef long longword
typedef unsigned long ulongword
typedef unsigned short uword
typedef short word

Function Documentation

word gsm_sub P ( (word a, word b)  )
void gsm_debug_word P ( (char *name, word )
void gsm_debug_longword P ( (char *name, longword )
void gsm_debug_longwords P ( (char *name, int, int, longword *)  )
void gsm_debug_words P ( (char *name, int, int, word *)  )
void Gsm_Update_of_reconstructed_short_time_residual_signal P ( (word *dpp, word *ep, word *dp)  )
void Gsm_Short_Term_Synthesis_Filter P ( (struct gsm_state *S, word *LARcr, word *drp, word *s)  )
void Gsm_RPE_Encoding P ( (struct gsm_state *S, word *e, word *xmaxc, word *Mc, word *xMc)  )
void Gsm_RPE_Decoding P ( (struct gsm_state *S, word xmaxcr, word Mcr, word *xMcr, word *erp)  )
void Gsm_Long_Term_Synthesis_Filtering P ( (struct gsm_state *S, word Ncr, word bcr, word *erp, word *drp)  )
void Gsm_Decoding P ( (struct gsm_state *S, wordxmaxcr, word Mcr, word *xMcr, word *erp)  )
void Gsm_Decoder P ( (struct gsm_state *S, word *LARcr, word *Ncr, word *bcr, word *Mcr, word *xmaxcr, word *xMcr, word *s)  )
void Gsm_Short_Term_Analysis_Filter P ( (struct gsm_state *S, word *LARc, word *d)  )
void Gsm_Encoding P ( (struct gsm_state *S, word *e, word *ep, word *xmaxc, word *Mc, word *xMc)  )
void Gsm_Preprocess P ( (struct gsm_state *S, word *s, word *so)  )
void Gsm_LPC_Analysis P ( (struct gsm_state *S, word *s, word *LARc)  )
void Gsm_Long_Term_Predictor P ( (struct gsm_state *S, word *d, word *dp, word *e, word *dpp, word *Nc, word *bc)  )
void Gsm_Coder P ( (struct gsm_state *S, word *s, word *LARc, word *Nc, word *bc, word *Mc, word *xmaxc, word *xMc)  )
word gsm_asr P ( (word a, int n)  )
longword gsm_L_asr P ( (longword a, int n)  )
word gsm_norm P ( (longword a)  )
word gsm_abs P ( (word a)  )
longword gsm_L_sub P ( (longword a, longword b)  )
word gsm_div P ( (word num, word denum)  )

Variable Documentation

word gsm_A[8]
word gsm_B[8]
word gsm_H[11]