LMMS
Loading...
Searching...
No Matches
private.h File Reference
#include "proto.h"
#include "unproto.h"

Go to the source code of this file.

Classes

struct  gsm_state

Macros

#define NeedFunctionPrototypes   1
#define SASR
#define USE_FLOAT_MUL
#define FAST
#define WAV49
#define MIN_WORD   (-32767 - 1)
#define MAX_WORD   32767
#define MIN_LONGWORD   (-2147483647 - 1)
#define MAX_LONGWORD   2147483647
#define SASR(x, 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)

Typedefs

typedef short word
typedef int longword
typedef unsigned short uword
typedef unsigned int ulongword

Functions

word gsm_mult (word a, word b)
longword gsm_L_mult (word a, word b)
word gsm_mult_r (word a, word b)
word gsm_div (word num, word denum)
word gsm_add (word a, word b)
longword gsm_L_add (longword a, longword b)
word gsm_sub (word a, word b)
longword gsm_L_sub (longword a, longword b)
word gsm_abs (word a)
word gsm_norm (longword a)
longword gsm_L_asl (longword a, int n)
word gsm_asl (word a, int n)
longword gsm_L_asr (longword a, int n)
word gsm_asr (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, 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_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]

Macro Definition Documentation

◆ FAST

#define FAST

◆ GSM_ABS

#define GSM_ABS ( a)
Value:
((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a))
uint8_t a
Definition Spc_Cpu.h:141
#define MIN_WORD
Definition private.h:54
#define MAX_WORD
Definition private.h:55

◆ GSM_ADD

#define GSM_ADD ( a,
b )
Value:
((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \
MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp)
int longword
Definition private.h:23
unsigned int ulongword
Definition private.h:26
b
Definition crypt.c:628

◆ GSM_L_ADD

#define GSM_L_ADD ( a,
b )
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 MAX_LONGWORD
Definition private.h:58
#define MIN_LONGWORD
Definition private.h:57

◆ GSM_L_MULT

#define GSM_L_MULT ( a,
b )
Value:
/* word a, word b */ \
(((longword)(a) * (longword)(b)) << 1)

◆ GSM_MULT

#define GSM_MULT ( a,
b )
Value:
/* word a, word b, !(a == b == MIN_WORD) */ \
(SASR( ((longword)(a) * (longword)(b)), 15 ))
#define SASR
Definition private.h:14

◆ GSM_MULT_R

#define GSM_MULT_R ( a,
b )
Value:
/* word a, word b, !(a == b == MIN_WORD) */ \
(SASR( ((longword)(a) * (longword)(b) + 16384), 15 ))

◆ GSM_SUB

#define GSM_SUB ( a,
b )
Value:
((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \
? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)

◆ MAX_LONGWORD

#define MAX_LONGWORD   2147483647

◆ MAX_WORD

#define MAX_WORD   32767

◆ MIN_LONGWORD

#define MIN_LONGWORD   (-2147483647 - 1)

◆ MIN_WORD

#define MIN_WORD   (-32767 - 1)

◆ NeedFunctionPrototypes

#define NeedFunctionPrototypes   1

◆ SASR [1/2]

#define SASR ( x,
by )
Value:
((x) >> (by))
unsigned x[BMAX+1]
Definition inflate.c:1586

◆ SASR [2/2]

#define SASR

◆ USE_FLOAT_MUL

#define USE_FLOAT_MUL

◆ WAV49

#define WAV49

Typedef Documentation

◆ longword

typedef int longword

◆ ulongword

typedef unsigned int ulongword

◆ uword

typedef unsigned short uword

◆ word

typedef short word

Function Documentation

◆ gsm_abs()

word gsm_abs ( word a)
extern

◆ gsm_add()

word gsm_add ( word a,
word b )
extern

◆ gsm_asl()

word gsm_asl ( word a,
int n )
extern

◆ gsm_asr()

word gsm_asr ( word a,
int n )
extern

◆ gsm_div()

word gsm_div ( word num,
word denum )
extern

◆ gsm_L_add()

longword gsm_L_add ( longword a,
longword b )
extern

◆ gsm_L_asl()

longword gsm_L_asl ( longword a,
int n )
extern

◆ gsm_L_asr()

longword gsm_L_asr ( longword a,
int n )
extern

◆ gsm_L_mult()

longword gsm_L_mult ( word a,
word b )
extern

◆ gsm_L_sub()

longword gsm_L_sub ( longword a,
longword b )
extern

◆ gsm_mult()

word gsm_mult ( word a,
word b )
extern

◆ gsm_mult_r()

word gsm_mult_r ( word a,
word b )
extern

◆ gsm_norm()

word gsm_norm ( longword a)
extern

◆ gsm_sub()

word gsm_sub ( word a,
word b )
extern

◆ P() [1/16]

void gsm_debug_longwords P ( (char *name, int, int, longword *) )
extern

◆ P() [2/16]

void gsm_debug_words P ( (char *name, int, int, word *) )
extern

◆ P() [3/16]

void gsm_debug_longword P ( (char *name, longword) )
extern

◆ P() [4/16]

void gsm_debug_word P ( (char *name, word) )
extern

◆ P() [5/16]

void Gsm_Long_Term_Predictor P ( (struct gsm_state *S, word *d, word *dp, word *e, word *dpp, word *Nc, word *bc) )
extern

◆ P() [6/16]

void Gsm_Encoding P ( (struct gsm_state *S, word *e, word *ep, word *xmaxc, word *Mc, word *xMc) )
extern

◆ P() [7/16]

void Gsm_RPE_Encoding P ( (struct gsm_state *S, word *e, word *xmaxc, word *Mc, word *xMc) )

◆ P() [8/16]

void Gsm_Short_Term_Analysis_Filter P ( (struct gsm_state *S, word *LARc, word *d) )
extern

◆ P() [9/16]

void Gsm_Short_Term_Synthesis_Filter P ( (struct gsm_state *S, word *LARcr, word *drp, word *s) )
extern

◆ P() [10/16]

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

◆ P() [11/16]

void Gsm_LPC_Analysis P ( (struct gsm_state *S, word *s, word *LARc) )
extern

◆ P() [12/16]

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

◆ P() [13/16]

void Gsm_Preprocess P ( (struct gsm_state *S, word *s, word *so) )
extern

◆ P() [14/16]

void Gsm_Long_Term_Synthesis_Filtering P ( (struct gsm_state *S, word Ncr, word bcr, word *erp, word *drp) )
extern

◆ P() [15/16]

void Gsm_RPE_Decoding P ( (struct gsm_state *S, word xmaxcr, word Mcr, word *xMcr, word *erp) )
extern

◆ P() [16/16]

void Gsm_Update_of_reconstructed_short_time_residual_signal P ( (word *dpp, word *ep, word *dp) )
extern

Variable Documentation

◆ gsm_A

word gsm_A[8]
extern

◆ gsm_B

word gsm_B[8]

◆ gsm_DLB

word gsm_DLB[4]
extern

◆ gsm_FAC

word gsm_FAC[8]
extern

◆ gsm_H

word gsm_H[11]
extern

◆ gsm_INVA

word gsm_INVA[8]
extern

◆ gsm_MAC

word gsm_MAC[8]

◆ gsm_MIC

word gsm_MIC[8]

◆ gsm_NRFAC

word gsm_NRFAC[8]
extern

◆ gsm_QLB

word gsm_QLB[4]