<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][16071] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=16071">16071</a></dd>
<dt>Author</dt> <dd>mikej</dd>
<dt>Date</dt> <dd>2009-12-28 19:58:30 -0600 (Mon, 28 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>update spandsp to snapshot <a href="http://jira.freeswitch.org/browse/spandsp-20091228">spandsp-20091228</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunklibsspandspupdate">freeswitch/trunk/libs/spandsp/.update</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcbitstreamc">freeswitch/trunk/libs/spandsp/src/bitstream.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcg726c">freeswitch/trunk/libs/spandsp/src/g726.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcgsm0610_rpec">freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrclpc10_decodec">freeswitch/trunk/libs/spandsp/src/lpc10_decode.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcmake_modem_filterc">freeswitch/trunk/libs/spandsp/src/make_modem_filter.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspbitstreamh">freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspprivatebitstreamh">freeswitch/trunk/libs/spandsp/src/spandsp/private/bitstream.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspprivatev17rxh">freeswitch/trunk/libs/spandsp/src/spandsp/private/v17rx.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspprivatev17txh">freeswitch/trunk/libs/spandsp/src/spandsp/private/v17tx.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspprivatev8h">freeswitch/trunk/libs/spandsp/src/spandsp/private/v8.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspv17txh">freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspv8h">freeswitch/trunk/libs/spandsp/src/spandsp/v8.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcspandspversionh">freeswitch/trunk/libs/spandsp/src/spandsp/version.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcv17_v32bis_rx_constellation_mapsh">freeswitch/trunk/libs/spandsp/src/v17_v32bis_rx_constellation_maps.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcv17_v32bis_tx_constellation_mapsh">freeswitch/trunk/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcv17rxc">freeswitch/trunk/libs/spandsp/src/v17rx.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcv17txc">freeswitch/trunk/libs/spandsp/src/v17tx.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcv29rxc">freeswitch/trunk/libs/spandsp/src/v29rx.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcv8c">freeswitch/trunk/libs/spandsp/src/v8.c</a></li>
<li><a href="#freeswitchtrunklibsspandspsrcvector_intc">freeswitch/trunk/libs/spandsp/src/vector_int.c</a></li>
<li><a href="#freeswitchtrunklibsspandsptestsv8_testsc">freeswitch/trunk/libs/spandsp/tests/v8_tests.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunklibsspandspupdate"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/.update (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/.update        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/.update        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -1 +1 @@
</span><del>-Wed Dec 23 11:53:35 EST 2009
</del><ins>+Mon Dec 28 20:58:04 EST 2009
</ins></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcbitstreamc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/bitstream.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/bitstream.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/bitstream.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: bitstream.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
</del><ins>+ * $Id: bitstream.c,v 1.18.4.1 2009/12/28 12:20:46 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -44,33 +44,48 @@
</span><span class="cx"> SPAN_DECLARE(void) bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
</span><span class="cx"> {
</span><span class="cx"> value &= ((1 << bits) - 1);
</span><del>- if (s->residue + bits <= 32)
</del><ins>+ if (s->lsb_first)
</ins><span class="cx"> {
</span><del>- s->bitstream |= (value << s->residue);
- s->residue += bits;
</del><ins>+ if (s->residue + bits <= 32)
+ {
+ s->bitstream |= (value << s->residue);
+ s->residue += bits;
+ }
+ while (s->residue >= 8)
+ {
+ s->residue -= 8;
+ *(*c)++ = (uint8_t) (s->bitstream & 0xFF);
+ s->bitstream >>= 8;
+ }
</ins><span class="cx"> }
</span><del>- while (s->residue >= 8)
</del><ins>+ else
</ins><span class="cx"> {
</span><del>- s->residue -= 8;
- *(*c)++ = (uint8_t) (s->bitstream & 0xFF);
- s->bitstream >>= 8;
</del><ins>+ if (s->residue + bits <= 32)
+ {
+ s->bitstream = (s->bitstream << bits) | value;
+ s->residue += bits;
+ }
+ while (s->residue >= 8)
+ {
+ s->residue -= 8;
+ *(*c)++ = (uint8_t) ((s->bitstream >> s->residue) & 0xFF);
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><del>-SPAN_DECLARE(void) bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
</del><ins>+SPAN_DECLARE(void) bitstream_flush(bitstream_state_t *s, uint8_t **c)
</ins><span class="cx"> {
</span><del>- value &= ((1 << bits) - 1);
- if (s->residue + bits <= 32)
</del><ins>+ if (s->residue > 0)
</ins><span class="cx"> {
</span><del>- s->bitstream = (s->bitstream << bits) | value;
- s->residue += bits;
</del><ins>+ s->bitstream &= ((1 << s->residue) - 1);
+ if (s->lsb_first)
+ *(*c)++ = (uint8_t) s->bitstream;
+ else
+ *(*c)++ = (uint8_t) (s->bitstream << (8 - s->residue));
+ s->residue = 0;
</ins><span class="cx"> }
</span><del>- while (s->residue >= 8)
- {
- s->residue -= 8;
- *(*c)++ = (uint8_t) ((s->bitstream >> s->residue) & 0xFF);
- }
</del><ins>+ s->bitstream = 0;
</ins><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><span class="lines">@@ -78,55 +93,33 @@
</span><span class="cx"> {
</span><span class="cx"> uint32_t x;
</span><span class="cx">
</span><del>- while (s->residue < bits)
</del><ins>+ if (s->lsb_first)
</ins><span class="cx"> {
</span><del>- s->bitstream |= (((uint32_t) *(*c)++) << s->residue);
- s->residue += 8;
</del><ins>+ while (s->residue < bits)
+ {
+ s->bitstream |= (((uint32_t) *(*c)++) << s->residue);
+ s->residue += 8;
+ }
+ s->residue -= bits;
+ x = s->bitstream & ((1 << bits) - 1);
+ s->bitstream >>= bits;
</ins><span class="cx"> }
</span><del>- s->residue -= bits;
- x = s->bitstream & ((1 << bits) - 1);
- s->bitstream >>= bits;
- return x;
-}
-/*- End of function --------------------------------------------------------*/
-
-SPAN_DECLARE(uint32_t) bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
-{
- uint32_t x;
-
- while (s->residue < bits)
</del><ins>+ else
</ins><span class="cx"> {
</span><del>- s->bitstream = (s->bitstream << 8) | ((uint32_t) *(*c)++);
- s->residue += 8;
</del><ins>+ while (s->residue < bits)
+ {
+ s->bitstream = (s->bitstream << 8) | ((uint32_t) *(*c)++);
+ s->residue += 8;
+ }
+ s->residue -= bits;
+ x = (s->bitstream >> s->residue) & ((1 << bits) - 1);
</ins><span class="cx"> }
</span><del>- s->residue -= bits;
- x = (s->bitstream >> s->residue) & ((1 << bits) - 1);
</del><span class="cx"> return x;
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><del>-SPAN_DECLARE(void) bitstream_flush(bitstream_state_t *s, uint8_t **c)
</del><ins>+SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s, int lsb_first)
</ins><span class="cx"> {
</span><del>- if (s->residue > 0)
- {
- *(*c)++ = (uint8_t) ((s->bitstream << (8 - s->residue)) & 0xFF);
- s->residue = 0;
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-SPAN_DECLARE(void) bitstream_flush2(bitstream_state_t *s, uint8_t **c)
-{
- if (s->residue > 0)
- {
- *(*c)++ = (uint8_t) ((s->bitstream << (8 - s->residue)) & 0xFF);
- s->residue = 0;
- }
-}
-/*- End of function --------------------------------------------------------*/
-
-SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s)
-{
</del><span class="cx"> if (s == NULL)
</span><span class="cx"> {
</span><span class="cx"> if ((s = (bitstream_state_t *) malloc(sizeof(*s))) == NULL)
</span><span class="lines">@@ -134,6 +127,7 @@
</span><span class="cx"> }
</span><span class="cx"> s->bitstream = 0;
</span><span class="cx"> s->residue = 0;
</span><ins>+ s->lsb_first = lsb_first;
</ins><span class="cx"> return s;
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcg726c"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/g726.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/g726.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/g726.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> * 2550 Garcia Avenue
</span><span class="cx"> * Mountain View, California 94043
</span><span class="cx"> *
</span><del>- * $Id: g726.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
</del><ins>+ * $Id: g726.c,v 1.28.4.1 2009/12/28 12:20:46 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -1052,7 +1052,7 @@
</span><span class="cx"> s->bits_per_sample = 5;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- bitstream_init(&s->bs);
</del><ins>+ bitstream_init(&s->bs, (s->packing != G726_PACKING_LEFT));
</ins><span class="cx"> return s;
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcgsm0610_rpec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> * This code is based on the widely used GSM 06.10 code available from
</span><span class="cx"> * http://kbs.cs.tu-berlin.de/~jutta/toast.html
</span><span class="cx"> *
</span><del>- * $Id: gsm0610_rpe.c,v 1.25.4.1 2009/12/19 09:47:56 steveu Exp $
</del><ins>+ * $Id: gsm0610_rpe.c,v 1.25.4.2 2009/12/28 11:54:58 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx"> #include "floating_fudge.h"
</span><span class="cx"> #include <stdlib.h>
</span><span class="cx">
</span><ins>+#include "mmx_sse_decs.h"
+
</ins><span class="cx"> #include "spandsp/telephony.h"
</span><span class="cx"> #include "spandsp/fast_convert.h"
</span><span class="cx"> #include "spandsp/bitstream.h"
</span><span class="lines">@@ -55,26 +57,17 @@
</span><span class="cx">
</span><span class="cx"> /* 4.2.13 .. 4.2.17 RPE ENCODING SECTION */
</span><span class="cx">
</span><del>-#if defined(__GNUC__) && defined(__i386__)
-#define SPANDSP_USE_I386_ASM
-#if (defined(__APPLE__) || defined(macintosh)) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-#undef SPANDSP_USE_I386_ASM
-#endif
-#endif
-#endif
-
</del><span class="cx"> /* 4.2.13 */
</span><del>-static void weighting_filter(const int16_t *e, // signal [-5..0.39.44] IN
- int16_t x[40])
</del><ins>+static void weighting_filter(int16_t x[40],
+ const int16_t *e) // signal [-5..0.39.44] IN)
</ins><span class="cx"> {
</span><del>-#if defined(SPANDSP_USE_I386_ASM)
</del><ins>+#if defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__x86_64__)
</ins><span class="cx"> /* Table 4.4 Coefficients of the weighting filter */
</span><span class="cx"> /* This must be padded to a multiple of 4 for MMX to work */
</span><span class="cx"> static const union
</span><span class="cx"> {
</span><span class="cx"> int16_t gsm_H[12];
</span><del>- uint64_t x[3];
</del><ins>+ __m64 x[3];
</ins><span class="cx"> } gsm_H =
</span><span class="cx"> {
</span><span class="cx"> {
</span><span class="lines">@@ -85,12 +78,68 @@
</span><span class="cx">
</span><span class="cx"> __asm__ __volatile__(
</span><span class="cx"> " emms;\n"
</span><ins>+ " addq $-10,%%rcx;\n"
+ " leaq %[gsm_H],%%rax;\n"
+ " movq (%%rax),%%mm1;\n"
+ " movq 8(%%rax),%%mm2;\n"
+ " movq 16(%%rax),%%mm3;\n"
+ " movq $0x1000,%%rax;\n"
+ " movq %%rax,%%mm5;\n" /* For rounding */
+ " xorq %%rsi,%%rsi;\n"
+ " .p2align 2;\n"
+ "1:\n"
+ " movq (%%rcx,%%rsi,2),%%mm0;\n"
+ " pmaddwd %%mm1,%%mm0;\n"
+
+ " movq 8(%%rcx,%%rsi,2),%%mm4;\n"
+ " pmaddwd %%mm2,%%mm4;\n"
+ " paddd %%mm4,%%mm0;\n"
+
+ " movq 16(%%rcx,%%rsi,2),%%mm4;\n"
+ " pmaddwd %%mm3,%%mm4;\n"
+ " paddd %%mm4,%%mm0;\n"
+
+ " movq %%mm0,%%mm4;\n"
+ " punpckhdq %%mm0,%%mm4;\n" /* mm4 has high int32 of mm0 dup'd */
+ " paddd %%mm4,%%mm0;\n"
+
+ " paddd %%mm5,%%mm0;\n" /* Add for roundoff */
+ " psrad $13,%%mm0;\n"
+ " packssdw %%mm0,%%mm0;\n"
+ " movd %%mm0,%%eax;\n" /* eax has result */
+ " movw %%ax,(%%rdi,%%rsi,2);\n"
+ " incq %%rsi;\n"
+ " cmpq $39,%%rsi;\n"
+ " jle 1b;\n"
+ " emms;\n"
+ :
+ : "c" (e), "D" (x), [gsm_H] "X" (gsm_H)
+ : "rax", "rdx", "rsi", "memory"
+ );
+#elif defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__i386__)
+ /* Table 4.4 Coefficients of the weighting filter */
+ /* This must be padded to a multiple of 4 for MMX to work */
+ static const union
+ {
+ int16_t gsm_H[12];
+ __m64_t x[3];
+ } gsm_H =
+ {
+ {
+ -134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134, 0
+ }
+
+ };
+
+ __asm__ __volatile__(
+ " emms;\n"
</ins><span class="cx"> " addl $-10,%%ecx;\n"
</span><ins>+ " leal %[gsm_H],%%eax;\n"
+ " movq (%%eax),%%mm1;\n"
+ " movq 8(%%eax),%%mm2;\n"
+ " movq 16(%%eax),%%mm3;\n"
</ins><span class="cx"> " movl $0x1000,%%eax;\n"
</span><span class="cx"> " movd %%eax,%%mm5;\n" /* For rounding */
</span><del>- " movq %[gsm_H],%%mm1;\n"
- " movq %[gsm_H8],%%mm2;\n"
- " movq %[gsm_H16],%%mm3;\n"
</del><span class="cx"> " xorl %%esi,%%esi;\n"
</span><span class="cx"> " .p2align 2;\n"
</span><span class="cx"> "1:\n"
</span><span class="lines">@@ -119,8 +168,8 @@
</span><span class="cx"> " jle 1b;\n"
</span><span class="cx"> " emms;\n"
</span><span class="cx"> :
</span><del>- : "c" (e), "D" (x), [gsm_H] "X" (gsm_H.x[0]), [gsm_H8] "X" (gsm_H.x[1]), [gsm_H16] "X" (gsm_H.x[2])
- : "eax", "edx", "esi"
</del><ins>+ : "c" (e), "D" (x), [gsm_H] "X" (gsm_H)
+ : "eax", "edx", "esi", "memory"
</ins><span class="cx"> );
</span><span class="cx"> #else
</span><span class="cx"> int32_t L_result;
</span><span class="lines">@@ -163,13 +212,13 @@
</span><span class="cx"> */
</span><span class="cx"> L_result += STEP( 0, -134);
</span><span class="cx"> L_result += STEP( 1, -374);
</span><del>- // += STEP( 2, 0 );
</del><ins>+ /* += STEP( 2, 0 ); */
</ins><span class="cx"> L_result += STEP( 3, 2054);
</span><span class="cx"> L_result += STEP( 4, 5741);
</span><span class="cx"> L_result += STEP( 5, 8192);
</span><span class="cx"> L_result += STEP( 6, 5741);
</span><span class="cx"> L_result += STEP( 7, 2054);
</span><del>- // += STEP( 8, 0 );
</del><ins>+ /* += STEP( 8, 0 ); */
</ins><span class="cx"> L_result += STEP( 9, -374);
</span><span class="cx"> L_result += STEP(10, -134);
</span><span class="cx">
</span><span class="lines">@@ -523,7 +572,7 @@
</span><span class="cx"> int16_t mant;
</span><span class="cx"> int16_t exp;
</span><span class="cx">
</span><del>- weighting_filter(e, x);
</del><ins>+ weighting_filter(x, e);
</ins><span class="cx"> rpe_grid_selection(x, xM, Mc);
</span><span class="cx">
</span><span class="cx"> apcm_quantization(xM, xMc, &mant, &exp, xmaxc);
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrclpc10_decodec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/lpc10_decode.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/lpc10_decode.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_decode.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> * implementation of the LPC-10 2400 bps Voice Coder. They do not
</span><span class="cx"> * exert copyright claims on their code, and it may be freely used.
</span><span class="cx"> *
</span><del>- * $Id: lpc10_decode.c,v 1.27 2009/02/10 13:06:46 steveu Exp $
</del><ins>+ * $Id: lpc10_decode.c,v 1.27.4.1 2009/12/24 17:00:19 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #if defined(HAVE_CONFIG_H)
</span><span class="lines">@@ -446,8 +446,7 @@
</span><span class="cx"> xxy = expf(xxy);
</span><span class="cx"> rci[j + *nout*rci_dim1 + 1] = (xxy - 1.0f)/(xxy + 1.0f);
</span><span class="cx"> }
</span><del>- rmsi[*nout - 1] = logf(s->rmso) + prop*(logf(*rms) - logf(s->rmso));
- rmsi[*nout - 1] = expf(rmsi[*nout - 1]);
</del><ins>+ rmsi[*nout - 1] = expf(logf(s->rmso) + prop*(logf(*rms) - logf(s->rmso)));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (vflag != 1)
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcmake_modem_filterc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/make_modem_filter.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/make_modem_filter.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/make_modem_filter.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> * along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: make_modem_filter.c,v 1.17 2009/10/03 04:37:25 steveu Exp $
</del><ins>+ * $Id: make_modem_filter.c,v 1.17.4.1 2009/12/28 12:20:46 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #if defined(HAVE_CONFIG_H)
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- if (strcmp(modem, "V.17") == 0)
</del><ins>+ if (strcmp(modem, "V.17") == 0 || strcmp(modem, "V.32bis") == 0)
</ins><span class="cx"> {
</span><span class="cx"> /* This applies to V.32bis as well as V.17 */
</span><span class="cx"> rx_coeff_sets = 192;
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspbitstreamh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: bitstream.h,v 1.14 2009/02/10 13:06:47 steveu Exp $
</del><ins>+ * $Id: bitstream.h,v 1.14.4.1 2009/12/28 12:20:47 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> /*! Bitstream handler state */
</span><span class="cx"> typedef struct bitstream_state_s bitstream_state_t;
</span><span class="cx">
</span><del>-
</del><span class="cx"> #if defined(__cplusplus)
</span><span class="cx"> extern "C"
</span><span class="cx"> {
</span><span class="lines">@@ -52,8 +51,6 @@
</span><span class="cx"> \param bits The number of bits of value to be pushed. 1 to 25 bits is valid. */
</span><span class="cx"> SPAN_DECLARE(void) bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
</span><span class="cx">
</span><del>-SPAN_DECLARE(void) bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
-
</del><span class="cx"> /*! \brief Get a chunk of bits from the input buffer.
</span><span class="cx"> \param s A pointer to the bitstream context.
</span><span class="cx"> \param c A pointer to the bitstream input buffer.
</span><span class="lines">@@ -61,19 +58,16 @@
</span><span class="cx"> \return The value retrieved from the input buffer. */
</span><span class="cx"> SPAN_DECLARE(uint32_t) bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
</span><span class="cx">
</span><del>-SPAN_DECLARE(uint32_t) bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits);
-
</del><span class="cx"> /*! \brief Flush any residual bit to the output buffer.
</span><span class="cx"> \param s A pointer to the bitstream context.
</span><span class="cx"> \param c A pointer to the bitstream output buffer. */
</span><span class="cx"> SPAN_DECLARE(void) bitstream_flush(bitstream_state_t *s, uint8_t **c);
</span><span class="cx">
</span><del>-SPAN_DECLARE(void) bitstream_flush2(bitstream_state_t *s, uint8_t **c);
-
</del><span class="cx"> /*! \brief Initialise a bitstream context.
</span><span class="cx"> \param s A pointer to the bitstream context.
</span><ins>+ \param lsb_first TRUE if the bit stream is LSB first, else its MSB first.
</ins><span class="cx"> \return A pointer to the bitstream context. */
</span><del>-SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s);
</del><ins>+SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s, int direction);
</ins><span class="cx">
</span><span class="cx"> SPAN_DECLARE(int) bitstream_release(bitstream_state_t *s);
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspprivatebitstreamh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/bitstream.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/private/bitstream.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/bitstream.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: bitstream.h,v 1.1 2008/11/30 12:45:09 steveu Exp $
</del><ins>+ * $Id: bitstream.h,v 1.1.4.1 2009/12/28 12:20:47 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #if !defined(_SPANDSP_PRIVATE_BITSTREAM_H_)
</span><span class="lines">@@ -35,6 +35,8 @@
</span><span class="cx"> uint32_t bitstream;
</span><span class="cx"> /*! The residual bits in bitstream. */
</span><span class="cx"> int residue;
</span><ins>+ /*! TRUE if the stream is LSB first, else MSB first */
+ int lsb_first;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspprivatev17rxh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/v17rx.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/private/v17rx.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/v17rx.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17rx.h,v 1.2 2009/07/09 13:52:09 steveu Exp $
</del><ins>+ * $Id: v17rx.h,v 1.2.4.1 2009/12/24 16:52:30 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #if !defined(_SPANDSP_PRIVATE_V17RX_H_)
</span><span class="lines">@@ -84,7 +84,10 @@
</span><span class="cx"> /*! \brief The state of the differential decoder */
</span><span class="cx"> int diff;
</span><span class="cx"> /*! \brief The register for the data scrambler. */
</span><del>- unsigned int scramble_reg;
</del><ins>+ uint32_t scramble_reg;
+ /*! \brief Scrambler tap */
+ //int scrambler_tap;
+
</ins><span class="cx"> /*! \brief TRUE if the short training sequence is to be used. */
</span><span class="cx"> int short_train;
</span><span class="cx"> /*! \brief The section of the training data we are currently in. */
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspprivatev17txh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/v17tx.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/private/v17tx.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/v17tx.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17tx.h,v 1.2 2009/07/09 13:52:09 steveu Exp $
</del><ins>+ * $Id: v17tx.h,v 1.2.4.1 2009/12/24 16:52:30 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -71,9 +71,13 @@
</span><span class="cx"> int diff;
</span><span class="cx"> /*! \brief The current state of the convolutional encoder. */
</span><span class="cx"> int convolution;
</span><ins>+ /*! \brief The code number for the current position in the constellation. */
+ int constellation_state;
</ins><span class="cx">
</span><span class="cx"> /*! \brief The register for the data scrambler. */
</span><del>- unsigned int scramble_reg;
</del><ins>+ uint32_t scramble_reg;
+ /*! \brief Scrambler tap */
+ //int scrambler_tap;
</ins><span class="cx"> /*! \brief TRUE if transmitting the training sequence. FALSE if transmitting user data. */
</span><span class="cx"> int in_training;
</span><span class="cx"> /*! \brief TRUE if the short training sequence is to be used. */
</span><span class="lines">@@ -87,8 +91,6 @@
</span><span class="cx"> int32_t carrier_phase_rate;
</span><span class="cx"> /*! \brief The current fractional phase of the baud timing. */
</span><span class="cx"> int baud_phase;
</span><del>- /*! \brief The code number for the current position in the constellation. */
- int constellation_state;
</del><span class="cx">
</span><span class="cx"> /*! \brief A pointer to the constellation currently in use. */
</span><span class="cx"> #if defined(SPANDSP_USE_FIXED_POINT)
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspprivatev8h"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/v8.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/private/v8.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/v8.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v8.h,v 1.3 2009/11/04 15:52:06 steveu Exp $
</del><ins>+ * $Id: v8.h,v 1.3.4.1 2009/12/28 12:20:47 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #if !defined(_SPANDSP_PRIVATE_V8_H_)
</span><span class="lines">@@ -50,10 +50,10 @@
</span><span class="cx"> modem_connect_tones_rx_state_t ansam_rx;
</span><span class="cx">
</span><span class="cx"> /*! \brief Modulation schemes available at this end. */
</span><del>- int local_end_modulations;
- int common_modulations;
</del><ins>+ unsigned int far_end_modulations;
</ins><span class="cx">
</span><del>- v8_result_t result;
</del><ins>+ v8_parms_t parms;
+ v8_parms_t result;
</ins><span class="cx">
</span><span class="cx"> /* V.8 data parsing */
</span><span class="cx"> uint32_t bit_stream;
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspv17txh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17tx.h,v 1.43 2009/07/09 13:52:09 steveu Exp $
</del><ins>+ * $Id: v17tx.h,v 1.43.4.1 2009/12/24 16:52:30 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -102,12 +102,12 @@
</span><span class="cx"> use of the context, to initialise its contents.
</span><span class="cx"> \brief Initialise a V.17 modem transmit context.
</span><span class="cx"> \param s The modem context.
</span><del>- \param rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
</del><ins>+ \param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
</ins><span class="cx"> \param tep TRUE is the optional TEP tone is to be transmitted.
</span><span class="cx"> \param get_bit The callback routine used to get the data to be transmitted.
</span><span class="cx"> \param user_data An opaque pointer.
</span><span class="cx"> \return A pointer to the modem context, or NULL if there was a problem. */
</span><del>-SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
</del><ins>+SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
</ins><span class="cx">
</span><span class="cx"> /*! Reinitialise an existing V.17 modem transmit context, so it may be reused.
</span><span class="cx"> \brief Reinitialise an existing V.17 modem transmit context.
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspv8h"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v8.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/v8.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v8.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v8.h,v 1.31 2009/11/04 16:10:14 steveu Exp $
</del><ins>+ * $Id: v8.h,v 1.31.4.1 2009/12/28 12:20:47 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -43,9 +43,9 @@
</span><span class="cx"> #if !defined(_SPANDSP_V8_H_)
</span><span class="cx"> #define _SPANDSP_V8_H_
</span><span class="cx">
</span><del>-typedef struct v8_result_s v8_result_t;
</del><ins>+typedef struct v8_parms_s v8_parms_t;
</ins><span class="cx">
</span><del>-typedef void (v8_result_handler_t)(void *user_data, v8_result_t *result);
</del><ins>+typedef void (v8_result_handler_t)(void *user_data, v8_parms_t *result);
</ins><span class="cx">
</span><span class="cx"> enum v8_call_function_e
</span><span class="cx"> {
</span><span class="lines">@@ -102,18 +102,15 @@
</span><span class="cx">
</span><span class="cx"> typedef struct v8_state_s v8_state_t;
</span><span class="cx">
</span><del>-struct v8_result_s
</del><ins>+struct v8_parms_s
</ins><span class="cx"> {
</span><del>- int modem_connect_tone_detected;
</del><ins>+ int modem_connect_tone;
</ins><span class="cx"> int call_function;
</span><del>- int far_end_modulations;
- int negotiated_modulation;
</del><ins>+ unsigned int modulations;
</ins><span class="cx"> int protocol;
</span><span class="cx"> int pstn_access;
</span><del>- int nsf_seen;
- int nsf;
</del><span class="cx"> int pcm_modem_availability;
</span><del>- int t66_seen;
</del><ins>+ int nsf;
</ins><span class="cx"> int t66;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -122,20 +119,21 @@
</span><span class="cx"> {
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+SPAN_DECLARE(int) v8_restart(v8_state_t *s,
+ int calling_party,
+ v8_parms_t *parms);
+
</ins><span class="cx"> /*! Initialise a V.8 context.
</span><span class="cx"> \brief Initialise a V.8 context.
</span><span class="cx"> \param s The V.8 context.
</span><span class="cx"> \param calling_party TRUE if caller mode, else answerer mode.
</span><del>- \param use_ansam_pr TRUE if ANSam/ is to be used, else ANSam will be used.
- \param available_modulations A bitwise list of the modulation schemes to be
- advertised as available here.
</del><ins>+ \param parms The allowed parameters for the call.
</ins><span class="cx"> \param result_handler The callback routine used to handle the results of negotiation.
</span><span class="cx"> \param user_data An opaque pointer passed to the result_handler routine.
</span><span class="cx"> \return A pointer to the V.8 context, or NULL if there was a problem. */
</span><span class="cx"> SPAN_DECLARE(v8_state_t *) v8_init(v8_state_t *s,
</span><span class="cx"> int calling_party,
</span><del>- int use_ansam_pr,
- int available_modulations,
</del><ins>+ v8_parms_t *parms,
</ins><span class="cx"> v8_result_handler_t *result_handler,
</span><span class="cx"> void *user_data);
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcspandspversionh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -30,9 +30,9 @@
</span><span class="cx">
</span><span class="cx"> /* The date and time of the version are in UTC form. */
</span><span class="cx">
</span><del>-#define SPANDSP_RELEASE_DATE 20091223
-#define SPANDSP_RELEASE_TIME 143600
-#define SPANDSP_RELEASE_DATETIME_STRING "20091223 143600"
</del><ins>+#define SPANDSP_RELEASE_DATE 20091228
+#define SPANDSP_RELEASE_TIME 123351
+#define SPANDSP_RELEASE_DATETIME_STRING "20091228 123351"
</ins><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx"> /*- End of file ------------------------------------------------------------*/
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcv17_v32bis_rx_constellation_mapsh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/v17_v32bis_rx_constellation_maps.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/v17_v32bis_rx_constellation_maps.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/v17_v32bis_rx_constellation_maps.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17_v32bis_rx_constellation_maps.h,v 1.1 2009/06/02 11:51:57 steveu Exp $
</del><ins>+ * $Id: v17_v32bis_rx_constellation_maps.h,v 1.1.4.1 2009/12/24 16:52:30 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /* The following table maps the 8 soft-decisions associated with every possible point in the
</span><span class="lines">@@ -5514,4 +5514,1376 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+static const uint8_t constel_map_4800[36][36] =
+{ /* 4,800bps map - No trellis. V.32/V.32bis only */
+ {
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
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0x02,
+ 0x02,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03,
+ 0x03
+ }
+};
+
</ins><span class="cx"> /*- End of file ------------------------------------------------------------*/
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcv17_v32bis_tx_constellation_mapsh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/v17_v32bis_tx_constellation_maps.h        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17_v32bis_tx_constellation_maps.h,v 1.1 2009/06/02 11:51:57 steveu Exp $
</del><ins>+ * $Id: v17_v32bis_tx_constellation_maps.h,v 1.1.4.1 2009/12/24 16:52:30 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #if defined(SPANDSP_USE_FIXED_POINTx)
</span><span class="lines">@@ -299,16 +299,30 @@
</span><span class="cx"> {-2, -2} /* 0x0F */
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/* This one does not exist in V.17 as a data constellation. It is only
+ the equaliser training constellation. In V.32/V.32bis it is a data mode. */
</ins><span class="cx"> #if defined(SPANDSP_USE_FIXED_POINTx)
</span><span class="cx"> static const complexi16_t v17_v32bis_4800_constellation[4] =
</span><span class="cx"> #else
</span><span class="cx"> static const complexf_t v17_v32bis_4800_constellation[4] =
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><del>- {-6, -2},
- { 2, -6},
- { 6, 2},
- {-2, 6}
</del><ins>+ {-6, -2}, /* 0x00 */
+ {-2, 6}, /* 0x01 */
+ { 2, -6}, /* 0x02 */
+ { 6, 2} /* 0x03 */
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+#if defined(SPANDSP_USE_FIXED_POINTx)
+static const complexi16_t v17_v32bis_abcd_constellation[4] =
+#else
+static const complexf_t v17_v32bis_abcd_constellation[4] =
+#endif
+{
+ {-6, -2}, /* A */
+ { 2, -6}, /* B */
+ { 6, 2}, /* C */
+ {-2, 6} /* D */
+};
+
</ins><span class="cx"> /*- End of file ------------------------------------------------------------*/
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcv17rxc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/v17rx.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17rx.c,v 1.153.4.4 2009/12/19 14:18:13 steveu Exp $
</del><ins>+ * $Id: v17rx.c,v 1.153.4.6 2009/12/28 12:20:46 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -297,7 +297,8 @@
</span><span class="cx"> {
</span><span class="cx"> int out_bit;
</span><span class="cx">
</span><del>- out_bit = (in_bit ^ (s->scramble_reg >> 17) ^ (s->scramble_reg >> 22)) & 1;
</del><ins>+ //out_bit = (in_bit ^ (s->scramble_reg >> s->scrambler_tap) ^ (s->scramble_reg >> (23 - 1))) & 1;
+ out_bit = (in_bit ^ (s->scramble_reg >> (18 - 1)) ^ (s->scramble_reg >> (23 - 1))) & 1;
</ins><span class="cx"> s->scramble_reg <<= 1;
</span><span class="cx"> if (s->training_stage > TRAINING_STAGE_NORMAL_OPERATION && s->training_stage < TRAINING_STAGE_TCM_WINDUP)
</span><span class="cx"> s->scramble_reg |= out_bit;
</span><span class="lines">@@ -361,12 +362,22 @@
</span><span class="cx">
</span><span class="cx"> static int decode_baud(v17_rx_state_t *s, complexf_t *z)
</span><span class="cx"> {
</span><del>- static const int diff_code[16] =
</del><ins>+ static const uint8_t v32bis_4800_differential_decoder[4][4] =
</ins><span class="cx"> {
</span><del>- 0, 3, 2, 1, 1, 0, 3, 2, 2, 1, 0, 3, 3, 2, 1, 0
</del><ins>+ {2, 3, 0, 1},
+ {0, 2, 1, 3},
+ {3, 1, 2, 0},
+ {1, 0, 3, 2}
</ins><span class="cx"> };
</span><del>- static const int tcm_paths[8][4] =
</del><ins>+ static const uint8_t v17_differential_decoder[4][4] =
</ins><span class="cx"> {
</span><ins>+ {0, 1, 2, 3},
+ {3, 0, 1, 2},
+ {2, 3, 0, 1},
+ {1, 2, 3, 0}
+ };
+ static const uint8_t tcm_paths[8][4] =
+ {
</ins><span class="cx"> {0, 6, 2, 4},
</span><span class="cx"> {6, 0, 4, 2},
</span><span class="cx"> {2, 4, 0, 6},
</span><span class="lines">@@ -408,6 +419,17 @@
</span><span class="cx"> else if (im < 0)
</span><span class="cx"> im = 0;
</span><span class="cx">
</span><ins>+ if (s->bits_per_symbol == 2)
+ {
+ /* 4800bps V.32bis mode, without trellis coding */
+ nearest = constel_map_4800[re][im];
+ raw = v32bis_4800_differential_decoder[s->diff][nearest];
+ s->diff = nearest;
+ put_bit(s, raw);
+ put_bit(s, raw >> 1);
+ return nearest;
+ }
+
</ins><span class="cx"> /* Find a set of 8 candidate constellation positions, that are the closest
</span><span class="cx"> to the target, with different patterns in the last 3 bits. */
</span><span class="cx"> #if defined(SPANDSP_USE_FIXED_POINTx)
</span><span class="lines">@@ -515,7 +537,7 @@
</span><span class="cx"> nearest = s->full_path_to_past_state_locations[j][k] >> 1;
</span><span class="cx">
</span><span class="cx"> /* Differentially decode */
</span><del>- raw = (nearest & 0x3C) | diff_code[((nearest & 0x03) << 2) | s->diff];
</del><ins>+ raw = (nearest & 0x3C) | v17_differential_decoder[s->diff][nearest & 0x03];
</ins><span class="cx"> s->diff = nearest & 0x03;
</span><span class="cx"> for (i = 0; i < s->bits_per_symbol; i++)
</span><span class="cx"> {
</span><span class="lines">@@ -555,7 +577,7 @@
</span><span class="cx"> p = v - s->symbol_sync_dc_filter[1];
</span><span class="cx"> s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
</span><span class="cx"> s->symbol_sync_dc_filter[0] = v;
</span><del>- /* A little integration will now filter away much of the noise */
</del><ins>+ /* A little integration will now filter away much of the HF noise */
</ins><span class="cx"> s->baud_phase -= p;
</span><span class="cx"> if (abs(s->baud_phase) > 100*FP_FACTOR)
</span><span class="cx"> {
</span><span class="lines">@@ -563,7 +585,6 @@
</span><span class="cx"> i = (s->baud_phase > 1000*FP_FACTOR) ? 15 : 1;
</span><span class="cx"> else
</span><span class="cx"> i = (s->baud_phase < -1000*FP_FACTOR) ? -15 : -1;
</span><del>-
</del><span class="cx"> //printf("v = %10.5f %5d - %f %f %d %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
</span><span class="cx"> s->eq_put_step += i;
</span><span class="cx"> s->total_baud_timing_correction += i;
</span><span class="lines">@@ -573,14 +594,12 @@
</span><span class="cx"> v = s->symbol_sync_low[1]*s->symbol_sync_high[0]*SYNC_LOW_BAND_EDGE_COEFF_2
</span><span class="cx"> - s->symbol_sync_low[0]*s->symbol_sync_high[1]*SYNC_HIGH_BAND_EDGE_COEFF_2
</span><span class="cx"> + s->symbol_sync_low[1]*s->symbol_sync_high[1]*SYNC_MIXED_EDGES_COEFF_3;
</span><del>-
</del><span class="cx"> /* Filter away any DC component */
</span><span class="cx"> p = v - s->symbol_sync_dc_filter[1];
</span><span class="cx"> s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
</span><span class="cx"> s->symbol_sync_dc_filter[0] = v;
</span><span class="cx"> /* A little integration will now filter away much of the HF noise */
</span><span class="cx"> s->baud_phase -= p;
</span><del>-
</del><span class="cx"> if (fabsf(s->baud_phase) > 100.0f)
</span><span class="cx"> {
</span><span class="cx"> if (s->baud_phase > 0.0f)
</span><span class="lines">@@ -588,7 +607,6 @@
</span><span class="cx"> else
</span><span class="cx"> i = (s->baud_phase < -1000.0f) ? -15 : -1;
</span><span class="cx"> //printf("v = %10.5f %5d - %f %f %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
</span><del>-
</del><span class="cx"> s->eq_put_step += i;
</span><span class="cx"> s->total_baud_timing_correction += i;
</span><span class="cx"> }
</span><span class="lines">@@ -624,8 +642,7 @@
</span><span class="cx">
</span><span class="cx"> /* This routine processes every half a baud, as we put things into the equalizer at the T/2 rate. */
</span><span class="cx">
</span><del>- /* Add a sample to the equalizer's circular buffer, but don't calculate anything
- at this time. */
</del><ins>+ /* Add a sample to the equalizer's circular buffer, but don't calculate anything at this time. */
</ins><span class="cx"> s->eq_buf[s->eq_step] = *sample;
</span><span class="cx"> if (++s->eq_step >= V17_EQUALIZER_LEN)
</span><span class="cx"> s->eq_step = 0;
</span><span class="lines">@@ -880,7 +897,18 @@
</span><span class="cx"> {
</span><span class="cx"> s->training_count = 0;
</span><span class="cx"> s->training_error = 0.0f;
</span><del>- s->training_stage = TRAINING_STAGE_TCM_WINDUP;
</del><ins>+ if (s->bits_per_symbol == 2)
+ {
+ /* Restart the differential decoder */
+ /* There is no trellis, so go straight to processing decoded data */
+ s->diff = (s->short_train) ? 0 : 1;
+ s->training_stage = TRAINING_STAGE_TEST_ONES;
+ }
+ else
+ {
+ /* Wait for the trellis to wind up */
+ s->training_stage = TRAINING_STAGE_TCM_WINDUP;
+ }
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case TRAINING_STAGE_SHORT_WAIT_FOR_CDBA:
</span><span class="lines">@@ -937,7 +965,19 @@
</span><span class="cx"> if (s->training_error < (V17_TRAINING_SHORT_SEG_2_LEN - 8)*4.0f*constellation_spacing[s->space_map])
</span><span class="cx"> {
</span><span class="cx"> s->training_count = 0;
</span><del>- s->training_stage = TRAINING_STAGE_TCM_WINDUP;
</del><ins>+ if (s->bits_per_symbol == 2)
+ {
+ /* There is no trellis, so go straight to processing decoded data */
+ /* Restart the differential decoder */
+ s->diff = (s->short_train) ? 0 : 1;
+ s->training_error = 0.0f;
+ s->training_stage = TRAINING_STAGE_TEST_ONES;
+ }
+ else
+ {
+ /* Wait for the trellis to wind up */
+ s->training_stage = TRAINING_STAGE_TCM_WINDUP;
+ }
</ins><span class="cx"> report_status_change(s, SIG_STATUS_TRAINING_IN_PROGRESS);
</span><span class="cx"> }
</span><span class="cx"> else
</span><span class="lines">@@ -1254,6 +1294,13 @@
</span><span class="cx"> s->space_map = 3;
</span><span class="cx"> s->bits_per_symbol = 3;
</span><span class="cx"> break;
</span><ins>+ case 4800:
+ /* This does not exist in the V.17 spec as a valid mode of operation.
+ However, it does exist in V.32bis, so it is here for completeness. */
+ s->constellation = v17_v32bis_4800_constellation;
+ s->space_map = 0;
+ s->bits_per_symbol = 2;
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -1306,28 +1353,50 @@
</span><span class="cx"> s->agc_scaling = s->agc_scaling_save;
</span><span class="cx"> equalizer_restore(s);
</span><span class="cx"> /* Don't allow any frequency correction at all, until we start to pull the phase in. */
</span><ins>+#if defined(SPANDSP_USE_FIXED_POINTx)
+ s->carrier_track_i = 0;
+ s->carrier_track_p = 40000;
+#else
</ins><span class="cx"> s->carrier_track_i = 0.0f;
</span><span class="cx"> s->carrier_track_p = 40000.0f;
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> else
</span><span class="cx"> {
</span><span class="cx"> s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
</span><ins>+ equalizer_reset(s);
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ s->agc_scaling_save = 0;
+ s->agc_scaling = (float) FP_FACTOR*32768.0f*0.0017f/RX_PULSESHAPER_GAIN;
+ s->carrier_track_i = 5000;
+ s->carrier_track_p = 40000;
+#else
</ins><span class="cx"> s->agc_scaling_save = 0.0f;
</span><span class="cx"> s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
</span><del>- equalizer_reset(s);
</del><span class="cx"> s->carrier_track_i = 5000.0f;
</span><span class="cx"> s->carrier_track_p = 40000.0f;
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> s->last_sample = 0;
</span><span class="cx">
</span><span class="cx"> /* Initialise the working data for symbol timing synchronisation */
</span><del>- s->symbol_sync_low[0] = 0.0f;
- s->symbol_sync_low[1] = 0.0f;
- s->symbol_sync_high[0] = 0.0f;
- s->symbol_sync_high[1] = 0.0f;
- s->symbol_sync_dc_filter[0] = 0.0f;
- s->symbol_sync_dc_filter[1] = 0.0f;
</del><ins>+#if defined(SPANDSP_USE_FIXED_POINTx)
+ for (i = 0; i < 2; i++)
+ {
+ s->symbol_sync_low[i] = 0;
+ s->symbol_sync_high[i] = 0;
+ s->symbol_sync_dc_filter[i] = 0;
+ }
+ s->baud_phase = 0;
+#else
+ for (i = 0; i < 2; i++)
+ {
+ s->symbol_sync_low[i] = 0.0f;
+ s->symbol_sync_high[i] = 0.0f;
+ s->symbol_sync_dc_filter[i] = 0.0f;
+ }
</ins><span class="cx"> s->baud_phase = 0.0f;
</span><ins>+#endif
</ins><span class="cx"> s->baud_half = 0;
</span><span class="cx">
</span><span class="cx"> s->total_baud_timing_correction = 0;
</span><span class="lines">@@ -1344,6 +1413,8 @@
</span><span class="cx"> case 12000:
</span><span class="cx"> case 9600:
</span><span class="cx"> case 7200:
</span><ins>+ case 4800:
+ /* 4800 is an extension of V.17, to provide full converage of the V.32bis modes */
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> return NULL;
</span><span class="lines">@@ -1359,11 +1430,11 @@
</span><span class="cx"> s->put_bit = put_bit;
</span><span class="cx"> s->put_bit_user_data = user_data;
</span><span class="cx"> s->short_train = FALSE;
</span><ins>+ //s->scrambler_tap = 18 - 1;
</ins><span class="cx"> v17_rx_signal_cutoff(s, -45.5f);
</span><span class="cx"> s->agc_scaling = 0.0017f/RX_PULSESHAPER_GAIN;
</span><span class="cx"> s->agc_scaling_save = 0.0f;
</span><span class="cx"> s->carrier_phase_rate_save = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
</span><del>-
</del><span class="cx"> v17_rx_restart(s, bit_rate, s->short_train);
</span><span class="cx"> return s;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcv17txc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/v17tx.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/v17tx.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/v17tx.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v17tx.c,v 1.75 2009/06/02 16:03:56 steveu Exp $
</del><ins>+ * $Id: v17tx.c,v 1.75.4.1 2009/12/24 16:52:30 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -100,7 +100,8 @@
</span><span class="cx"> {
</span><span class="cx"> int out_bit;
</span><span class="cx">
</span><del>- out_bit = (in_bit ^ (s->scramble_reg >> 17) ^ (s->scramble_reg >> 22)) & 1;
</del><ins>+ //out_bit = (in_bit ^ (s->scramble_reg >> s->scrambler_tap) ^ (s->scramble_reg >> (23 - 1))) & 1;
+ out_bit = (in_bit ^ (s->scramble_reg >> (18 - 1)) ^ (s->scramble_reg >> (23 - 1))) & 1;
</ins><span class="cx"> s->scramble_reg = (s->scramble_reg << 1) | out_bit;
</span><span class="cx"> return out_bit;
</span><span class="cx"> }
</span><span class="lines">@@ -135,7 +136,7 @@
</span><span class="cx"> if (s->training_step <= V17_TRAINING_SEG_TEP_B)
</span><span class="cx"> {
</span><span class="cx"> /* Optional segment: Unmodulated carrier (talker echo protection) */
</span><del>- return v17_v32bis_4800_constellation[0];
</del><ins>+ return v17_v32bis_abcd_constellation[0];
</ins><span class="cx"> }
</span><span class="cx"> if (s->training_step <= V17_TRAINING_SEG_1)
</span><span class="cx"> {
</span><span class="lines">@@ -143,7 +144,7 @@
</span><span class="cx"> return zero;
</span><span class="cx"> }
</span><span class="cx"> /* Segment 1: ABAB... */
</span><del>- return v17_v32bis_4800_constellation[(s->training_step & 1) ^ 1];
</del><ins>+ return v17_v32bis_abcd_constellation[(s->training_step & 1) ^ 1];
</ins><span class="cx"> }
</span><span class="cx"> /* Segment 2: CDBA... */
</span><span class="cx"> /* Apply the scrambler */
</span><span class="lines">@@ -155,7 +156,7 @@
</span><span class="cx"> /* Go straight to the ones test. */
</span><span class="cx"> s->training_step = V17_TRAINING_SEG_4;
</span><span class="cx"> }
</span><del>- return v17_v32bis_4800_constellation[s->constellation_state];
</del><ins>+ return v17_v32bis_abcd_constellation[s->constellation_state];
</ins><span class="cx"> }
</span><span class="cx"> /* Segment 3: Bridge... */
</span><span class="cx"> shift = ((s->training_step - V17_TRAINING_SEG_3 - 1) & 0x7) << 1;
</span><span class="lines">@@ -163,30 +164,53 @@
</span><span class="cx"> bits = scramble(s, V17_BRIDGE_WORD >> shift);
</span><span class="cx"> bits = (bits << 1) | scramble(s, V17_BRIDGE_WORD >> (shift + 1));
</span><span class="cx"> s->constellation_state = (s->constellation_state + dibit_to_step[bits]) & 3;
</span><del>- return v17_v32bis_4800_constellation[s->constellation_state];
</del><ins>+ return v17_v32bis_abcd_constellation[s->constellation_state];
</ins><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><span class="cx"> static __inline__ int diff_and_convolutional_encode(v17_tx_state_t *s, int q)
</span><span class="cx"> {
</span><del>- static const int diff_code[16] =
</del><ins>+ static const uint8_t v32bis_4800_differential_encoder[4][4] =
</ins><span class="cx"> {
</span><del>- 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2
</del><ins>+ {2, 3, 0, 1},
+ {0, 2, 1, 3},
+ {3, 1, 2, 0},
+ {1, 0, 3, 2}
</ins><span class="cx"> };
</span><del>- int y1;
- int y2;
- int this1;
- int this2;
</del><ins>+ static const uint8_t v17_differential_encoder[4][4] =
+ {
+ {0, 1, 2, 3},
+ {1, 2, 3, 0},
+ {2, 3, 0, 1},
+ {3, 0, 1, 2}
+ };
+ static const uint8_t v17_convolutional_coder[8][4] =
+ {
+ {0, 2, 3, 1},
+ {4, 7, 5, 6},
+ {1, 3, 2, 0},
+ {7, 4, 6, 5},
+ {2, 0, 1, 3},
+ {6, 5, 7, 4},
+ {3, 1, 0, 2},
+ {5, 6, 4, 7}
+ };
</ins><span class="cx">
</span><ins>+ if (s->bits_per_symbol == 2)
+ {
+ /* 4800bps mode for V.32bis */
+ /* There is no trellis. We just differentially encode. */
+ s->diff = v32bis_4800_differential_encoder[s->diff][q & 0x03];
+ return s->diff;
+ }
</ins><span class="cx"> /* Differentially encode */
</span><del>- s->diff = diff_code[((q & 0x03) << 2) | s->diff];
</del><ins>+ s->diff = v17_differential_encoder[s->diff][q & 0x03];
</ins><span class="cx">
</span><span class="cx"> /* Convolutionally encode the redundant bit */
</span><del>- y2 = s->diff >> 1;
- y1 = s->diff;
- this2 = y2 ^ y1 ^ (s->convolution >> 2) ^ ((y2 ^ (s->convolution >> 1)) & s->convolution);
- this1 = y2 ^ (s->convolution >> 1) ^ (y1 & s->convolution);
- s->convolution = ((s->convolution & 1) << 2) | ((this2 & 1) << 1) | (this1 & 1);
</del><ins>+ s->convolution = v17_convolutional_coder[s->convolution][s->diff];
+
+ /* The final result is the combination of some uncoded bits, 2 differentially
+ encoded bits, and the convolutionally encoded redundant bit. */
</ins><span class="cx"> return ((q << 1) & 0x78) | (s->diff << 1) | ((s->convolution >> 2) & 1);
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="lines">@@ -373,12 +397,18 @@
</span><span class="cx"> s->bits_per_symbol = 3;
</span><span class="cx"> s->constellation = v17_v32bis_7200_constellation;
</span><span class="cx"> break;
</span><ins>+ case 4800:
+ /* This does not exist in the V.17 spec as a valid mode of operation.
+ However, it does exist in V.32bis, so it is here for completeness. */
+ s->bits_per_symbol = 2;
+ s->constellation = v17_v32bis_4800_constellation;
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><ins>+ s->bit_rate = bit_rate;
</ins><span class="cx"> /* NB: some modems seem to use 3 instead of 1 for long training */
</span><span class="cx"> s->diff = (short_train) ? 0 : 1;
</span><del>- s->bit_rate = bit_rate;
</del><span class="cx"> #if defined(SPANDSP_USE_FIXED_POINT)
</span><span class="cx"> memset(s->rrc_filter, 0, sizeof(s->rrc_filter));
</span><span class="cx"> #else
</span><span class="lines">@@ -406,6 +436,8 @@
</span><span class="cx"> case 12000:
</span><span class="cx"> case 9600:
</span><span class="cx"> case 7200:
</span><ins>+ case 4800:
+ /* 4800 is an extension of V.17, to provide full converage of the V.32bis modes */
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> return NULL;
</span><span class="lines">@@ -420,6 +452,7 @@
</span><span class="cx"> span_log_set_protocol(&s->logging, "V.17 TX");
</span><span class="cx"> s->get_bit = get_bit;
</span><span class="cx"> s->get_bit_user_data = user_data;
</span><ins>+ //s->scrambler_tap = 18 - 1;
</ins><span class="cx"> s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
</span><span class="cx"> v17_tx_power(s, -14.0f);
</span><span class="cx"> v17_tx_restart(s, bit_rate, tep, FALSE);
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcv29rxc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/v29rx.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v29rx.c,v 1.167.4.4 2009/12/19 14:18:13 steveu Exp $
</del><ins>+ * $Id: v29rx.c,v 1.167.4.5 2009/12/28 12:20:47 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -511,7 +511,7 @@
</span><span class="cx"> p = v - s->symbol_sync_dc_filter[1];
</span><span class="cx"> s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
</span><span class="cx"> s->symbol_sync_dc_filter[0] = v;
</span><del>- /* A little integration will now filter away much of the noise */
</del><ins>+ /* A little integration will now filter away much of the HF noise */
</ins><span class="cx"> s->baud_phase -= p;
</span><span class="cx"> if (abs(s->baud_phase) > 30*FP_FACTOR)
</span><span class="cx"> {
</span><span class="lines">@@ -519,7 +519,6 @@
</span><span class="cx"> i = (s->baud_phase > 1000*FP_FACTOR) ? 5 : 1;
</span><span class="cx"> else
</span><span class="cx"> i = (s->baud_phase < -1000*FP_FACTOR) ? -5 : -1;
</span><del>-
</del><span class="cx"> //printf("v = %10.5f %5d - %f %f %d %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
</span><span class="cx"> s->eq_put_step += i;
</span><span class="cx"> s->total_baud_timing_correction += i;
</span><span class="lines">@@ -533,19 +532,14 @@
</span><span class="cx"> p = v - s->symbol_sync_dc_filter[1];
</span><span class="cx"> s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
</span><span class="cx"> s->symbol_sync_dc_filter[0] = v;
</span><del>- /* A little integration will now filter away much of the noise */
</del><ins>+ /* A little integration will now filter away much of the HF noise */
</ins><span class="cx"> s->baud_phase -= p;
</span><del>-#if 0
- if (fabsf(s->baud_phase) > 100.0f)
-#else
</del><span class="cx"> if (fabsf(s->baud_phase) > 30.0f)
</span><del>-#endif
</del><span class="cx"> {
</span><span class="cx"> if (s->baud_phase > 0.0f)
</span><span class="cx"> i = (s->baud_phase > 1000.0f) ? 5 : 1;
</span><span class="cx"> else
</span><span class="cx"> i = (s->baud_phase < -1000.0f) ? -5 : -1;
</span><del>-
</del><span class="cx"> //printf("v = %10.5f %5d - %f %f %d %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
</span><span class="cx"> s->eq_put_step += i;
</span><span class="cx"> s->total_baud_timing_correction += i;
</span><span class="lines">@@ -586,8 +580,7 @@
</span><span class="cx">
</span><span class="cx"> /* This routine processes every half a baud, as we put things into the equalizer at the T/2 rate. */
</span><span class="cx">
</span><del>- /* Add a sample to the equalizer's circular buffer, but don't calculate anything
- at this time. */
</del><ins>+ /* Add a sample to the equalizer's circular buffer, but don't calculate anything at this time. */
</ins><span class="cx"> s->eq_buf[s->eq_step] = *sample;
</span><span class="cx"> if (++s->eq_step >= V29_EQUALIZER_LEN)
</span><span class="cx"> s->eq_step = 0;
</span><span class="lines">@@ -1082,6 +1075,8 @@
</span><span class="cx">
</span><span class="cx"> SPAN_DECLARE(int) v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train)
</span><span class="cx"> {
</span><ins>+ int i;
+
</ins><span class="cx"> switch (bit_rate)
</span><span class="cx"> {
</span><span class="cx"> case 9600:
</span><span class="lines">@@ -1153,20 +1148,20 @@
</span><span class="cx">
</span><span class="cx"> /* Initialise the working data for symbol timing synchronisation */
</span><span class="cx"> #if defined(SPANDSP_USE_FIXED_POINT)
</span><del>- s->symbol_sync_low[0] = 0;
- s->symbol_sync_low[1] = 0;
- s->symbol_sync_high[0] = 0;
- s->symbol_sync_high[1] = 0;
- s->symbol_sync_dc_filter[0] = 0;
- s->symbol_sync_dc_filter[1] = 0;
</del><ins>+ for (i = 0; i < 2; i++)
+ {
+ s->symbol_sync_low[i] = 0;
+ s->symbol_sync_high[i] = 0;
+ s->symbol_sync_dc_filter[i] = 0;
+ }
</ins><span class="cx"> s->baud_phase = 0;
</span><span class="cx"> #else
</span><del>- s->symbol_sync_low[0] = 0.0f;
- s->symbol_sync_low[1] = 0.0f;
- s->symbol_sync_high[0] = 0.0f;
- s->symbol_sync_high[1] = 0.0f;
- s->symbol_sync_dc_filter[0] = 0.0f;
- s->symbol_sync_dc_filter[1] = 0.0f;
</del><ins>+ for (i = 0; i < 2; i++)
+ {
+ s->symbol_sync_low[i] = 0.0f;
+ s->symbol_sync_high[i] = 0.0f;
+ s->symbol_sync_dc_filter[i] = 0.0f;
+ }
</ins><span class="cx"> s->baud_phase = 0.0f;
</span><span class="cx"> #endif
</span><span class="cx"> s->baud_half = 0;
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcv8c"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/v8.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/v8.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/v8.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v8.c,v 1.42.4.1 2009/12/23 14:23:49 steveu Exp $
</del><ins>+ * $Id: v8.c,v 1.42.4.3 2009/12/28 12:20:47 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx">
</span><span class="cx"> static const uint8_t *process_modulation_mode(v8_state_t *s, const uint8_t *p)
</span><span class="cx"> {
</span><del>- int far_end_modulations;
</del><ins>+ unsigned int far_end_modulations;
</ins><span class="cx">
</span><span class="cx"> /* Modulation mode octet */
</span><span class="cx"> far_end_modulations = 0;
</span><span class="lines">@@ -338,8 +338,9 @@
</span><span class="cx"> far_end_modulations |= V8_MOD_V26TER;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- s->result.far_end_modulations = far_end_modulations;
- v8_log_supported_modulations(s, s->result.far_end_modulations);
</del><ins>+ s->far_end_modulations =
+ s->result.modulations = far_end_modulations;
+ v8_log_supported_modulations(s, far_end_modulations);
</ins><span class="cx"> return ++p;
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="lines">@@ -363,7 +364,6 @@
</span><span class="cx"> static const uint8_t *process_non_standard_facilities(v8_state_t *s, const uint8_t *p)
</span><span class="cx"> {
</span><span class="cx"> s->result.nsf = (*p >> 5) & 0x07;
</span><del>- s->result.nsf_seen = TRUE;
</del><span class="cx"> span_log(&s->logging, SPAN_LOG_FLOW | SPAN_LOG_SUPPRESS_LABELLING, "%s\n", v8_nsf_to_str(s->result.nsf));
</span><span class="cx"> return p;
</span><span class="cx"> }
</span><span class="lines">@@ -380,7 +380,6 @@
</span><span class="cx"> static const uint8_t *process_t66(v8_state_t *s, const uint8_t *p)
</span><span class="cx"> {
</span><span class="cx"> s->result.t66 = (*p >> 5) & 0x07;
</span><del>- s->result.t66_seen = TRUE;
</del><span class="cx"> span_log(&s->logging, SPAN_LOG_FLOW | SPAN_LOG_SUPPRESS_LABELLING, "%s\n", v8_t66_to_str(s->result.t66));
</span><span class="cx"> return ++p;
</span><span class="cx"> }
</span><span class="lines">@@ -420,7 +419,7 @@
</span><span class="cx"> /* Zero indicates the end */
</span><span class="cx"> s->cm_jm_data[s->cm_jm_len] = 0;
</span><span class="cx">
</span><del>- s->result.far_end_modulations = 0;
</del><ins>+ s->result.modulations = 0;
</ins><span class="cx"> p = s->cm_jm_data;
</span><span class="cx">
</span><span class="cx"> while (*p)
</span><span class="lines">@@ -585,6 +584,7 @@
</span><span class="cx"> FSK_FRAME_MODE_ASYNC,
</span><span class="cx"> put_bit,
</span><span class="cx"> s);
</span><ins>+ fsk_rx_signal_cutoff(&s->v21rx, -45.5f);
</ins><span class="cx"> s->preamble_type = V8_SYNC_UNKNOWN;
</span><span class="cx"> s->bit_stream = 0;
</span><span class="cx"> s->cm_jm_len = 0;
</span><span class="lines">@@ -635,75 +635,67 @@
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><del>-static void send_cm_jm(v8_state_t *s, int mod_mask)
</del><ins>+static void send_cm_jm(v8_state_t *s)
</ins><span class="cx"> {
</span><span class="cx"> int val;
</span><ins>+ unsigned int offered_modulations;
+
+ offered_modulations = s->parms.modulations & s->far_end_modulations;
</ins><span class="cx">
</span><span class="cx"> /* Send a CM, or a JM as appropriate */
</span><span class="cx"> v8_put_preamble(s);
</span><span class="cx"> v8_put_byte(s, V8_CM_JM_SYNC_OCTET);
</span><span class="cx"> /* Data call */
</span><del>- v8_put_byte(s, (V8_CALL_V_SERIES << 5) | V8_CALL_FUNCTION_TAG);
</del><ins>+ v8_put_byte(s, (s->result.call_function << 5) | V8_CALL_FUNCTION_TAG);
</ins><span class="cx">
</span><span class="cx"> /* Supported modulations */
</span><span class="cx"> val = 0x05;
</span><del>- if (mod_mask & V8_MOD_V90)
</del><ins>+ if (offered_modulations & V8_MOD_V90)
</ins><span class="cx"> val |= 0x20;
</span><del>- if (mod_mask & V8_MOD_V34)
</del><ins>+ if (offered_modulations & V8_MOD_V34)
</ins><span class="cx"> val |= 0x40;
</span><span class="cx"> v8_put_byte(s, val);
</span><span class="cx">
</span><span class="cx"> val = 0x10;
</span><del>- if (mod_mask & V8_MOD_V32)
</del><ins>+ if (offered_modulations & V8_MOD_V32)
</ins><span class="cx"> val |= 0x01;
</span><del>- if (mod_mask & V8_MOD_V22)
</del><ins>+ if (offered_modulations & V8_MOD_V22)
</ins><span class="cx"> val |= 0x02;
</span><del>- if (mod_mask & V8_MOD_V17)
</del><ins>+ if (offered_modulations & V8_MOD_V17)
</ins><span class="cx"> val |= 0x04;
</span><del>- if (mod_mask & V8_MOD_V29)
</del><ins>+ if (offered_modulations & V8_MOD_V29)
</ins><span class="cx"> val |= 0x40;
</span><del>- if (mod_mask & V8_MOD_V27TER)
</del><ins>+ if (offered_modulations & V8_MOD_V27TER)
</ins><span class="cx"> val |= 0x80;
</span><span class="cx"> v8_put_byte(s, val);
</span><span class="cx">
</span><span class="cx"> val = 0x10;
</span><del>- if (mod_mask & V8_MOD_V26TER)
</del><ins>+ if (offered_modulations & V8_MOD_V26TER)
</ins><span class="cx"> val |= 0x01;
</span><del>- if (mod_mask & V8_MOD_V26BIS)
</del><ins>+ if (offered_modulations & V8_MOD_V26BIS)
</ins><span class="cx"> val |= 0x02;
</span><del>- if (mod_mask & V8_MOD_V23)
</del><ins>+ if (offered_modulations & V8_MOD_V23)
</ins><span class="cx"> val |= 0x04;
</span><del>- if (mod_mask & V8_MOD_V23HALF)
</del><ins>+ if (offered_modulations & V8_MOD_V23HALF)
</ins><span class="cx"> val |= 0x40;
</span><del>- if (mod_mask & V8_MOD_V21)
</del><ins>+ if (offered_modulations & V8_MOD_V21)
</ins><span class="cx"> val |= 0x80;
</span><span class="cx"> v8_put_byte(s, val);
</span><span class="cx">
</span><del>- v8_put_byte(s, (0 << 5) | V8_PCM_MODEM_AVAILABILITY_TAG);
</del><ins>+ if (s->parms.protocol)
+ v8_put_byte(s, (s->parms.protocol << 5) | V8_PROTOCOLS_TAG);
+ if (s->parms.pcm_modem_availability)
+ v8_put_byte(s, (s->parms.pcm_modem_availability << 5) | V8_PCM_MODEM_AVAILABILITY_TAG);
+ if (s->parms.pstn_access)
+ v8_put_byte(s, (s->parms.pstn_access << 5) | V8_PSTN_ACCESS_TAG);
+ if (s->parms.t66 >= 0)
+ v8_put_byte(s, (s->parms.t66 << 5) | V8_T66_TAG);
</ins><span class="cx">
</span><del>- v8_put_byte(s, (V8_PROTOCOL_LAPM_V42 << 5) | V8_PROTOCOLS_TAG);
-
- /* No cellular right now */
- v8_put_byte(s, (0 << 5) | V8_PSTN_ACCESS_TAG);
</del><ins>+ /* No NSF */
+ //v8_put_byte(s, (0 << 5) | V8_NSF_TAG);
</ins><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><del>-static int select_modulation(int mask)
-{
- if (mask & V8_MOD_V90)
- return V8_MOD_V90;
- if (mask & V8_MOD_V34)
- return V8_MOD_V34;
- if (mask & V8_MOD_V32)
- return V8_MOD_V32;
- if (mask & V8_MOD_V23)
- return V8_MOD_V23;
- if (mask & V8_MOD_V21)
- return V8_MOD_V21;
- return V8_MOD_FAILED;
-}
-/*- End of function --------------------------------------------------------*/
-
</del><span class="cx"> SPAN_DECLARE_NONSTD(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len)
</span><span class="cx"> {
</span><span class="cx"> int len;
</span><span class="lines">@@ -724,6 +716,7 @@
</span><span class="cx"> }
</span><span class="cx"> else
</span><span class="cx"> {
</span><ins>+ /* Send the 75ms of silence after the ANSam tone */
</ins><span class="cx"> if (max_len > s->modem_connect_tone_tx_on)
</span><span class="cx"> len = s->modem_connect_tone_tx_on;
</span><span class="cx"> else
</span><span class="lines">@@ -755,14 +748,14 @@
</span><span class="cx"> {
</span><span class="cx"> v8_put_preamble(s);
</span><span class="cx"> v8_put_byte(s, V8_CI_SYNC_OCTET);
</span><del>- v8_put_byte(s, (V8_CALL_V_SERIES << 5) | V8_CALL_FUNCTION_TAG);
</del><ins>+ v8_put_byte(s, (s->result.call_function << 5) | V8_CALL_FUNCTION_TAG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><span class="cx"> static void handle_modem_connect_tone(v8_state_t *s, int tone)
</span><span class="cx"> {
</span><del>- s->result.modem_connect_tone_detected = tone;
</del><ins>+ s->result.modem_connect_tone = tone;
</ins><span class="cx"> span_log(&s->logging, SPAN_LOG_FLOW, "'%s' recognised\n", modem_connect_tone_to_str(tone));
</span><span class="cx"> if (tone == MODEM_CONNECT_TONES_ANSAM
</span><span class="cx"> ||
</span><span class="lines">@@ -856,7 +849,7 @@
</span><span class="cx"> v8_decode_init(s);
</span><span class="cx"> s->negotiation_timer = ms_to_samples(5000);
</span><span class="cx"> fsk_tx_restart(&s->v21tx, &preset_fsk_specs[FSK_V21CH1]);
</span><del>- send_cm_jm(s, s->local_end_modulations);
</del><ins>+ send_cm_jm(s);
</ins><span class="cx"> s->state = V8_CM_ON;
</span><span class="cx"> s->fsk_tx_on = TRUE;
</span><span class="cx"> }
</span><span class="lines">@@ -868,8 +861,6 @@
</span><span class="cx"> span_log(&s->logging, SPAN_LOG_FLOW, "JM recognised\n");
</span><span class="cx"> /* Now JM has been detected, we send CJ and wait for 75 ms
</span><span class="cx"> before finishing the V.8 analysis. */
</span><del>- s->result.negotiated_modulation = select_modulation(s->result.far_end_modulations);
-
</del><span class="cx"> fsk_tx_restart(&s->v21tx, &preset_fsk_specs[FSK_V21CH1]);
</span><span class="cx"> for (i = 0; i < 3; i++)
</span><span class="cx"> v8_put_byte(s, 0);
</span><span class="lines">@@ -888,7 +879,7 @@
</span><span class="cx"> if (queue_contents(s->tx_queue) < 10)
</span><span class="cx"> {
</span><span class="cx"> /* Send CM again */
</span><del>- send_cm_jm(s, s->local_end_modulations);
</del><ins>+ send_cm_jm(s);
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case V8_CJ_ON:
</span><span class="lines">@@ -914,14 +905,15 @@
</span><span class="cx"> if (s->got_cm_jm)
</span><span class="cx"> {
</span><span class="cx"> span_log(&s->logging, SPAN_LOG_FLOW, "CM recognised\n");
</span><ins>+
+ /* TODO: negotiate if the call function is acceptable */
+
</ins><span class="cx"> /* Stop sending ANSam or ANSam/ and send JM instead */
</span><span class="cx"> fsk_tx_init(&s->v21tx, &preset_fsk_specs[FSK_V21CH2], get_bit, s);
</span><span class="cx"> /* Set the timeout for JM */
</span><span class="cx"> s->negotiation_timer = ms_to_samples(5000);
</span><span class="cx"> s->state = V8_JM_ON;
</span><del>- s->common_modulations = s->local_end_modulations & s->result.far_end_modulations;
- s->result.negotiated_modulation = select_modulation(s->common_modulations);
- send_cm_jm(s, s->common_modulations);
</del><ins>+ send_cm_jm(s);
</ins><span class="cx"> s->modem_connect_tone_tx_on = ms_to_samples(75);
</span><span class="cx"> s->fsk_tx_on = TRUE;
</span><span class="cx"> break;
</span><span class="lines">@@ -958,7 +950,7 @@
</span><span class="cx"> if (queue_contents(s->tx_queue) < 10)
</span><span class="cx"> {
</span><span class="cx"> /* Send JM */
</span><del>- send_cm_jm(s, s->common_modulations);
</del><ins>+ send_cm_jm(s);
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case V8_SIGA:
</span><span class="lines">@@ -985,10 +977,49 @@
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx">
</span><ins>+SPAN_DECLARE(int) v8_restart(v8_state_t *s,
+ int calling_party,
+ v8_parms_t *parms)
+{
+ memcpy(&s->parms, parms, sizeof(s->parms));
+ memset(&s->result, 0, sizeof(s->result));
+
+ s->result.call_function = s->parms.call_function;
+ s->result.nsf = -1;
+ s->result.t66 = -1;
+
+ s->ci_timer = 0;
+ if (calling_party)
+ {
+ s->calling_party = TRUE;
+ s->state = V8_WAIT_1S;
+ s->negotiation_timer = ms_to_samples(1000);
+ s->ci_count = 0;
+ modem_connect_tones_rx_init(&s->ansam_rx, MODEM_CONNECT_TONES_ANS_PR, NULL, NULL);
+ fsk_tx_init(&s->v21tx, &preset_fsk_specs[FSK_V21CH1], get_bit, s);
+ }
+ else
+ {
+ /* Send the ANSam or ANSam/ tone */
+ s->calling_party = FALSE;
+ modem_connect_tones_tx_init(&s->ansam_tx, s->parms.modem_connect_tone);
+
+ v8_decode_init(s);
+ s->state = V8_CM_WAIT;
+ s->negotiation_timer = ms_to_samples(200 + 5000);
+ s->modem_connect_tone_tx_on = ms_to_samples(75) + 1;
+ }
+ s->result.modem_connect_tone = MODEM_CONNECT_TONES_NONE;
+
+ if ((s->tx_queue = queue_init(NULL, 1024, 0)) == NULL)
+ return -1;
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
</ins><span class="cx"> SPAN_DECLARE(v8_state_t *) v8_init(v8_state_t *s,
</span><span class="cx"> int calling_party,
</span><del>- int use_ansam_pr,
- int available_modulations,
</del><ins>+ v8_parms_t *parms,
</ins><span class="cx"> v8_result_handler_t *result_handler,
</span><span class="cx"> void *user_data)
</span><span class="cx"> {
</span><span class="lines">@@ -1000,10 +1031,17 @@
</span><span class="cx"> memset(s, 0, sizeof(*s));
</span><span class="cx"> span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
</span><span class="cx"> span_log_set_protocol(&s->logging, "V.8");
</span><del>- s->local_end_modulations = available_modulations;
</del><span class="cx"> s->result_handler = result_handler;
</span><span class="cx"> s->result_handler_user_data = user_data;
</span><span class="cx">
</span><ins>+ v8_restart(s, calling_party, parms);
+
+ memcpy(&s->parms, parms, sizeof(s->parms));
+
+ s->result.call_function = s->parms.call_function;
+ s->result.nsf = -1;
+ s->result.t66 = -1;
+
</ins><span class="cx"> s->ci_timer = 0;
</span><span class="cx"> if (calling_party)
</span><span class="cx"> {
</span><span class="lines">@@ -1018,15 +1056,14 @@
</span><span class="cx"> {
</span><span class="cx"> /* Send the ANSam or ANSam/ tone */
</span><span class="cx"> s->calling_party = FALSE;
</span><del>- modem_connect_tones_tx_init(&s->ansam_tx,
- (use_ansam_pr) ? MODEM_CONNECT_TONES_ANSAM_PR : MODEM_CONNECT_TONES_ANSAM);
</del><ins>+ modem_connect_tones_tx_init(&s->ansam_tx, s->parms.modem_connect_tone);
</ins><span class="cx">
</span><span class="cx"> v8_decode_init(s);
</span><span class="cx"> s->state = V8_CM_WAIT;
</span><span class="cx"> s->negotiation_timer = ms_to_samples(200 + 5000);
</span><span class="cx"> s->modem_connect_tone_tx_on = ms_to_samples(75) + 1;
</span><span class="cx"> }
</span><del>- s->result.modem_connect_tone_detected = MODEM_CONNECT_TONES_NONE;
</del><ins>+ s->result.modem_connect_tone = MODEM_CONNECT_TONES_NONE;
</ins><span class="cx">
</span><span class="cx"> if ((s->tx_queue = queue_init(NULL, 1024, 0)) == NULL)
</span><span class="cx"> return NULL;
</span></span></pre></div>
<a id="freeswitchtrunklibsspandspsrcvector_intc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/src/vector_int.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/src/vector_int.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/src/vector_int.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * License along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: vector_int.c,v 1.26 2009/07/12 09:23:09 steveu Exp $
</del><ins>+ * $Id: vector_int.c,v 1.26.4.1 2009/12/28 11:54:59 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \file */
</span><span class="lines">@@ -53,8 +53,7 @@
</span><span class="cx"> {
</span><span class="cx"> int32_t z;
</span><span class="cx">
</span><del>-#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
-#if defined(__x86_64__)
</del><ins>+#if defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__x86_64__)
</ins><span class="cx"> __asm__ __volatile__(
</span><span class="cx"> " emms;\n"
</span><span class="cx"> " pxor %%mm0,%%mm0;\n"
</span><span class="lines">@@ -152,7 +151,7 @@
</span><span class="cx"> : "S" (x), "D" (y), "a" (n)
</span><span class="cx"> : "cc"
</span><span class="cx"> );
</span><del>-#else
</del><ins>+#elif defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__i386__)
</ins><span class="cx"> __asm__ __volatile__(
</span><span class="cx"> " emms;\n"
</span><span class="cx"> " pxor %%mm0,%%mm0;\n"
</span><span class="lines">@@ -250,7 +249,6 @@
</span><span class="cx"> : "S" (x), "D" (y), "a" (n)
</span><span class="cx"> : "cc"
</span><span class="cx"> );
</span><del>-#endif
</del><span class="cx"> #else
</span><span class="cx"> int i;
</span><span class="cx">
</span><span class="lines">@@ -290,12 +288,11 @@
</span><span class="cx">
</span><span class="cx"> SPAN_DECLARE(int32_t) vec_min_maxi16(const int16_t x[], int n, int16_t out[])
</span><span class="cx"> {
</span><del>-#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
</del><ins>+#if defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__x86_64__)
</ins><span class="cx"> static const int32_t lower_bound = 0x80008000;
</span><span class="cx"> static const int32_t upper_bound = 0x7FFF7FFF;
</span><span class="cx"> int32_t max;
</span><span class="cx">
</span><del>-#if defined(__x86_64__)
</del><span class="cx"> __asm__ __volatile__(
</span><span class="cx"> " emms;\n"
</span><span class="cx"> " pushq %%rdx;\n"
</span><span class="lines">@@ -443,7 +440,11 @@
</span><span class="cx"> : "S" (x), "a" (n), "d" (out), [lower] "m" (lower_bound), [upper] "m" (upper_bound)
</span><span class="cx"> : "ecx"
</span><span class="cx"> );
</span><del>-#else
</del><ins>+#elif defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__i386__)
+ static const int32_t lower_bound = 0x80008000;
+ static const int32_t upper_bound = 0x7FFF7FFF;
+ int32_t max;
+
</ins><span class="cx"> __asm__ __volatile__(
</span><span class="cx"> " emms;\n"
</span><span class="cx"> " pushl %%edx;\n"
</span><span class="lines">@@ -592,8 +593,6 @@
</span><span class="cx"> : "S" (x), "a" (n), "d" (out), [lower] "m" (lower_bound), [upper] "m" (upper_bound)
</span><span class="cx"> : "ecx"
</span><span class="cx"> );
</span><del>-#endif
- return max;
</del><span class="cx"> #else
</span><span class="cx"> int i;
</span><span class="cx"> int16_t min;
</span><span class="lines">@@ -622,8 +621,8 @@
</span><span class="cx"> z = abs(min);
</span><span class="cx"> if (z > max)
</span><span class="cx"> return z;
</span><del>- return max;
</del><span class="cx"> #endif
</span><ins>+ return max;
</ins><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="cx"> /*- End of file ------------------------------------------------------------*/
</span></span></pre></div>
<a id="freeswitchtrunklibsspandsptestsv8_testsc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/spandsp/tests/v8_tests.c (16070 => 16071)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/spandsp/tests/v8_tests.c        2009-12-29 01:52:12 UTC (rev 16070)
+++ freeswitch/trunk/libs/spandsp/tests/v8_tests.c        2009-12-29 01:58:30 UTC (rev 16071)
</span><span class="lines">@@ -22,16 +22,13 @@
</span><span class="cx"> * along with this program; if not, write to the Free Software
</span><span class="cx"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
</span><span class="cx"> *
</span><del>- * $Id: v8_tests.c,v 1.36 2009/11/04 16:10:14 steveu Exp $
</del><ins>+ * $Id: v8_tests.c,v 1.36.4.1 2009/12/28 12:32:53 steveu Exp $
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*! \page v8_tests_page V.8 tests
</span><span class="cx"> \section v8_tests_page_sec_1 What does it do?
</span><span class="cx"> */
</span><span class="cx">
</span><del>-/* Enable the following definition to enable direct probing into the internal structures */
-//#define WITH_SPANDSP_INTERNALS
-
</del><span class="cx"> #if defined(HAVE_CONFIG_H)
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #endif
</span><span class="lines">@@ -59,8 +56,25 @@
</span><span class="cx">
</span><span class="cx"> int negotiations_ok = 0;
</span><span class="cx">
</span><del>-static void handler(void *user_data, v8_result_t *result)
</del><ins>+static int select_modulation(int mask)
</ins><span class="cx"> {
</span><ins>+ /* Select the fastest data modem available */
+ if (mask & V8_MOD_V90)
+ return V8_MOD_V90;
+ if (mask & V8_MOD_V34)
+ return V8_MOD_V34;
+ if (mask & V8_MOD_V32)
+ return V8_MOD_V32;
+ if (mask & V8_MOD_V23)
+ return V8_MOD_V23;
+ if (mask & V8_MOD_V21)
+ return V8_MOD_V21;
+ return V8_MOD_FAILED;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void handler(void *user_data, v8_parms_t *result)
+{
</ins><span class="cx"> const char *s;
</span><span class="cx">
</span><span class="cx"> s = (const char *) user_data;
</span><span class="lines">@@ -70,25 +84,25 @@
</span><span class="cx"> printf("%s V.8 negotiation failed\n", s);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (result->modem_connect_tone_detected == MODEM_CONNECT_TONES_ANSAM
</del><ins>+ if (result->modem_connect_tone == MODEM_CONNECT_TONES_ANSAM
</ins><span class="cx"> ||
</span><del>- result->modem_connect_tone_detected == MODEM_CONNECT_TONES_ANSAM_PR
</del><ins>+ result->modem_connect_tone == MODEM_CONNECT_TONES_ANSAM_PR
</ins><span class="cx"> ||
</span><del>- result->modem_connect_tone_detected == MODEM_CONNECT_TONES_NONE)
</del><ins>+ result->modem_connect_tone == MODEM_CONNECT_TONES_NONE)
</ins><span class="cx"> {
</span><span class="cx"> printf("%s V.8 negotiation result:\n", s);
</span><del>- printf(" Modem connect tone '%s'\n", modem_connect_tone_to_str(result->modem_connect_tone_detected));
- printf(" Call function '%s'\n", v8_call_function_to_str(result->call_function));
- printf(" Negotiated modulation '%s'\n", v8_modulation_to_str(result->negotiated_modulation));
- printf(" Protocol '%s'\n", v8_protocol_to_str(result->protocol));
- printf(" PSTN access '%s'\n", v8_pstn_access_to_str(result->pstn_access));
- printf(" NSF %d %d\n", result->nsf_seen, result->nsf);
- printf(" PCM modem availability '%s'\n", v8_pcm_modem_availability_to_str(result->pcm_modem_availability));
- printf(" T.66 %d %d\n", result->t66_seen, result->t66);
</del><ins>+ printf(" Modem connect tone '%s' (%d)\n", modem_connect_tone_to_str(result->modem_connect_tone), result->modem_connect_tone);
+ printf(" Call function '%s' (%d)\n", v8_call_function_to_str(result->call_function), result->call_function);
+ printf(" Far end modulations 0x%X\n", result->modulations);
+ printf(" Protocol '%s' (%d)\n", v8_protocol_to_str(result->protocol), result->protocol);
+ printf(" PSTN access '%s' (%d)\n", v8_pstn_access_to_str(result->pstn_access), result->pstn_access);
+ printf(" PCM modem availability '%s' (%d)\n", v8_pcm_modem_availability_to_str(result->pcm_modem_availability), result->pcm_modem_availability);
+ if (result->t66 >= 0)
+ printf(" T.66 '%s' (%d)\n", v8_t66_to_str(result->t66), result->t66);
+ if (result->nsf >= 0)
+ printf(" NSF %d\n", result->nsf);
</ins><span class="cx"> if (result->call_function == V8_CALL_V_SERIES
</span><span class="cx"> &&
</span><del>- result->negotiated_modulation == V8_MOD_V90
- &&
</del><span class="cx"> result->protocol == V8_PROTOCOL_LAPM_V42)
</span><span class="cx"> {
</span><span class="cx"> negotiations_ok++;
</span><span class="lines">@@ -97,7 +111,7 @@
</span><span class="cx"> else
</span><span class="cx"> {
</span><span class="cx"> printf("%s V.8 negotiation result:\n", s);
</span><del>- printf(" Modem connect tone '%s'\n", modem_connect_tone_to_str(result->modem_connect_tone_detected));
</del><ins>+ printf(" Modem connect tone '%s' (%d)\n", modem_connect_tone_to_str(result->modem_connect_tone), result->modem_connect_tone);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> /*- End of function --------------------------------------------------------*/
</span><span class="lines">@@ -116,6 +130,8 @@
</span><span class="cx"> int outframes;
</span><span class="cx"> int16_t amp[SAMPLES_PER_CHUNK];
</span><span class="cx"> int16_t out_amp[2*SAMPLES_PER_CHUNK];
</span><ins>+ v8_parms_t v8_call_parms;
+ v8_parms_t v8_answer_parms;
</ins><span class="cx">
</span><span class="cx"> caller_available_modulations = V8_MOD_V17
</span><span class="cx"> | V8_MOD_V21
</span><span class="lines">@@ -147,8 +163,32 @@
</span><span class="cx"> | V8_MOD_V92;
</span><span class="cx"> negotiations_ok = 0;
</span><span class="cx">
</span><del>- v8_caller = v8_init(NULL, TRUE, TRUE, caller_available_modulations, handler, (void *) "caller");
- v8_answerer = v8_init(NULL, FALSE, TRUE, answerer_available_modulations, handler, (void *) "answerer");
</del><ins>+ v8_call_parms.modem_connect_tone = MODEM_CONNECT_TONES_NONE;
+ v8_call_parms.call_function = V8_CALL_V_SERIES;
+ v8_call_parms.modulations = caller_available_modulations;
+ v8_call_parms.protocol = V8_PROTOCOL_LAPM_V42;
+ v8_call_parms.pcm_modem_availability = 0;
+ v8_call_parms.pstn_access = 0;
+ v8_call_parms.nsf = -1;
+ v8_call_parms.t66 = -1;
+ v8_caller = v8_init(NULL,
+ TRUE,
+ &v8_call_parms,
+ handler,
+ (void *) "caller");
+ v8_answer_parms.modem_connect_tone = MODEM_CONNECT_TONES_ANSAM_PR;
+ v8_answer_parms.call_function = V8_CALL_V_SERIES;
+ v8_answer_parms.modulations = answerer_available_modulations;
+ v8_answer_parms.protocol = V8_PROTOCOL_LAPM_V42;
+ v8_answer_parms.pcm_modem_availability = 0;
+ v8_answer_parms.pstn_access = 0;
+ v8_answer_parms.nsf = -1;
+ v8_answer_parms.t66 = -1;
+ v8_answerer = v8_init(NULL,
+ FALSE,
+ &v8_answer_parms,
+ handler,
+ (void *) "answerer");
</ins><span class="cx"> caller_logging = v8_get_logging_state(v8_caller);
</span><span class="cx"> span_log_set_level(caller_logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
</span><span class="cx"> span_log_set_tag(caller_logging, "caller");
</span><span class="lines">@@ -213,6 +253,7 @@
</span><span class="cx"> int tone;
</span><span class="cx"> int16_t amp[SAMPLES_PER_CHUNK];
</span><span class="cx"> int16_t out_amp[2*SAMPLES_PER_CHUNK];
</span><ins>+ v8_parms_t v8_answer_parms;
</ins><span class="cx">
</span><span class="cx"> answerer_available_modulations = V8_MOD_V17
</span><span class="cx"> | V8_MOD_V21
</span><span class="lines">@@ -232,7 +273,20 @@
</span><span class="cx">
</span><span class="cx"> non_v8_caller_tx = silence_gen_init(NULL, 10*SAMPLE_RATE);
</span><span class="cx"> non_v8_caller_rx = modem_connect_tones_rx_init(NULL, MODEM_CONNECT_TONES_ANS_PR, NULL, NULL);
</span><del>- v8_answerer = v8_init(NULL, FALSE, TRUE, answerer_available_modulations, handler, (void *) "answerer");
</del><ins>+
+ v8_answer_parms.modem_connect_tone = MODEM_CONNECT_TONES_ANSAM_PR;
+ v8_answer_parms.call_function = V8_CALL_V_SERIES;
+ v8_answer_parms.modulations = answerer_available_modulations;
+ v8_answer_parms.protocol = V8_PROTOCOL_LAPM_V42;
+ v8_answer_parms.pcm_modem_availability = 0;
+ v8_answer_parms.pstn_access = 0;
+ v8_answer_parms.nsf = -1;
+ v8_answer_parms.t66 = -1;
+ v8_answerer = v8_init(NULL,
+ FALSE,
+ &v8_answer_parms,
+ handler,
+ (void *) "answerer");
</ins><span class="cx"> answerer_logging = v8_get_logging_state(v8_answerer);
</span><span class="cx"> span_log_set_level(answerer_logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
</span><span class="cx"> span_log_set_tag(answerer_logging, "answerer");
</span><span class="lines">@@ -298,6 +352,7 @@
</span><span class="cx"> int outframes;
</span><span class="cx"> int16_t amp[SAMPLES_PER_CHUNK];
</span><span class="cx"> int16_t out_amp[2*SAMPLES_PER_CHUNK];
</span><ins>+ v8_parms_t v8_call_parms;
</ins><span class="cx">
</span><span class="cx"> caller_available_modulations = V8_MOD_V17
</span><span class="cx"> | V8_MOD_V21
</span><span class="lines">@@ -315,7 +370,19 @@
</span><span class="cx"> | V8_MOD_V92;
</span><span class="cx"> negotiations_ok = 0;
</span><span class="cx">
</span><del>- v8_caller = v8_init(NULL, TRUE, TRUE, caller_available_modulations, handler, (void *) "caller");
</del><ins>+ v8_call_parms.modem_connect_tone = MODEM_CONNECT_TONES_NONE;
+ v8_call_parms.call_function = V8_CALL_V_SERIES;
+ v8_call_parms.modulations = caller_available_modulations;
+ v8_call_parms.protocol = V8_PROTOCOL_LAPM_V42;
+ v8_call_parms.pcm_modem_availability = 0;
+ v8_call_parms.pstn_access = 0;
+ v8_call_parms.nsf = -1;
+ v8_call_parms.t66 = -1;
+ v8_caller = v8_init(NULL,
+ TRUE,
+ &v8_call_parms,
+ handler,
+ (void *) "caller");
</ins><span class="cx"> non_v8_answerer_tx = modem_connect_tones_tx_init(NULL, MODEM_CONNECT_TONES_ANS_PR);
</span><span class="cx"> caller_logging = v8_get_logging_state(v8_caller);
</span><span class="cx"> span_log_set_level(caller_logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
</span><span class="lines">@@ -375,7 +442,10 @@
</span><span class="cx"> SNDFILE *outhandle;
</span><span class="cx"> int opt;
</span><span class="cx"> char *decode_test_file;
</span><ins>+ v8_state_t *v8_caller;
</ins><span class="cx"> v8_state_t *v8_answerer;
</span><ins>+ v8_parms_t v8_call_parms;
+ v8_parms_t v8_answer_parms;
</ins><span class="cx"> logging_state_t *logging;
</span><span class="cx">
</span><span class="cx"> decode_test_file = NULL;
</span><span class="lines">@@ -450,10 +520,40 @@
</span><span class="cx"> else
</span><span class="cx"> {
</span><span class="cx"> printf("Decode file '%s'\n", decode_test_file);
</span><del>- v8_answerer = v8_init(NULL, FALSE, TRUE, answerer_available_modulations, handler, (void *) "answerer");
</del><ins>+ v8_call_parms.modem_connect_tone = MODEM_CONNECT_TONES_NONE;
+ v8_call_parms.call_function = V8_CALL_V_SERIES;
+ v8_call_parms.modulations = caller_available_modulations;
+ v8_call_parms.protocol = V8_PROTOCOL_LAPM_V42;
+ v8_call_parms.pcm_modem_availability = 0;
+ v8_call_parms.pstn_access = 0;
+ v8_call_parms.nsf = -1;
+ v8_call_parms.t66 = -1;
+ v8_caller = v8_init(NULL,
+ TRUE,
+ &v8_call_parms,
+ handler,
+ (void *) "caller");
+ logging = v8_get_logging_state(v8_caller);
+ span_log_set_level(logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG);
+ span_log_set_tag(logging, "caller");
+
+ v8_answer_parms.modem_connect_tone = MODEM_CONNECT_TONES_ANSAM_PR;
+ v8_answer_parms.call_function = V8_CALL_V_SERIES;
+ v8_answer_parms.modulations = answerer_available_modulations;
+ v8_answer_parms.protocol = V8_PROTOCOL_LAPM_V42;
+ v8_answer_parms.pcm_modem_availability = 0;
+ v8_answer_parms.pstn_access = 0;
+ v8_answer_parms.nsf = -1;
+ v8_answer_parms.t66 = -1;
+ v8_answerer = v8_init(NULL,
+ FALSE,
+ &v8_answer_parms,
+ handler,
+ (void *) "answerer");
</ins><span class="cx"> logging = v8_get_logging_state(v8_answerer);
</span><span class="cx"> span_log_set_level(logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG);
</span><del>- span_log_set_tag(logging, "decoder");
</del><ins>+ span_log_set_tag(logging, "answerer");
+
</ins><span class="cx"> if ((inhandle = sf_open_telephony_read(decode_test_file, 1)) == NULL)
</span><span class="cx"> {
</span><span class="cx"> fprintf(stderr, " Cannot open speech file '%s'\n", decode_test_file);
</span><span class="lines">@@ -463,10 +563,14 @@
</span><span class="cx">
</span><span class="cx"> while ((samples = sf_readf_short(inhandle, amp, SAMPLES_PER_CHUNK)))
</span><span class="cx"> {
</span><ins>+ remnant = v8_rx(v8_caller, amp, samples);
</ins><span class="cx"> remnant = v8_rx(v8_answerer, amp, samples);
</span><ins>+ remnant = v8_tx(v8_caller, amp, samples);
+ remnant = v8_tx(v8_answerer, amp, samples);
</ins><span class="cx"> }
</span><span class="cx"> /*endwhile*/
</span><span class="cx">
</span><ins>+ v8_free(v8_caller);
</ins><span class="cx"> v8_free(v8_answerer);
</span><span class="cx"> if (sf_close(inhandle) != 0)
</span><span class="cx"> {
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>