27 #ifndef OPAL_CODEC_G711A1_PLC_H
28 #define OPAL_CODEC_G711A1_PLC_H
30 #ifndef SBC_DISABLE_PTLIB
48 LOSS_PERIOD2overlap=21,
57 std::vector<short> transition_buf;
62 std::vector<short> hist_buf;
63 std::vector<short> tmp_buf;
65 std::vector<short> conceal_overlapbuf;
67 std::vector<double> pitch_buf;
68 std::vector<double> pitch_lastq;
73 struct channel_counters
85 channel_counters() { memset(
this, 0,
sizeof(*
this)); }
87 std::vector<channel_counters> channel;
92 int ms2samples(
int ms)
const
99 OpalG711_PLC(
int rate=8000,
int channels=1,
double pitch_low=66.6,
double pitch_high=200);
102 void dofe(
short *s,
int size);
105 void drop(
short *s,
int size);
108 void scalespeech(
short *inout,
int c,
int sz,
bool decay=
true)
const;
109 void getfespeech(
short *out,
int c,
int sz);
110 void hist_savespeech(
short *s,
int size);
111 int findpitch(
int c);
112 void overlapadd(
double *l,
double *r,
double *o,
int c,
int cnt)
const;
113 void overlapadds(
short *l,
short *r,
short *o,
int c,
int cnt)
const;
114 void overlapaddatend(
short *s,
short *f,
int c,
int start,
int end,
int count)
const;
115 void convertsf(
short *f,
double *t,
int c,
int cnt)
const;
116 void convertfs(
double *f,
short *t,
int c,
int cnt)
const;
118 inline void copy(
double *f,
double *t,
int cnt)
const { memmove(t,f,cnt*channels*
sizeof(
double)); };
119 inline void copy(
short *f,
short *t,
int cnt)
const { memmove(t,f,cnt*channels*
sizeof(
short)); };
121 int dofe_partly(
short *out,
int c,
int size);
125 #endif // OPAL_G711PLC
127 #endif // OPAL_CODEC_G711A1_PLC_H
Definition: g711a1_plc.h:42
OpalG711_PLC(int rate=8000, int channels=1, double pitch_low=66.6, double pitch_high=200)
void drop(short *s, int size)
void addtohistory(short *s, int size)
void dofe(short *s, int size)
int getAlgDelay() const
Definition: g711a1_plc.h:104