bring this in sync with latest voipcodec release... need to update mod_voipcodecs.c to new lpc10 changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7572 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e2b87c93aa
commit
0652b56fe1
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser Lesser GNU General Public License version 2.1.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -22,7 +23,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711.c,v 1.4 2006/11/19 14:07:24 steveu Exp $
|
||||
* $Id: g711.c,v 1.6 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser Lesser GNU General Public License version 2.1.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -28,7 +29,7 @@
|
|||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722_decode.c,v 1.19 2007/03/14 11:51:01 steveu Exp $
|
||||
* $Id: g722_decode.c,v 1.20 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser Lesser GNU General Public License version 2.1.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -28,7 +29,7 @@
|
|||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722_encode.c,v 1.17 2007/03/14 11:51:01 steveu Exp $
|
||||
* $Id: g722_encode.c,v 1.18 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -48,7 +49,7 @@
|
|||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*
|
||||
* $Id: g726.c,v 1.17 2006/11/19 14:07:24 steveu Exp $
|
||||
* $Id: g726.c,v 1.18 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_decode.c,v 1.14 2007/08/21 14:25:54 steveu Exp $
|
||||
* $Id: gsm0610_decode.c,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_encode.c,v 1.17 2007/11/26 13:28:59 steveu Exp $
|
||||
* $Id: gsm0610_encode.c,v 1.18 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_long_term.c,v 1.10 2007/08/20 15:22:22 steveu Exp $
|
||||
* $Id: gsm0610_long_term.c,v 1.11 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_lpc.c,v 1.15 2007/08/20 15:22:22 steveu Exp $
|
||||
* $Id: gsm0610_lpc.c,v 1.16 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_preprocess.c,v 1.8 2007/08/20 15:22:22 steveu Exp $
|
||||
* $Id: gsm0610_preprocess.c,v 1.9 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_rpe.c,v 1.14 2007/08/20 15:22:22 steveu Exp $
|
||||
* $Id: gsm0610_rpe.c,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -25,7 +26,7 @@
|
|||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_short_term.c,v 1.10 2007/08/20 15:22:22 steveu Exp $
|
||||
* $Id: gsm0610_short_term.c,v 1.11 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,7 +27,7 @@
|
|||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_analyse.c,v 1.13 2007/01/03 14:15:35 steveu Exp $
|
||||
* $Id: lpc10_analyse.c,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -78,13 +79,13 @@ static void remove_dc_bias(float speech[], int len, float sigout[])
|
|||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void eval_amdf(float speech[],
|
||||
int32_t lpita,
|
||||
const int32_t tau[],
|
||||
int32_t ltau,
|
||||
int32_t maxlag,
|
||||
float amdf[],
|
||||
int32_t *minptr,
|
||||
int32_t *maxptr)
|
||||
int32_t lpita,
|
||||
const int32_t tau[],
|
||||
int32_t ltau,
|
||||
int32_t maxlag,
|
||||
float amdf[],
|
||||
int32_t *minptr,
|
||||
int32_t *maxptr)
|
||||
{
|
||||
float sum;
|
||||
int i;
|
||||
|
@ -307,13 +308,13 @@ static void dynamic_pitch_tracking(lpc10_encode_state_t *s,
|
|||
|
||||
/* Detection of onsets in (or slightly preceding) the futuremost frame of speech. */
|
||||
static void onset(lpc10_encode_state_t *s,
|
||||
float *pebuf,
|
||||
int32_t osbuf[],
|
||||
int32_t *osptr,
|
||||
int32_t oslen,
|
||||
int32_t sbufl,
|
||||
int32_t sbufh,
|
||||
int32_t lframe)
|
||||
float *pebuf,
|
||||
int32_t osbuf[],
|
||||
int32_t *osptr,
|
||||
int32_t oslen,
|
||||
int32_t sbufl,
|
||||
int32_t sbufh,
|
||||
int32_t lframe)
|
||||
{
|
||||
int32_t i;
|
||||
float r1;
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,7 +27,7 @@
|
|||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_decode.c,v 1.16 2007/11/26 13:28:59 steveu Exp $
|
||||
* $Id: lpc10_decode.c,v 1.18 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1079,7 +1080,7 @@ int lpc10_decode_release(lpc10_decode_state_t *s)
|
|||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int quant)
|
||||
int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len)
|
||||
{
|
||||
int voice[2];
|
||||
int32_t pitch;
|
||||
|
@ -1089,18 +1090,21 @@ int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], i
|
|||
float rms;
|
||||
int i;
|
||||
int j;
|
||||
int base;
|
||||
|
||||
/* Decode 54 bits to LPC10_SAMPLES_PER_FRAME speech samples. */
|
||||
for (i = 0; i < quant; i++)
|
||||
/* Decode 54 bits in 7 bytes to LPC10_SAMPLES_PER_FRAME speech samples. */
|
||||
len /= 7;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
lpc10_unpack(&frame, &code[i*7]);
|
||||
decode(s, &frame, voice, &pitch, &rms, rc);
|
||||
synths(s, voice, &pitch, &rms, rc, speech);
|
||||
base = i*LPC10_SAMPLES_PER_FRAME;
|
||||
for (j = 0; j < LPC10_SAMPLES_PER_FRAME; j++)
|
||||
amp[i*LPC10_SAMPLES_PER_FRAME + j] = (int16_t) rintf(32768.0f*speech[j]);
|
||||
amp[base + j] = (int16_t) rintf(32768.0f*speech[j]);
|
||||
}
|
||||
|
||||
return quant*LPC10_SAMPLES_PER_FRAME;
|
||||
return len*LPC10_SAMPLES_PER_FRAME;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,7 +27,7 @@
|
|||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_encode.c,v 1.17 2007/11/26 13:28:59 steveu Exp $
|
||||
* $Id: lpc10_encode.c,v 1.19 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -368,7 +369,7 @@ int lpc10_encode_release(lpc10_encode_state_t *s)
|
|||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int quant)
|
||||
int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len)
|
||||
{
|
||||
int32_t voice[2];
|
||||
int32_t pitch;
|
||||
|
@ -379,7 +380,8 @@ int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], i
|
|||
int i;
|
||||
int j;
|
||||
|
||||
for (i = 0; i < quant; i++)
|
||||
len /= LPC10_SAMPLES_PER_FRAME;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
for (j = 0; j < LPC10_SAMPLES_PER_FRAME; j++)
|
||||
speech[j] = (float) amp[i*LPC10_SAMPLES_PER_FRAME + j]/32768.0f;
|
||||
|
@ -388,7 +390,7 @@ int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], i
|
|||
encode(s, &frame, voice, pitch, rms, rc);
|
||||
lpc10_pack(s, &code[7*i], &frame);
|
||||
}
|
||||
return quant*7;
|
||||
return len*7;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,7 +27,7 @@
|
|||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_placev.c,v 1.12 2007/01/03 14:15:35 steveu Exp $
|
||||
* $Id: lpc10_placev.c,v 1.13 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,7 +27,7 @@
|
|||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_voicing.c,v 1.7 2006/11/30 15:41:47 steveu Exp $
|
||||
* $Id: lpc10_voicing.c,v 1.9 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -51,19 +52,19 @@
|
|||
#include "lpc10_encdecs.h"
|
||||
|
||||
static void vparms(int32_t vwin[],
|
||||
float *inbuf,
|
||||
float *lpbuf,
|
||||
const int32_t buflim[],
|
||||
int32_t half,
|
||||
float *dither,
|
||||
int32_t *mintau,
|
||||
int32_t *zc,
|
||||
int32_t *lbe,
|
||||
int32_t *fbe,
|
||||
float *qs,
|
||||
float *rc1,
|
||||
float *ar_b,
|
||||
float *ar_f)
|
||||
float *inbuf,
|
||||
float *lpbuf,
|
||||
const int32_t buflim[],
|
||||
int32_t half,
|
||||
float *dither,
|
||||
int32_t *mintau,
|
||||
int32_t *zc,
|
||||
int32_t *lbe,
|
||||
int32_t *fbe,
|
||||
float *qs,
|
||||
float *rc1,
|
||||
float *ar_b,
|
||||
float *ar_f)
|
||||
{
|
||||
int32_t inbuf_offset;
|
||||
int32_t lpbuf_offset;
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -27,7 +28,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: oki_adpcm.c,v 1.22 2006/11/28 16:59:56 steveu Exp $
|
||||
* $Id: oki_adpcm.c,v 1.23 2008/02/09 15:33:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* bit_operations.h - Various bit level operations, such as bit reversal
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* bitstream.h - Bitstream composition and decomposition routines.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* dc_restore.h - General telephony routines to restore the zero D.C.
|
||||
* level to audio which has a D.C. bias.
|
||||
|
@ -11,7 +11,7 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g711.h - In line A-law and u-law conversion routines
|
||||
*
|
||||
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -22,7 +23,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711.h,v 1.8 2007/12/13 11:31:32 steveu Exp $
|
||||
* $Id: g711.h,v 1.9 2008/02/09 15:32:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g722.h - The ITU G.722 codec.
|
||||
*
|
||||
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -28,7 +29,7 @@
|
|||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722.h,v 1.16 2007/04/08 08:16:17 steveu Exp $
|
||||
* $Id: g722.h,v 1.17 2008/02/09 15:32:26 steveu Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g726.h - ITU G.726 codec.
|
||||
*
|
||||
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -22,33 +23,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Based on G.721/G.723 code which is:
|
||||
*
|
||||
* This source code is a product of Sun Microsystems, Inc. and is provided
|
||||
* for unrestricted use. Users may copy or modify this source code without
|
||||
* charge.
|
||||
*
|
||||
* SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
|
||||
* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun source code is provided with no support and without any obligation on
|
||||
* the part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*
|
||||
* $Id: g726.h,v 1.18 2007/12/13 11:31:32 steveu Exp $
|
||||
* $Id: g726.h,v 1.19 2008/02/09 15:32:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610.h - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -22,7 +23,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: gsm0610.h,v 1.13 2007/12/13 11:31:32 steveu Exp $
|
||||
* $Id: gsm0610.h,v 1.14 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_GSM0610_H_)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* imaadpcm.c - Conversion routines between linear 16 bit PCM data and
|
||||
* IMA/DVI/Intel ADPCM format.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10.h - LPC10 low bit rate speech codec.
|
||||
*
|
||||
|
@ -10,8 +10,9 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -22,7 +23,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: lpc10.h,v 1.13 2007/04/08 08:16:18 steveu Exp $
|
||||
* $Id: lpc10.h,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_LPC10_H_)
|
||||
|
@ -184,9 +185,10 @@ int lpc10_encode_release(lpc10_encode_state_t *s);
|
|||
\param s The LPC10e context.
|
||||
\param ima_data The LPC10e data produced.
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer.
|
||||
\param len The number of samples in the buffer. This must be a multiple of 180, as
|
||||
this is the number of samples on a frame.
|
||||
\return The number of bytes of LPC10e data produced. */
|
||||
int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int quant);
|
||||
int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len);
|
||||
|
||||
/*! Initialise an LPC10e decode context.
|
||||
\param s The LPC10e context
|
||||
|
@ -200,9 +202,10 @@ int lpc10_decode_release(lpc10_decode_state_t *s);
|
|||
\param s The LPC10e context.
|
||||
\param amp The audio sample buffer.
|
||||
\param code The LPC10e data.
|
||||
\param quant The number of frames of LPC10e data to be decoded.
|
||||
\param len The number of bytes of LPC10e data to be decoded. This must be a multiple of 7,
|
||||
as each frame is packed into 7 bytes.
|
||||
\return The number of samples returned. */
|
||||
int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int quant);
|
||||
int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* oki_adpcm.h - Conversion routines between linear 16 bit PCM data and
|
||||
* OKI (Dialogic) ADPCM format.
|
||||
|
@ -8,14 +8,12 @@
|
|||
*
|
||||
* Copyright (C) 2001 Steve Underwood
|
||||
*
|
||||
* Based on a bit from here, a bit from there, eye of toad,
|
||||
* ear of bat, etc - plus, of course, my own 2 cents.
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -26,7 +24,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: oki_adpcm.h,v 1.17 2007/12/13 11:31:33 steveu Exp $
|
||||
* $Id: oki_adpcm.h,v 1.18 2008/02/09 15:33:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* telephony.h - some very basic telephony definitions
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* vector_int.h
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* version.h - A tag file, so the exact installed revision can be assertained.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* version.h - A tag file, so the exact installed revision can be assertained.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue