Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
12aec908
提交
12aec908
authored
7月 18, 2012
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Various tweaks to spandsp. Cleaned up a few MSVC issues with spandsp
上级
682fb58b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
235 行增加
和
127 行删除
+235
-127
fax_modems.c
libs/spandsp/src/fax_modems.c
+7
-0
inttypes.h
libs/spandsp/src/msvc/inttypes.h
+3
-0
spandsp.h
libs/spandsp/src/msvc/spandsp.h
+17
-7
fax_modems.h
libs/spandsp/src/spandsp/private/fax_modems.h
+4
-3
v17rx.h
libs/spandsp/src/spandsp/private/v17rx.h
+3
-4
v22bis.h
libs/spandsp/src/spandsp/private/v22bis.h
+11
-2
v27ter_rx.h
libs/spandsp/src/spandsp/private/v27ter_rx.h
+2
-2
v29rx.h
libs/spandsp/src/spandsp/private/v29rx.h
+69
-67
v29tx.h
libs/spandsp/src/spandsp/private/v29tx.h
+9
-7
v17rx.h
libs/spandsp/src/spandsp/v17rx.h
+1
-1
v22bis.h
libs/spandsp/src/spandsp/v22bis.h
+4
-2
v27ter_rx.h
libs/spandsp/src/spandsp/v27ter_rx.h
+4
-0
v29rx.h
libs/spandsp/src/spandsp/v29rx.h
+4
-0
t30.c
libs/spandsp/src/t30.c
+1
-1
t31.c
libs/spandsp/src/t31.c
+96
-23
t4_tx.c
libs/spandsp/src/t4_tx.c
+0
-4
t85_encode.c
libs/spandsp/src/t85_encode.c
+0
-4
没有找到文件。
libs/spandsp/src/fax_modems.c
浏览文件 @
12aec908
...
@@ -100,6 +100,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v17_v21_rx(void *user_data, const int16_t am
...
@@ -100,6 +100,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v17_v21_rx(void *user_data, const int16_t am
s
->
rx_handler
=
(
span_rx_handler_t
)
&
fsk_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
fsk_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
fsk_rx_fillin
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
fsk_rx_fillin
;
s
->
rx_user_data
=
&
s
->
v21_rx
;
s
->
rx_user_data
=
&
s
->
v21_rx
;
s
->
rx_fillin_user_data
=
&
s
->
v21_rx
;
}
}
/*endif*/
/*endif*/
return
0
;
return
0
;
...
@@ -131,6 +132,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t
...
@@ -131,6 +132,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t
s
->
rx_handler
=
(
span_rx_handler_t
)
&
fsk_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
fsk_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
fsk_rx_fillin
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
fsk_rx_fillin
;
s
->
rx_user_data
=
&
s
->
v21_rx
;
s
->
rx_user_data
=
&
s
->
v21_rx
;
s
->
rx_fillin_user_data
=
&
s
->
v21_rx
;
}
}
/*endif*/
/*endif*/
return
0
;
return
0
;
...
@@ -162,6 +164,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v29_v21_rx(void *user_data, const int16_t am
...
@@ -162,6 +164,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v29_v21_rx(void *user_data, const int16_t am
s
->
rx_handler
=
(
span_rx_handler_t
)
&
fsk_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
fsk_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
fsk_rx_fillin
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
fsk_rx_fillin
;
s
->
rx_user_data
=
&
s
->
v21_rx
;
s
->
rx_user_data
=
&
s
->
v21_rx
;
s
->
rx_fillin_user_data
=
&
s
->
v21_rx
;
}
}
/*endif*/
/*endif*/
return
0
;
return
0
;
...
@@ -201,6 +204,7 @@ static void v17_rx_status_handler(void *user_data, int status)
...
@@ -201,6 +204,7 @@ static void v17_rx_status_handler(void *user_data, int status)
s
->
rx_handler
=
(
span_rx_handler_t
)
&
v17_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
v17_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
v17_rx_fillin
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
v17_rx_fillin
;
s
->
rx_user_data
=
&
s
->
fast_modems
.
v17_rx
;
s
->
rx_user_data
=
&
s
->
fast_modems
.
v17_rx
;
s
->
rx_fillin_user_data
=
&
s
->
fast_modems
.
v17_rx
;
break
;
break
;
}
}
/*endswitch*/
/*endswitch*/
...
@@ -219,6 +223,7 @@ static void v27ter_rx_status_handler(void *user_data, int status)
...
@@ -219,6 +223,7 @@ static void v27ter_rx_status_handler(void *user_data, int status)
s
->
rx_handler
=
(
span_rx_handler_t
)
&
v27ter_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
v27ter_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
v27ter_rx_fillin
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
v27ter_rx_fillin
;
s
->
rx_user_data
=
&
s
->
fast_modems
.
v27ter_rx
;
s
->
rx_user_data
=
&
s
->
fast_modems
.
v27ter_rx
;
s
->
rx_fillin_user_data
=
&
s
->
fast_modems
.
v27ter_rx
;
break
;
break
;
}
}
/*endswitch*/
/*endswitch*/
...
@@ -237,6 +242,7 @@ static void v29_rx_status_handler(void *user_data, int status)
...
@@ -237,6 +242,7 @@ static void v29_rx_status_handler(void *user_data, int status)
s
->
rx_handler
=
(
span_rx_handler_t
)
&
v29_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
v29_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
v29_rx_fillin
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
v29_rx_fillin
;
s
->
rx_user_data
=
&
s
->
fast_modems
.
v29_rx
;
s
->
rx_user_data
=
&
s
->
fast_modems
.
v29_rx
;
s
->
rx_fillin_user_data
=
&
s
->
fast_modems
.
v29_rx
;
break
;
break
;
}
}
/*endswitch*/
/*endswitch*/
...
@@ -326,6 +332,7 @@ SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s,
...
@@ -326,6 +332,7 @@ SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s,
s
->
rx_handler
=
(
span_rx_handler_t
)
&
span_dummy_rx
;
s
->
rx_handler
=
(
span_rx_handler_t
)
&
span_dummy_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
span_dummy_rx
;
s
->
rx_fillin_handler
=
(
span_rx_fillin_handler_t
)
&
span_dummy_rx
;
s
->
rx_user_data
=
NULL
;
s
->
rx_user_data
=
NULL
;
s
->
rx_fillin_user_data
=
NULL
;
s
->
tx_handler
=
(
span_tx_handler_t
)
&
silence_gen
;
s
->
tx_handler
=
(
span_tx_handler_t
)
&
silence_gen
;
s
->
tx_user_data
=
&
s
->
silence_gen
;
s
->
tx_user_data
=
&
s
->
silence_gen
;
return
s
;
return
s
;
...
...
libs/spandsp/src/msvc/inttypes.h
浏览文件 @
12aec908
...
@@ -43,6 +43,9 @@ typedef __int64 int64_t;
...
@@ -43,6 +43,9 @@ typedef __int64 int64_t;
#if !defined(UINT16_MAX)
#if !defined(UINT16_MAX)
#define UINT16_MAX 0xFFFF
#define UINT16_MAX 0xFFFF
#endif
#endif
#if !defined(UINT32_MAX)
#define UINT32_MAX 0xFFFFFFFF
#endif
#if !defined(INT16_MAX)
#if !defined(INT16_MAX)
#define INT16_MAX 0x7FFF
#define INT16_MAX 0x7FFF
...
...
libs/spandsp/src/msvc/spandsp.h
浏览文件 @
12aec908
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
* You should have received a copy of the GNU Lesser General Public
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: spandsp.h.in,v 1.19.4.1 2009/12/19 09:47:56 steveu Exp $
*/
*/
/*! \file */
/*! \file */
...
@@ -38,6 +36,10 @@
...
@@ -38,6 +36,10 @@
#define SPANDSP_USE_EXPORT_CAPABILITY 1
#define SPANDSP_USE_EXPORT_CAPABILITY 1
#undef SPANDSP_SUPPORT_T42
#undef SPANDSP_SUPPORT_T43
#undef SPANDSP_SUPPORT_V34
#include <stdlib.h>
#include <stdlib.h>
#include <msvc/inttypes.h>
#include <msvc/inttypes.h>
#include <string.h>
#include <string.h>
...
@@ -56,6 +58,7 @@
...
@@ -56,6 +58,7 @@
#include <spandsp/schedule.h>
#include <spandsp/schedule.h>
#include <spandsp/g711.h>
#include <spandsp/g711.h>
#include <spandsp/timing.h>
#include <spandsp/timing.h>
#include <spandsp/math_fixed.h>
#include <spandsp/vector_float.h>
#include <spandsp/vector_float.h>
#include <spandsp/complex_vector_float.h>
#include <spandsp/complex_vector_float.h>
#include <spandsp/vector_int.h>
#include <spandsp/vector_int.h>
...
@@ -88,6 +91,9 @@
...
@@ -88,6 +91,9 @@
#include <spandsp/fsk.h>
#include <spandsp/fsk.h>
#include <spandsp/modem_connect_tones.h>
#include <spandsp/modem_connect_tones.h>
#include <spandsp/silence_gen.h>
#include <spandsp/silence_gen.h>
#include <spandsp/v8.h>
#include <spandsp/v42.h>
#include <spandsp/v42bis.h>
#include <spandsp/v29rx.h>
#include <spandsp/v29rx.h>
#include <spandsp/v29tx.h>
#include <spandsp/v29tx.h>
#include <spandsp/v17rx.h>
#include <spandsp/v17rx.h>
...
@@ -95,17 +101,21 @@
...
@@ -95,17 +101,21 @@
#include <spandsp/v22bis.h>
#include <spandsp/v22bis.h>
#include <spandsp/v27ter_rx.h>
#include <spandsp/v27ter_rx.h>
#include <spandsp/v27ter_tx.h>
#include <spandsp/v27ter_tx.h>
#include <spandsp/v8.h>
#include <spandsp/v18.h>
#include <spandsp/v18.h>
#include <spandsp/v42.h>
#include <spandsp/v42bis.h>
#include <spandsp/timezone.h>
#include <spandsp/timezone.h>
#include <spandsp/t4_rx.h>
#include <spandsp/t4_rx.h>
#include <spandsp/t4_tx.h>
#include <spandsp/t4_tx.h>
#include <spandsp/t4_t6_decode.h>
#include <spandsp/image_translate.h>
#include <spandsp/t4_t6_decode.h>
#include <spandsp/t4_t6_encode.h>
#include <spandsp/t4_t6_encode.h>
#include <spandsp/t81_t82_arith_coding.h>
#include <spandsp/t81_t82_arith_coding.h>
#include <spandsp/t85.h>
#include <spandsp/t85.h>
#if defined(SPANDSP_SUPPORT_T42)
#include <spandsp/t42.h>
#endif
#if defined(SPANDSP_SUPPORT_T43)
#include <spandsp/t43.h>
#endif
#include <spandsp/t30.h>
#include <spandsp/t30.h>
#include <spandsp/t30_api.h>
#include <spandsp/t30_api.h>
#include <spandsp/t30_fcf.h>
#include <spandsp/t30_fcf.h>
...
...
libs/spandsp/src/spandsp/private/fax_modems.h
浏览文件 @
12aec908
...
@@ -99,6 +99,7 @@ struct fax_modems_state_s
...
@@ -99,6 +99,7 @@ struct fax_modems_state_s
/*! \brief The current receive missing signal fill-in handler */
/*! \brief The current receive missing signal fill-in handler */
span_rx_fillin_handler_t
rx_fillin_handler
;
span_rx_fillin_handler_t
rx_fillin_handler
;
void
*
rx_user_data
;
void
*
rx_user_data
;
void
*
rx_fillin_user_data
;
/*! \brief The current transmit signal handler */
/*! \brief The current transmit signal handler */
span_tx_handler_t
tx_handler
;
span_tx_handler_t
tx_handler
;
...
@@ -109,12 +110,12 @@ struct fax_modems_state_s
...
@@ -109,12 +110,12 @@ struct fax_modems_state_s
span_tx_handler_t
next_tx_handler
;
span_tx_handler_t
next_tx_handler
;
void
*
next_tx_user_data
;
void
*
next_tx_user_data
;
/*! The current bit rate of the transmitter. */
/*!
\brief
The current bit rate of the transmitter. */
int
tx_bit_rate
;
int
tx_bit_rate
;
/*! The current bit rate of the receiver. */
/*!
\brief
The current bit rate of the receiver. */
int
rx_bit_rate
;
int
rx_bit_rate
;
/*! If TRUE, transmission is in progress */
/*!
\brief
If TRUE, transmission is in progress */
int
transmit
;
int
transmit
;
/*! \brief Audio logging file handle for received audio. */
/*! \brief Audio logging file handle for received audio. */
int
audio_rx_log
;
int
audio_rx_log
;
...
...
libs/spandsp/src/spandsp/private/v17rx.h
浏览文件 @
12aec908
...
@@ -73,7 +73,7 @@ struct v17_rx_state_s
...
@@ -73,7 +73,7 @@ struct v17_rx_state_s
void
*
qam_user_data
;
void
*
qam_user_data
;
#if defined(SPANDSP_USE_FIXED_POINTx)
#if defined(SPANDSP_USE_FIXED_POINTx)
/*! \brief The scaling factor a
cc
essed by the AGC algorithm. */
/*! \brief The scaling factor a
ss
essed by the AGC algorithm. */
float
agc_scaling
;
float
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
float
agc_scaling_save
;
float
agc_scaling_save
;
...
@@ -110,7 +110,7 @@ struct v17_rx_state_s
...
@@ -110,7 +110,7 @@ struct v17_rx_state_s
/*! \brief A pointer to the current constellation. */
/*! \brief A pointer to the current constellation. */
const
complexi16_t
*
constellation
;
const
complexi16_t
*
constellation
;
#else
#else
/*! \brief The scaling factor a
cc
essed by the AGC algorithm. */
/*! \brief The scaling factor a
ss
essed by the AGC algorithm. */
float
agc_scaling
;
float
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
float
agc_scaling_save
;
float
agc_scaling_save
;
...
@@ -150,7 +150,7 @@ struct v17_rx_state_s
...
@@ -150,7 +150,7 @@ struct v17_rx_state_s
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
int
rrc_filter_step
;
int
rrc_filter_step
;
/*! \brief The state of the differential decoder */
/*! \brief The
current
state of the differential decoder */
int
diff
;
int
diff
;
/*! \brief The register for the data scrambler. */
/*! \brief The register for the data scrambler. */
uint32_t
scramble_reg
;
uint32_t
scramble_reg
;
...
@@ -228,7 +228,6 @@ struct v17_rx_state_s
...
@@ -228,7 +228,6 @@ struct v17_rx_state_s
from the last states of the trellis. */
from the last states of the trellis. */
float
distances
[
8
];
float
distances
[
8
];
#endif
#endif
/*! \brief Error and flow logging control */
/*! \brief Error and flow logging control */
logging_state_t
logging
;
logging_state_t
logging
;
};
};
...
...
libs/spandsp/src/spandsp/private/v22bis.h
浏览文件 @
12aec908
...
@@ -65,6 +65,12 @@ enum
...
@@ -65,6 +65,12 @@ enum
V22BIS_TX_TRAINING_STAGE_PARKED
V22BIS_TX_TRAINING_STAGE_PARKED
};
};
#if defined(SPANDSP_USE_FIXED_POINTx)
extern
const
complexi16_t
v22bis_constellation
[
16
];
#else
extern
const
complexf_t
v22bis_constellation
[
16
];
#endif
/*!
/*!
V.22bis modem descriptor. This defines the working state for a single instance
V.22bis modem descriptor. This defines the working state for a single instance
of a V.22bis modem.
of a V.22bis modem.
...
@@ -93,10 +99,11 @@ struct v22bis_state_s
...
@@ -93,10 +99,11 @@ struct v22bis_state_s
/* Receive section */
/* Receive section */
struct
struct
{
{
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
#if defined(SPANDSP_USE_FIXED_POINTx)
#if defined(SPANDSP_USE_FIXED_POINTx)
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
int16_t
rrc_filter
[
V22BIS_RX_FILTER_STEPS
];
int16_t
rrc_filter
[
V22BIS_RX_FILTER_STEPS
];
#else
#else
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
float
rrc_filter
[
V22BIS_RX_FILTER_STEPS
];
float
rrc_filter
[
V22BIS_RX_FILTER_STEPS
];
#endif
#endif
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
...
@@ -156,7 +163,9 @@ struct v22bis_state_s
...
@@ -156,7 +163,9 @@ struct v22bis_state_s
/*! \brief The equalizer signal buffer. */
/*! \brief The equalizer signal buffer. */
complexi_t
eq_buf
[
V22BIS_EQUALIZER_MASK
+
1
];
complexi_t
eq_buf
[
V22BIS_EQUALIZER_MASK
+
1
];
#else
#else
/*! \brief The adaptive equalizer coefficients. */
complexf_t
eq_coeff
[
2
*
V22BIS_EQUALIZER_LEN
+
1
];
complexf_t
eq_coeff
[
2
*
V22BIS_EQUALIZER_LEN
+
1
];
/*! \brief The equalizer signal buffer. */
complexf_t
eq_buf
[
V22BIS_EQUALIZER_MASK
+
1
];
complexf_t
eq_buf
[
V22BIS_EQUALIZER_MASK
+
1
];
#endif
#endif
/*! \brief Current offset into the equalizer buffer. */
/*! \brief Current offset into the equalizer buffer. */
...
@@ -186,7 +195,7 @@ struct v22bis_state_s
...
@@ -186,7 +195,7 @@ struct v22bis_state_s
/*! \brief The gain factor needed to achieve the specified output power. */
/*! \brief The gain factor needed to achieve the specified output power. */
float
gain
;
float
gain
;
/*! \brief The ro
ute
raised cosine (RRC) pulse shaping filter buffer. */
/*! \brief The ro
ot
raised cosine (RRC) pulse shaping filter buffer. */
complexf_t
rrc_filter
[
2
*
V22BIS_TX_FILTER_STEPS
];
complexf_t
rrc_filter
[
2
*
V22BIS_TX_FILTER_STEPS
];
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
int
rrc_filter_step
;
int
rrc_filter_step
;
...
...
libs/spandsp/src/spandsp/private/v27ter_rx.h
浏览文件 @
12aec908
...
@@ -70,7 +70,7 @@ struct v27ter_rx_state_s
...
@@ -70,7 +70,7 @@ struct v27ter_rx_state_s
void
*
qam_user_data
;
void
*
qam_user_data
;
#if defined(SPANDSP_USE_FIXED_POINT)
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The scaling factor a
cc
essed by the AGC algorithm. */
/*! \brief The scaling factor a
ss
essed by the AGC algorithm. */
int16_t
agc_scaling
;
int16_t
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
int16_t
agc_scaling_save
;
int16_t
agc_scaling_save
;
...
@@ -95,7 +95,7 @@ struct v27ter_rx_state_s
...
@@ -95,7 +95,7 @@ struct v27ter_rx_state_s
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
int16_t
rrc_filter
[
V27TER_RX_FILTER_STEPS
];
int16_t
rrc_filter
[
V27TER_RX_FILTER_STEPS
];
#else
#else
/*! \brief The scaling factor a
cc
essed by the AGC algorithm. */
/*! \brief The scaling factor a
ss
essed by the AGC algorithm. */
float
agc_scaling
;
float
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
float
agc_scaling_save
;
float
agc_scaling_save
;
...
...
libs/spandsp/src/spandsp/private/v29rx.h
浏览文件 @
12aec908
...
@@ -61,10 +61,73 @@ struct v29_rx_state_s
...
@@ -61,10 +61,73 @@ struct v29_rx_state_s
routine. */
routine. */
void
*
qam_user_data
;
void
*
qam_user_data
;
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
#if defined(SPANDSP_USE_FIXED_POINT)
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The scaling factor assessed by the AGC algorithm. */
int16_t
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
int16_t
agc_scaling_save
;
/*! \brief The current delta factor for updating the equalizer coefficients. */
int16_t
eq_delta
;
/*! \brief The adaptive equalizer coefficients. */
complexi16_t
eq_coeff
[
V29_EQUALIZER_LEN
];
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexi16_t
eq_coeff_save
[
V29_EQUALIZER_LEN
];
/*! \brief The equalizer signal buffer. */
complexi16_t
eq_buf
[
V29_EQUALIZER_LEN
];
/*! Low band edge filter for symbol sync. */
int32_t
symbol_sync_low
[
2
];
/*! High band edge filter for symbol sync. */
int32_t
symbol_sync_high
[
2
];
/*! DC filter for symbol sync. */
int32_t
symbol_sync_dc_filter
[
2
];
/*! Baud phase for symbol sync. */
int32_t
baud_phase
;
/*! \brief A measure of how much mismatch there is between the real constellation,
and the decoded symbol positions. */
float
training_error
;
/*! \brief The proportional part of the carrier tracking filter. */
int32_t
carrier_track_p
;
/*! \brief The integral part of the carrier tracking filter. */
int32_t
carrier_track_i
;
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
int16_t
rrc_filter
[
V29_RX_FILTER_STEPS
];
int16_t
rrc_filter
[
V29_RX_FILTER_STEPS
];
#else
#else
/*! \brief The scaling factor assessed by the AGC algorithm. */
float
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
float
agc_scaling_save
;
/*! \brief The current delta factor for updating the equalizer coefficients. */
float
eq_delta
;
/*! \brief The adaptive equalizer coefficients. */
complexf_t
eq_coeff
[
V29_EQUALIZER_LEN
];
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexf_t
eq_coeff_save
[
V29_EQUALIZER_LEN
];
/*! \brief The equalizer signal buffer. */
complexf_t
eq_buf
[
V29_EQUALIZER_LEN
];
/*! Low band edge filter for symbol sync. */
float
symbol_sync_low
[
2
];
/*! High band edge filter for symbol sync. */
float
symbol_sync_high
[
2
];
/*! DC filter for symbol sync. */
float
symbol_sync_dc_filter
[
2
];
/*! Baud phase for symbol sync. */
float
baud_phase
;
/*! \brief A measure of how much mismatch there is between the real constellation,
and the decoded symbol positions. */
float
training_error
;
/*! \brief The proportional part of the carrier tracking filter. */
float
carrier_track_p
;
/*! \brief The integral part of the carrier tracking filter. */
float
carrier_track_i
;
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
float
rrc_filter
[
V29_RX_FILTER_STEPS
];
float
rrc_filter
[
V29_RX_FILTER_STEPS
];
#endif
#endif
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
...
@@ -82,9 +145,6 @@ struct v29_rx_state_s
...
@@ -82,9 +145,6 @@ struct v29_rx_state_s
int
training_stage
;
int
training_stage
;
/*! \brief A count of how far through the current training step we are. */
/*! \brief A count of how far through the current training step we are. */
int
training_count
;
int
training_count
;
/*! \brief A measure of how much mismatch there is between the real constellation,
and the decoded symbol positions. */
float
training_error
;
/*! \brief The value of the last signal sample, using the a simple HPF for signal power estimation. */
/*! \brief The value of the last signal sample, using the a simple HPF for signal power estimation. */
int16_t
last_sample
;
int16_t
last_sample
;
/*! \brief >0 if a signal above the minimum is present. It may or may not be a V.29 signal. */
/*! \brief >0 if a signal above the minimum is present. It may or may not be a V.29 signal. */
...
@@ -96,27 +156,12 @@ struct v29_rx_state_s
...
@@ -96,27 +156,12 @@ struct v29_rx_state_s
/*! \brief A highest magnitude sample seen. */
/*! \brief A highest magnitude sample seen. */
int16_t
high_sample
;
int16_t
high_sample
;
/*! \brief The position of the current symbol in the constellation, used for
differential decoding. */
int
constellation_state
;
/*! \brief The current phase of the carrier (i.e. the DDS parameter). */
/*! \brief The current phase of the carrier (i.e. the DDS parameter). */
uint32_t
carrier_phase
;
uint32_t
carrier_phase
;
/*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
/*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
int32_t
carrier_phase_rate
;
int32_t
carrier_phase_rate
;
/*! \brief The carrier update rate saved for reuse when using short training. */
/*! \brief The carrier update rate saved for reuse when using short training. */
int32_t
carrier_phase_rate_save
;
int32_t
carrier_phase_rate_save
;
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The proportional part of the carrier tracking filter. */
int32_t
carrier_track_p
;
/*! \brief The integral part of the carrier tracking filter. */
int32_t
carrier_track_i
;
#else
/*! \brief The proportional part of the carrier tracking filter. */
float
carrier_track_p
;
/*! \brief The integral part of the carrier tracking filter. */
float
carrier_track_i
;
#endif
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
/*! \brief A power meter, to measure the HPF'ed signal power in the channel. */
power_meter_t
power
;
power_meter_t
power
;
...
@@ -135,54 +180,6 @@ struct v29_rx_state_s
...
@@ -135,54 +180,6 @@ struct v29_rx_state_s
/*! \brief The current half of the baud. */
/*! \brief The current half of the baud. */
int
baud_half
;
int
baud_half
;
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The scaling factor accessed by the AGC algorithm. */
int16_t
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
int16_t
agc_scaling_save
;
/*! \brief The current delta factor for updating the equalizer coefficients. */
int16_t
eq_delta
;
/*! \brief The adaptive equalizer coefficients. */
complexi16_t
eq_coeff
[
V29_EQUALIZER_LEN
];
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexi16_t
eq_coeff_save
[
V29_EQUALIZER_LEN
];
/*! \brief The equalizer signal buffer. */
complexi16_t
eq_buf
[
V29_EQUALIZER_LEN
];
/*! Low band edge filter for symbol sync. */
int32_t
symbol_sync_low
[
2
];
/*! High band edge filter for symbol sync. */
int32_t
symbol_sync_high
[
2
];
/*! DC filter for symbol sync. */
int32_t
symbol_sync_dc_filter
[
2
];
/*! Baud phase for symbol sync. */
int32_t
baud_phase
;
#else
/*! \brief The scaling factor accessed by the AGC algorithm. */
float
agc_scaling
;
/*! \brief The previous value of agc_scaling, needed to reuse old training. */
float
agc_scaling_save
;
/*! \brief The current delta factor for updating the equalizer coefficients. */
float
eq_delta
;
/*! \brief The adaptive equalizer coefficients. */
complexf_t
eq_coeff
[
V29_EQUALIZER_LEN
];
/*! \brief A saved set of adaptive equalizer coefficients for use after restarts. */
complexf_t
eq_coeff_save
[
V29_EQUALIZER_LEN
];
/*! \brief The equalizer signal buffer. */
complexf_t
eq_buf
[
V29_EQUALIZER_LEN
];
/*! Low band edge filter for symbol sync. */
float
symbol_sync_low
[
2
];
/*! High band edge filter for symbol sync. */
float
symbol_sync_high
[
2
];
/*! DC filter for symbol sync. */
float
symbol_sync_dc_filter
[
2
];
/*! Baud phase for symbol sync. */
float
baud_phase
;
#endif
/*! \brief The total symbol timing correction since the carrier came up.
/*! \brief The total symbol timing correction since the carrier came up.
This is only for performance analysis purposes. */
This is only for performance analysis purposes. */
int
total_baud_timing_correction
;
int
total_baud_timing_correction
;
...
@@ -191,6 +188,11 @@ struct v29_rx_state_s
...
@@ -191,6 +188,11 @@ struct v29_rx_state_s
int32_t
start_angles
[
2
];
int32_t
start_angles
[
2
];
/*! \brief History list of phase angles for the coarse carrier aquisition step. */
/*! \brief History list of phase angles for the coarse carrier aquisition step. */
int32_t
angles
[
16
];
int32_t
angles
[
16
];
/*! \brief The position of the current symbol in the constellation, used for
differential decoding. */
int
constellation_state
;
/*! \brief Error and flow logging control */
/*! \brief Error and flow logging control */
logging_state_t
logging
;
logging_state_t
logging
;
};
};
...
...
libs/spandsp/src/spandsp/private/v29tx.h
浏览文件 @
12aec908
...
@@ -47,21 +47,23 @@ struct v29_tx_state_s
...
@@ -47,21 +47,23 @@ struct v29_tx_state_s
/*! \brief A user specified opaque pointer passed to the status function. */
/*! \brief A user specified opaque pointer passed to the status function. */
void
*
status_user_data
;
void
*
status_user_data
;
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief Gain required to achieve the specified output power, not allowing
/*! \brief Gain required to achieve the specified output power, not allowing
for the size of the current constellation. */
for the size of the current constellation. */
float
base_gain
;
float
base_gain
;
/*! \brief Gain required to achieve the specified output power, allowing
/*! \brief Gain required to achieve the specified output power, allowing
for the size of the current constellation. */
for the size of the current constellation. */
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t
gain
;
int32_t
gain
;
#else
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
float
gain
;
#endif
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
#if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t
rrc_filter
[
2
*
V29_TX_FILTER_STEPS
];
complexi16_t
rrc_filter
[
2
*
V29_TX_FILTER_STEPS
];
#else
#else
/*! \brief Gain required to achieve the specified output power, not allowing
for the size of the current constellation. */
float
base_gain
;
/*! \brief Gain required to achieve the specified output power, allowing
for the size of the current constellation. */
float
gain
;
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
complexf_t
rrc_filter
[
2
*
V29_TX_FILTER_STEPS
];
complexf_t
rrc_filter
[
2
*
V29_TX_FILTER_STEPS
];
#endif
#endif
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
/*! \brief Current offset into the RRC pulse shaping filter buffer. */
...
...
libs/spandsp/src/spandsp/v17rx.h
浏览文件 @
12aec908
...
@@ -293,7 +293,7 @@ SPAN_DECLARE_NONSTD(int) v17_rx_fillin(v17_rx_state_t *s, int len);
...
@@ -293,7 +293,7 @@ SPAN_DECLARE_NONSTD(int) v17_rx_fillin(v17_rx_state_t *s, int len);
\param coeffs The vector of complex coefficients.
\param coeffs The vector of complex coefficients.
\return The number of coefficients in the vector. */
\return The number of coefficients in the vector. */
#if defined(SPANDSP_USE_FIXED_POINTx)
#if defined(SPANDSP_USE_FIXED_POINTx)
SPAN_DECLARE
(
int
)
v17_rx_equalizer_state
(
v17_rx_state_t
*
s
,
complexi_t
**
coeffs
);
SPAN_DECLARE
(
int
)
v17_rx_equalizer_state
(
v17_rx_state_t
*
s
,
complexi
16
_t
**
coeffs
);
#else
#else
SPAN_DECLARE
(
int
)
v17_rx_equalizer_state
(
v17_rx_state_t
*
s
,
complexf_t
**
coeffs
);
SPAN_DECLARE
(
int
)
v17_rx_equalizer_state
(
v17_rx_state_t
*
s
,
complexf_t
**
coeffs
);
#endif
#endif
...
...
libs/spandsp/src/spandsp/v22bis.h
浏览文件 @
12aec908
...
@@ -61,8 +61,6 @@ enum
...
@@ -61,8 +61,6 @@ enum
*/
*/
typedef
struct
v22bis_state_s
v22bis_state_t
;
typedef
struct
v22bis_state_s
v22bis_state_t
;
extern
const
complexf_t
v22bis_constellation
[
16
];
#if defined(__cplusplus)
#if defined(__cplusplus)
extern
"C"
extern
"C"
{
{
...
@@ -88,7 +86,11 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len);
...
@@ -88,7 +86,11 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len);
\brief Get a snapshot of the current equalizer coefficients.
\brief Get a snapshot of the current equalizer coefficients.
\param coeffs The vector of complex coefficients.
\param coeffs The vector of complex coefficients.
\return The number of coefficients in the vector. */
\return The number of coefficients in the vector. */
#if defined(SPANDSP_USE_FIXED_POINTx)
SPAN_DECLARE
(
int
)
v22bis_rx_equalizer_state
(
v22bis_state_t
*
s
,
complexi16_t
**
coeffs
);
#else
SPAN_DECLARE
(
int
)
v22bis_rx_equalizer_state
(
v22bis_state_t
*
s
,
complexf_t
**
coeffs
);
SPAN_DECLARE
(
int
)
v22bis_rx_equalizer_state
(
v22bis_state_t
*
s
,
complexf_t
**
coeffs
);
#endif
/*! Get the current received carrier frequency.
/*! Get the current received carrier frequency.
\param s The modem context.
\param s The modem context.
...
...
libs/spandsp/src/spandsp/v27ter_rx.h
浏览文件 @
12aec908
...
@@ -126,7 +126,11 @@ SPAN_DECLARE_NONSTD(int) v27ter_rx_fillin(v27ter_rx_state_t *s, int len);
...
@@ -126,7 +126,11 @@ SPAN_DECLARE_NONSTD(int) v27ter_rx_fillin(v27ter_rx_state_t *s, int len);
\brief Get a snapshot of the current equalizer coefficients.
\brief Get a snapshot of the current equalizer coefficients.
\param coeffs The vector of complex coefficients.
\param coeffs The vector of complex coefficients.
\return The number of coefficients in the vector. */
\return The number of coefficients in the vector. */
#if defined(SPANDSP_USE_FIXED_POINTx)
SPAN_DECLARE
(
int
)
v27ter_rx_equalizer_state
(
v27ter_rx_state_t
*
s
,
complexi16_t
**
coeffs
);
#else
SPAN_DECLARE
(
int
)
v27ter_rx_equalizer_state
(
v27ter_rx_state_t
*
s
,
complexf_t
**
coeffs
);
SPAN_DECLARE
(
int
)
v27ter_rx_equalizer_state
(
v27ter_rx_state_t
*
s
,
complexf_t
**
coeffs
);
#endif
/*! Get the current received carrier frequency.
/*! Get the current received carrier frequency.
\param s The modem context.
\param s The modem context.
...
...
libs/spandsp/src/spandsp/v29rx.h
浏览文件 @
12aec908
...
@@ -118,7 +118,11 @@ scrambler register) cannot be trusted for the test. The receive modem,
...
@@ -118,7 +118,11 @@ scrambler register) cannot be trusted for the test. The receive modem,
therefore, only tests that bits starting at bit 24 are really ones.
therefore, only tests that bits starting at bit 24 are really ones.
*/
*/
#if defined(SPANDSP_USE_FIXED_POINTx)
typedef
void
(
*
qam_report_handler_t
)(
void
*
user_data
,
const
complexi16_t
*
constel
,
const
complexi16_t
*
target
,
int
symbol
);
#else
typedef
void
(
*
qam_report_handler_t
)(
void
*
user_data
,
const
complexf_t
*
constel
,
const
complexf_t
*
target
,
int
symbol
);
typedef
void
(
*
qam_report_handler_t
)(
void
*
user_data
,
const
complexf_t
*
constel
,
const
complexf_t
*
target
,
int
symbol
);
#endif
/*!
/*!
V.29 modem receive side descriptor. This defines the working state for a
V.29 modem receive side descriptor. This defines the working state for a
...
...
libs/spandsp/src/t30.c
浏览文件 @
12aec908
...
@@ -5633,7 +5633,7 @@ SPAN_DECLARE(int) t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_
...
@@ -5633,7 +5633,7 @@ SPAN_DECLARE(int) t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_
break
;
break
;
default
:
default
:
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"t30_non_ecm_get_chunk in bad state %d
\n
"
,
s
->
state
);
span_log
(
&
s
->
logging
,
SPAN_LOG_WARNING
,
"t30_non_ecm_get_chunk in bad state %d
\n
"
,
s
->
state
);
len
=
0
;
len
=
-
1
;
break
;
break
;
}
}
return
len
;
return
len
;
...
...
libs/spandsp/src/t31.c
浏览文件 @
12aec908
差异被折叠。
点击展开。
libs/spandsp/src/t4_tx.c
浏览文件 @
12aec908
...
@@ -81,10 +81,6 @@
...
@@ -81,10 +81,6 @@
#include "faxfont.h"
#include "faxfont.h"
#ifndef UINT32_MAX
#define UINT32_MAX 0xffffffff
#endif
/*! The number of centimetres in one inch */
/*! The number of centimetres in one inch */
#define CM_PER_INCH 2.54f
#define CM_PER_INCH 2.54f
...
...
libs/spandsp/src/t85_encode.c
浏览文件 @
12aec908
...
@@ -46,10 +46,6 @@
...
@@ -46,10 +46,6 @@
#include "spandsp/private/t81_t82_arith_coding.h"
#include "spandsp/private/t81_t82_arith_coding.h"
#include "spandsp/private/t85.h"
#include "spandsp/private/t85.h"
#ifndef UINT32_MAX
#define UINT32_MAX 0xffffffff
#endif
/* Image length update status */
/* Image length update status */
enum
enum
{
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论