Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing fork up to date #5

Merged
merged 110 commits into from
Jan 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
148940f
Add custom audio filters
N4IRS Feb 16, 2017
42ba12c
Merge pull request #2 from AllStarLink/feature/custom_audio_filters
MrBungle42 Feb 16, 2017
7585bf3
Merge pull request #5 from tolitski/master
MrBungle42 Feb 20, 2017
0b5d37b
Merge pull request #9 from AllStarLink/bug/echolink
MrBungle42 Feb 20, 2017
5f55016
Update chan_echolink.c
N4IRS Feb 20, 2017
78af5d6
Merge pull request #10 from AllStarLink/feature/increase_call_list_size
MrBungle42 Feb 20, 2017
2acc008
Add support for CM119B
N4IRS Feb 21, 2017
bae086d
Add support for CM119B
N4IRS Feb 21, 2017
ad518a2
Merge pull request #12 from AllStarLink/feature/add_CM119B-support
MrBungle42 Feb 21, 2017
22b4c35
Replace references to usbradio with simpleusb
N4IRS Feb 21, 2017
36aec03
Merge pull request #13 from AllStarLink/bug/invalid_Channel_Driver_name
MrBungle42 Feb 21, 2017
d0fac69
Apply Debian patches and remove zaptel
N4IRS Mar 8, 2017
bb0e7a5
Update makefile
N4IRS Mar 8, 2017
6e712fe
Add support for systemd
Mar 8, 2017
60f6458
feature/add_allstar_node_enabled_sound
N4IRS Mar 9, 2017
edf0ea6
Use git describe --always to generate version number
Mar 13, 2017
9f9d455
Added comments
KG7QIN Mar 22, 2017
d7c0c01
CM108B USB sound card
lejudd Mar 22, 2017
5645bc2
CM108B USB sound card
lejudd Mar 22, 2017
537e2f5
Merge pull request #21 from KG7QIN/develop
MrBungle42 Mar 23, 2017
2dc010e
Remove no longer used RADIO_RTX RADIO_XPMRX
N4IRS Jul 12, 2017
b608f95
Update Makefile
N4IRS Jul 31, 2017
0a633df
Merge pull request #33 from AllStarLink/master
N4IRS Nov 19, 2017
2b41745
Merge pull request #34 from AllStarLink/develop
N4IRS Nov 19, 2017
11d07c7
Merge pull request #35 from AllStarLink/feature/update_build_enviorment
N4IRS Nov 19, 2017
166de8e
Extend sign-on
Nov 19, 2017
1d79ece
Merge pull request #22 from lejudd/master
N4IRS Nov 19, 2017
c015160
Update time calc
Nov 19, 2017
0557d29
Support GIT version
Nov 20, 2017
72830c1
Update copyright
N4IRS Dec 28, 2017
41a6221
Update systemd
Dec 28, 2017
add4bd6
More cleanup
Dec 28, 2017
b39ced3
Update
Dec 28, 2017
77e297a
Minor edit
Dec 28, 2017
0cfd74f
add rtpdir to compile defaults
N4IRS Dec 28, 2017
7c4933d
revert
N4IRS Dec 28, 2017
37baf45
Replace unneeded command
N4IRS Dec 28, 2017
76a437a
Update file versions
N4IRS Jan 12, 2018
cc73059
Enable MDC support
N4IRS Jan 12, 2018
82e69ec
Add rpt_events
N4IRS Jan 12, 2018
53c0ca8
Update README
N4IRS Feb 13, 2018
c5eba9f
move mdc1200 to seperate directories
N4IRS Feb 13, 2018
f4d8650
Add ilbc support
N4IRS Feb 13, 2018
7b60353
move pocsag to allstar directories
N4IRS Feb 13, 2018
c111776
Add ASL config files to samples
N4IRS Feb 14, 2018
5d37f40
Enable ilbc
N4IRS Feb 14, 2018
462fbb8
Update readme.MD
N4IRS Feb 15, 2018
456cd00
Create README.md
N4IRS Feb 15, 2018
6c5aadb
Update filedate stamps
N4IRS Feb 15, 2018
a22990d
Move ASL specific files into allstar
N4IRS Feb 15, 2018
8c198b4
Add support for g722
N4IRS Feb 15, 2018
7e170aa
Add changelog
N4IRS Feb 15, 2018
2b76a79
Make the example more clear.
N4IRS Feb 16, 2018
1e06c4c
oops
N4IRS Feb 16, 2018
c136f18
Add notes on enabling channel drivers in modules.conf
N4IRS Feb 16, 2018
1baf7af
Add comment
N4IRS Feb 16, 2018
167110d
Add support for ASL sound files in menuselect
N4IRS Feb 16, 2018
b2df703
Add install updatenodelist
N4IRS Feb 16, 2018
004b9dd
Cleanup extras
N4IRS Feb 17, 2018
0159909
Revert updatenodelist. Does not belong here.
N4IRS Mar 5, 2018
adaec47
Merge pull request #38 from N4IRS/Testing
allstarlink1 Mar 5, 2018
bfb9069
Initial commit
N4IRS Mar 23, 2018
a67a1a5
Add host information script.
N4IRS Mar 23, 2018
a5872ed
Update asl-menu
n8thn Mar 23, 2018
816832e
Update first-time
n8thn Mar 23, 2018
3f4f8b9
Update net-setup
n8thn Mar 23, 2018
9829115
Update node-setup
n8thn Mar 23, 2018
60d5961
Update restore-node
n8thn Mar 23, 2018
b48b072
Update save-node
n8thn Mar 23, 2018
4adfc7a
Update set-host
n8thn Mar 23, 2018
fb862c7
Update wifi-setup
n8thn Mar 23, 2018
c07eed0
Add repo
N4IRS Mar 23, 2018
b88a6b8
Add install kernel header before apt-get install
N4IRS Mar 23, 2018
3c3295a
Add more host testing
N4IRS Mar 23, 2018
ab10f04
add more tests
N4IRS Mar 23, 2018
3517639
revert local var
N4IRS Mar 23, 2018
4694860
export vars
N4IRS Mar 24, 2018
13a8c0d
write-node-callsigns ulaw
n8thn Mar 24, 2018
989278e
Update write-node-callsigns
n8thn Mar 24, 2018
806aa64
Update net-setup
n8thn Mar 24, 2018
537fa97
Update net-setup
n8thn Mar 24, 2018
83931cd
Add back ticks.
allstarlink1 Mar 26, 2018
59edb26
Update README.MD
allstarlink1 Mar 26, 2018
47bfb83
Add device tree info
N4IRS Mar 29, 2018
eb204eb
Test for devtree
N4IRS Apr 17, 2018
aea58d5
Update net-setup
n8thn Apr 21, 2018
5648d5a
Update set-host
n8thn Apr 21, 2018
c26ce81
Update asl-menu
n8thn May 4, 2018
1f3a378
Update net-setup
n8thn May 4, 2018
f37f135
Update asl-menu
n8thn Oct 16, 2018
c5b8abe
Update asl-menu
n8thn Oct 16, 2018
a2d06fa
Merge pull request #42 from AllStarLink/develop
allstarlink1 Nov 22, 2018
d9efad4
Updated
allstarlink1 Nov 22, 2018
7ef7bee
Delete README
allstarlink1 Nov 22, 2018
e2ca6bf
Created README.md
allstarlink1 Nov 22, 2018
651bffc
Update README.md
allstarlink1 Nov 22, 2018
9ab6b42
Update README.md
allstarlink1 Nov 22, 2018
94a17a1
Update README.md
allstarlink1 Nov 22, 2018
567a268
Update README.md
allstarlink1 Nov 22, 2018
d0e3fe5
Update README.md
allstarlink1 Nov 22, 2018
5ab991d
Update README.md
allstarlink1 Nov 22, 2018
464b79c
Update README.md
KG7QIN Nov 22, 2018
99bf31e
Update LICENSE
KG7QIN Nov 22, 2018
8b12c5a
add asl-reg utility
ajpaul25 Dec 4, 2019
ae91fab
random delay improvements
ajpaul25 Dec 4, 2019
5f66d40
parse json responses
ajpaul25 Dec 4, 2019
75be6cd
add sample config for asl-reg
ajpaul25 Dec 5, 2019
e40d384
remove register line from iax.conf
ajpaul25 Dec 5, 2019
ab90ef3
handle buffer overflows
ajpaul25 Dec 5, 2019
2a50097
Merge pull request #44 from ajpaul25/http_registration
tsawyer Dec 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ilbc support
  • Loading branch information
N4IRS committed Feb 13, 2018
commit f4d8650b85dce993510a711a6d16f53212f717f6
12 changes: 6 additions & 6 deletions asterisk/codecs/codec_ilbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 114611 $")
#include "ilbc_slin_ex.h"

#define USE_ILBC_ENHANCER 0
#define ILBC_MS 30
/* #define ILBC_MS 20 */
/*#define ILBC_MS 30 */
#define ILBC_MS 20

#define ILBC_FRAME_LEN 50 /* apparently... */
#define ILBC_SAMPLES 240 /* 30ms at 8000 hz */
#define ILBC_FRAME_LEN 38 /* apparently... */
#define ILBC_SAMPLES 160 /* 20ms at 8000 hz */
#define BUFFER_SAMPLES 8000

struct ilbc_coder_pvt {
Expand Down Expand Up @@ -107,7 +107,7 @@ static struct ast_frame *ilbctolin_sample(void)
f.frametype = AST_FRAME_VOICE;
f.subclass = AST_FORMAT_ILBC;
f.datalen = sizeof(ilbc_slin_ex);
/* All frames are 30 ms long */
/* All frames are 20 ms long */
f.samples = ILBC_SAMPLES;
f.mallocd = 0;
f.offset = 0;
Expand Down Expand Up @@ -135,7 +135,7 @@ static int ilbctolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
}

if (f->datalen % ILBC_FRAME_LEN) {
ast_log(LOG_WARNING, "Huh? An ilbc frame that isn't a multiple of 50 bytes long from %s (%d)?\n", f->src, f->datalen);
ast_log(LOG_WARNING, "Huh? An ilbc frame that isn't a multiple of 38 bytes long from %s (%d)?\n", f->src, f->datalen);
return -1;
}

Expand Down
114 changes: 114 additions & 0 deletions asterisk/codecs/ilbc/FrameClassify.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@

/******************************************************************

iLBC Speech Coder ANSI-C Source Code

FrameClassify.c

Copyright (C) The Internet Society (2004).
All Rights Reserved.

******************************************************************/

#include "iLBC_define.h"

/*---------------------------------------------------------------*
* Classification of subframes to localize start state
*--------------------------------------------------------------*/

int FrameClassify( /* index to the max-energy sub-frame */
iLBC_Enc_Inst_t *iLBCenc_inst,
/* (i/o) the encoder state structure */
float *residual /* (i) lpc residual signal */
) {
float max_ssqEn, fssqEn[NSUB_MAX], bssqEn[NSUB_MAX], *pp;
int n, l, max_ssqEn_n;
const float ssqEn_win[NSUB_MAX-1]={(float)0.8,(float)0.9,
(float)1.0,(float)0.9,(float)0.8};
const float sampEn_win[5]={(float)1.0/(float)6.0,
(float)2.0/(float)6.0, (float)3.0/(float)6.0,
(float)4.0/(float)6.0, (float)5.0/(float)6.0};

/* init the front and back energies to zero */

memset(fssqEn, 0, NSUB_MAX*sizeof(float));
memset(bssqEn, 0, NSUB_MAX*sizeof(float));

/* Calculate front of first seqence */

n=0;
pp=residual;
for (l=0; l<5; l++) {
fssqEn[n] += sampEn_win[l] * (*pp) * (*pp);
pp++;
}
for (l=5; l<SUBL; l++) {





fssqEn[n] += (*pp) * (*pp);
pp++;
}

/* Calculate front and back of all middle sequences */

for (n=1; n<iLBCenc_inst->nsub-1; n++) {
pp=residual+n*SUBL;
for (l=0; l<5; l++) {
fssqEn[n] += sampEn_win[l] * (*pp) * (*pp);
bssqEn[n] += (*pp) * (*pp);
pp++;
}
for (l=5; l<SUBL-5; l++) {
fssqEn[n] += (*pp) * (*pp);
bssqEn[n] += (*pp) * (*pp);
pp++;
}
for (l=SUBL-5; l<SUBL; l++) {
fssqEn[n] += (*pp) * (*pp);
bssqEn[n] += sampEn_win[SUBL-l-1] * (*pp) * (*pp);
pp++;
}
}

/* Calculate back of last seqence */

n=iLBCenc_inst->nsub-1;
pp=residual+n*SUBL;
for (l=0; l<SUBL-5; l++) {
bssqEn[n] += (*pp) * (*pp);
pp++;
}
for (l=SUBL-5; l<SUBL; l++) {
bssqEn[n] += sampEn_win[SUBL-l-1] * (*pp) * (*pp);
pp++;
}

/* find the index to the weighted 80 sample with
most energy */

if (iLBCenc_inst->mode==20) l=1;
else l=0;

max_ssqEn=(fssqEn[0]+bssqEn[1])*ssqEn_win[l];
max_ssqEn_n=1;
for (n=2; n<iLBCenc_inst->nsub; n++) {






l++;
if ((fssqEn[n-1]+bssqEn[n])*ssqEn_win[l] > max_ssqEn) {
max_ssqEn=(fssqEn[n-1]+bssqEn[n]) *
ssqEn_win[l];
max_ssqEn_n=n;
}
}

return max_ssqEn_n;
}

27 changes: 27 additions & 0 deletions asterisk/codecs/ilbc/FrameClassify.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

/******************************************************************

iLBC Speech Coder ANSI-C Source Code

FrameClassify.h

Copyright (C) The Internet Society (2004).
All Rights Reserved.

******************************************************************/

#ifndef __iLBC_FRAMECLASSIFY_H
#define __iLBC_FRAMECLASSIFY_H

int FrameClassify( /* index to the max-energy sub-frame */
iLBC_Enc_Inst_t *iLBCenc_inst,
/* (i/o) the encoder state structure */
float *residual /* (i) lpc residual signal */
);





#endif

158 changes: 158 additions & 0 deletions asterisk/codecs/ilbc/LPCdecode.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@

/******************************************************************

iLBC Speech Coder ANSI-C Source Code

LPC_decode.c

Copyright (C) The Internet Society (2004).
All Rights Reserved.

******************************************************************/

#include <math.h>
#include <string.h>

#include "helpfun.h"
#include "lsf.h"
#include "iLBC_define.h"
#include "constants.h"

/*---------------------------------------------------------------*
* interpolation of lsf coefficients for the decoder
*--------------------------------------------------------------*/

void LSFinterpolate2a_dec(
float *a, /* (o) lpc coefficients for a sub-frame */
float *lsf1, /* (i) first lsf coefficient vector */
float *lsf2, /* (i) second lsf coefficient vector */
float coef, /* (i) interpolation weight */
int length /* (i) length of lsf vectors */
){
float lsftmp[LPC_FILTERORDER];

interpolate(lsftmp, lsf1, lsf2, coef, length);
lsf2a(a, lsftmp);
}

/*---------------------------------------------------------------*
* obtain dequantized lsf coefficients from quantization index
*--------------------------------------------------------------*/

void SimplelsfDEQ(
float *lsfdeq, /* (o) dequantized lsf coefficients */
int *index, /* (i) quantization index */
int lpc_n /* (i) number of LPCs */
){
int i, j, pos, cb_pos;





/* decode first LSF */

pos = 0;
cb_pos = 0;
for (i = 0; i < LSF_NSPLIT; i++) {
for (j = 0; j < dim_lsfCbTbl[i]; j++) {
lsfdeq[pos + j] = lsfCbTbl[cb_pos +
(long)(index[i])*dim_lsfCbTbl[i] + j];
}
pos += dim_lsfCbTbl[i];
cb_pos += size_lsfCbTbl[i]*dim_lsfCbTbl[i];
}

if (lpc_n>1) {

/* decode last LSF */

pos = 0;
cb_pos = 0;
for (i = 0; i < LSF_NSPLIT; i++) {
for (j = 0; j < dim_lsfCbTbl[i]; j++) {
lsfdeq[LPC_FILTERORDER + pos + j] =
lsfCbTbl[cb_pos +
(long)(index[LSF_NSPLIT + i])*
dim_lsfCbTbl[i] + j];
}
pos += dim_lsfCbTbl[i];
cb_pos += size_lsfCbTbl[i]*dim_lsfCbTbl[i];
}
}
}

/*----------------------------------------------------------------*
* obtain synthesis and weighting filters form lsf coefficients
*---------------------------------------------------------------*/

void DecoderInterpolateLSF(
float *syntdenum, /* (o) synthesis filter coefficients */
float *weightdenum, /* (o) weighting denumerator
coefficients */
float *lsfdeq, /* (i) dequantized lsf coefficients */
int length, /* (i) length of lsf coefficient vector */
iLBC_Dec_Inst_t *iLBCdec_inst
/* (i) the decoder state structure */
){
int i, pos, lp_length;
float lp[LPC_FILTERORDER + 1], *lsfdeq2;






lsfdeq2 = lsfdeq + length;
lp_length = length + 1;

if (iLBCdec_inst->mode==30) {
/* sub-frame 1: Interpolation between old and first */

LSFinterpolate2a_dec(lp, iLBCdec_inst->lsfdeqold, lsfdeq,
lsf_weightTbl_30ms[0], length);
memcpy(syntdenum,lp,lp_length*sizeof(float));
bwexpand(weightdenum, lp, LPC_CHIRP_WEIGHTDENUM,
lp_length);

/* sub-frames 2 to 6: interpolation between first
and last LSF */

pos = lp_length;
for (i = 1; i < 6; i++) {
LSFinterpolate2a_dec(lp, lsfdeq, lsfdeq2,
lsf_weightTbl_30ms[i], length);
memcpy(syntdenum + pos,lp,lp_length*sizeof(float));
bwexpand(weightdenum + pos, lp,
LPC_CHIRP_WEIGHTDENUM, lp_length);
pos += lp_length;
}
}
else {
pos = 0;
for (i = 0; i < iLBCdec_inst->nsub; i++) {
LSFinterpolate2a_dec(lp, iLBCdec_inst->lsfdeqold,
lsfdeq, lsf_weightTbl_20ms[i], length);
memcpy(syntdenum+pos,lp,lp_length*sizeof(float));
bwexpand(weightdenum+pos, lp, LPC_CHIRP_WEIGHTDENUM,
lp_length);
pos += lp_length;
}
}

/* update memory */

if (iLBCdec_inst->mode==30)
memcpy(iLBCdec_inst->lsfdeqold, lsfdeq2,
length*sizeof(float));
else
memcpy(iLBCdec_inst->lsfdeqold, lsfdeq,
length*sizeof(float));

}






52 changes: 52 additions & 0 deletions asterisk/codecs/ilbc/LPCdecode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

/******************************************************************

iLBC Speech Coder ANSI-C Source Code

LPC_decode.h

Copyright (C) The Internet Society (2004).
All Rights Reserved.

******************************************************************/

#ifndef __iLBC_LPC_DECODE_H
#define __iLBC_LPC_DECODE_H

void LSFinterpolate2a_dec(
float *a, /* (o) lpc coefficients for a sub-frame */
float *lsf1, /* (i) first lsf coefficient vector */
float *lsf2, /* (i) second lsf coefficient vector */
float coef, /* (i) interpolation weight */
int length /* (i) length of lsf vectors */
);

void SimplelsfDEQ(
float *lsfdeq, /* (o) dequantized lsf coefficients */
int *index, /* (i) quantization index */
int lpc_n /* (i) number of LPCs */
);

void DecoderInterpolateLSF(
float *syntdenum, /* (o) synthesis filter coefficients */
float *weightdenum, /* (o) weighting denumerator
coefficients */
float *lsfdeq, /* (i) dequantized lsf coefficients */
int length, /* (i) length of lsf coefficient vector */
iLBC_Dec_Inst_t *iLBCdec_inst
/* (i) the decoder state structure */
);

#endif












Loading