Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
72566f6a
提交
72566f6a
authored
8月 05, 2012
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed V.22bis fixed point builds
上级
f088d971
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
27 行增加
和
46 行删除
+27
-46
autogen.sh
libs/spandsp/autogen.sh
+3
-16
async.h
libs/spandsp/src/spandsp/async.h
+0
-3
v22bis.h
libs/spandsp/src/spandsp/private/v22bis.h
+2
-2
tone_generate.h
libs/spandsp/src/spandsp/tone_generate.h
+0
-3
v22bis.h
libs/spandsp/src/spandsp/v22bis.h
+1
-1
v22bis_rx.c
libs/spandsp/src/v22bis_rx.c
+21
-21
没有找到文件。
libs/spandsp/autogen.sh
浏览文件 @
72566f6a
...
@@ -106,32 +106,19 @@ version_compare()
...
@@ -106,32 +106,19 @@ version_compare()
# Check for required version and die if unhappy
# Check for required version and die if unhappy
mkdir
config
if
[
"x
$UNAME
"
=
"xFreeBSD"
]
;
then
if
[
"x
$UNAME
"
=
"xFreeBSD"
]
;
then
version_compare libtoolize 1 5 16
||
exit
1
version_compare libtoolize 1 5 16
||
exit
1
version_compare automake19 1 9 5
||
exit
1
version_compare automake19 1 9 5
||
exit
1
version_compare autoconf259 2 59
||
exit
1
version_compare autoconf259 2 59
||
exit
1
ACLOCAL
=
aclocal19
AUTOHEADER
=
autoheader259
AUTOMAKE
=
automake19
AUTOCONF
=
autoconf259
else
else
version_compare libtoolize 1 5 16
||
exit
1
version_compare libtoolize 1 5 16
||
exit
1
version_compare automake 1 9 5
||
exit
1
version_compare automake 1 9 5
||
exit
1
version_compare autoconf 2 59
||
exit
1
version_compare autoconf 2 59
||
exit
1
ACLOCAL
=
aclocal
AUTOHEADER
=
autoheader
AUTOMAKE
=
automake
AUTOCONF
=
autoconf
fi
fi
libtoolize
--copy
--force
--ltdl
autoreconf
-fi
#NetBSD seems to need this file writable
chmod
u+w libltdl/configure
$ACLOCAL
$AUTOHEADER
--force
$AUTOMAKE
--copy
--add-missing
$AUTOCONF
--force
#chmod ug+x debian/rules
#chmod ug+x debian/rules
...
...
libs/spandsp/src/spandsp/async.h
浏览文件 @
72566f6a
...
@@ -107,9 +107,6 @@ typedef void (*put_bit_func_t)(void *user_data, int bit);
...
@@ -107,9 +107,6 @@ typedef void (*put_bit_func_t)(void *user_data, int bit);
/*! Bit get function for data pumps */
/*! Bit get function for data pumps */
typedef
int
(
*
get_bit_func_t
)(
void
*
user_data
);
typedef
int
(
*
get_bit_func_t
)(
void
*
user_data
);
#define modem_rx_status_func_t modem_status_func_t
#define modem_tx_status_func_t modem_status_func_t
/*! Status change callback function for data pumps */
/*! Status change callback function for data pumps */
typedef
void
(
*
modem_status_func_t
)(
void
*
user_data
,
int
status
);
typedef
void
(
*
modem_status_func_t
)(
void
*
user_data
,
int
status
);
...
...
libs/spandsp/src/spandsp/private/v22bis.h
浏览文件 @
72566f6a
...
@@ -65,7 +65,7 @@ enum
...
@@ -65,7 +65,7 @@ enum
V22BIS_TX_TRAINING_STAGE_PARKED
V22BIS_TX_TRAINING_STAGE_PARKED
};
};
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
extern
const
complexi16_t
v22bis_constellation
[
16
];
extern
const
complexi16_t
v22bis_constellation
[
16
];
#else
#else
extern
const
complexf_t
v22bis_constellation
[
16
];
extern
const
complexf_t
v22bis_constellation
[
16
];
...
@@ -137,7 +137,7 @@ struct v22bis_state_s
...
@@ -137,7 +137,7 @@ struct v22bis_state_s
int
constellation_state
;
int
constellation_state
;
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief The scaling factor accessed by the AGC algorithm. */
/*! \brief The scaling factor accessed by the AGC algorithm. */
int16_t
agc_scaling
;
int16_t
agc_scaling
;
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
/*! \brief The root raised cosine (RRC) pulse shaping filter buffer. */
...
...
libs/spandsp/src/spandsp/tone_generate.h
浏览文件 @
72566f6a
...
@@ -86,9 +86,6 @@ SPAN_DECLARE(tone_gen_descriptor_t *) tone_gen_descriptor_init(tone_gen_descript
...
@@ -86,9 +86,6 @@ SPAN_DECLARE(tone_gen_descriptor_t *) tone_gen_descriptor_init(tone_gen_descript
int
d4
,
int
d4
,
int
repeat
);
int
repeat
);
/* For backwards compatibility */
#define make_tone_gen_descriptor tone_gen_descriptor_init
SPAN_DECLARE
(
void
)
tone_gen_descriptor_free
(
tone_gen_descriptor_t
*
s
);
SPAN_DECLARE
(
void
)
tone_gen_descriptor_free
(
tone_gen_descriptor_t
*
s
);
SPAN_DECLARE_NONSTD
(
int
)
tone_gen
(
tone_gen_state_t
*
s
,
int16_t
amp
[],
int
max_samples
);
SPAN_DECLARE_NONSTD
(
int
)
tone_gen
(
tone_gen_state_t
*
s
,
int16_t
amp
[],
int
max_samples
);
...
...
libs/spandsp/src/spandsp/v22bis.h
浏览文件 @
72566f6a
...
@@ -86,7 +86,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len);
...
@@ -86,7 +86,7 @@ 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_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
SPAN_DECLARE
(
int
)
v22bis_rx_equalizer_state
(
v22bis_state_t
*
s
,
complexi16_t
**
coeffs
);
SPAN_DECLARE
(
int
)
v22bis_rx_equalizer_state
(
v22bis_state_t
*
s
,
complexi16_t
**
coeffs
);
#else
#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
);
...
...
libs/spandsp/src/v22bis_rx.c
浏览文件 @
72566f6a
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
#include "spandsp/private/logging.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/v22bis.h"
#include "spandsp/private/v22bis.h"
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
#define FP_SHIFT_FACTOR 10
#define FP_SHIFT_FACTOR 10
#define FP_SCALE FP_Q_6_10
#define FP_SCALE FP_Q_6_10
#include "v22bis_rx_1200_fixed_rrc.h"
#include "v22bis_rx_1200_fixed_rrc.h"
...
@@ -187,7 +187,7 @@ SPAN_DECLARE(int) v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coef
...
@@ -187,7 +187,7 @@ SPAN_DECLARE(int) v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coef
void
v22bis_equalizer_coefficient_reset
(
v22bis_state_t
*
s
)
void
v22bis_equalizer_coefficient_reset
(
v22bis_state_t
*
s
)
{
{
/* Start with an equalizer based on everything being perfect */
/* Start with an equalizer based on everything being perfect */
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
static
const
complexi16_t
x
=
{
FP_Q_6_10
(
3
.
0
f
),
FP_Q_6_10
(
0
.
0
f
)};
static
const
complexi16_t
x
=
{
FP_Q_6_10
(
3
.
0
f
),
FP_Q_6_10
(
0
.
0
f
)};
cvec_zeroi16
(
s
->
rx
.
eq_coeff
,
V22BIS_EQUALIZER_LEN
);
cvec_zeroi16
(
s
->
rx
.
eq_coeff
,
V22BIS_EQUALIZER_LEN
);
...
@@ -206,7 +206,7 @@ void v22bis_equalizer_coefficient_reset(v22bis_state_t *s)
...
@@ -206,7 +206,7 @@ void v22bis_equalizer_coefficient_reset(v22bis_state_t *s)
static
void
equalizer_reset
(
v22bis_state_t
*
s
)
static
void
equalizer_reset
(
v22bis_state_t
*
s
)
{
{
v22bis_equalizer_coefficient_reset
(
s
);
v22bis_equalizer_coefficient_reset
(
s
);
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
cvec_zeroi16
(
s
->
rx
.
eq_buf
,
V22BIS_EQUALIZER_LEN
);
cvec_zeroi16
(
s
->
rx
.
eq_buf
,
V22BIS_EQUALIZER_LEN
);
#else
#else
cvec_zerof
(
s
->
rx
.
eq_buf
,
V22BIS_EQUALIZER_LEN
);
cvec_zerof
(
s
->
rx
.
eq_buf
,
V22BIS_EQUALIZER_LEN
);
...
@@ -237,7 +237,7 @@ static __inline__ complexf_t equalizer_get(v22bis_state_t *s)
...
@@ -237,7 +237,7 @@ static __inline__ complexf_t equalizer_get(v22bis_state_t *s)
#endif
#endif
/*- End of function --------------------------------------------------------*/
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
static
void
tune_equalizer
(
v22bis_state_t
*
s
,
const
complexi16_t
*
z
,
const
complexi16_t
*
target
)
static
void
tune_equalizer
(
v22bis_state_t
*
s
,
const
complexi16_t
*
z
,
const
complexi16_t
*
target
)
{
{
complexi16_t
err
;
complexi16_t
err
;
...
@@ -262,13 +262,13 @@ static void tune_equalizer(v22bis_state_t *s, const complexf_t *z, const complex
...
@@ -262,13 +262,13 @@ static void tune_equalizer(v22bis_state_t *s, const complexf_t *z, const complex
#endif
#endif
/*- End of function --------------------------------------------------------*/
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
static
__inline__
void
track_carrier
(
v22bis_state_t
*
s
,
const
complexi16_t
*
z
,
const
complexi16_t
*
target
)
static
__inline__
void
track_carrier
(
v22bis_state_t
*
s
,
const
complexi16_t
*
z
,
const
complexi16_t
*
target
)
#else
#else
static
__inline__
void
track_carrier
(
v22bis_state_t
*
s
,
const
complexf_t
*
z
,
const
complexf_t
*
target
)
static
__inline__
void
track_carrier
(
v22bis_state_t
*
s
,
const
complexf_t
*
z
,
const
complexf_t
*
target
)
#endif
#endif
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t
error
;
int32_t
error
;
#else
#else
float
error
;
float
error
;
...
@@ -277,7 +277,7 @@ static __inline__ void track_carrier(v22bis_state_t *s, const complexf_t *z, con
...
@@ -277,7 +277,7 @@ static __inline__ void track_carrier(v22bis_state_t *s, const complexf_t *z, con
/* For small errors the imaginary part of the difference between the actual and the target
/* For small errors the imaginary part of the difference between the actual and the target
positions is proportional to the phase error, for any particular target. However, the
positions is proportional to the phase error, for any particular target. However, the
different amplitudes of the various target positions scale things. */
different amplitudes of the various target positions scale things. */
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
error
=
((
int32_t
)
z
->
im
*
target
->
re
-
(
int32_t
)
z
->
re
*
target
->
im
)
>>
FP_SHIFT_FACTOR
;
error
=
((
int32_t
)
z
->
im
*
target
->
re
-
(
int32_t
)
z
->
re
*
target
->
im
)
>>
FP_SHIFT_FACTOR
;
s
->
rx
.
carrier_phase_rate
+=
(
s
->
rx
.
carrier_track_i
*
error
);
s
->
rx
.
carrier_phase_rate
+=
(
s
->
rx
.
carrier_track_i
*
error
);
s
->
rx
.
carrier_phase
+=
(
s
->
rx
.
carrier_track_p
*
error
);
s
->
rx
.
carrier_phase
+=
(
s
->
rx
.
carrier_track_p
*
error
);
...
@@ -376,7 +376,7 @@ static int decode_baudx(v22bis_state_t *s, int nearest)
...
@@ -376,7 +376,7 @@ static int decode_baudx(v22bis_state_t *s, int nearest)
static
__inline__
void
symbol_sync
(
v22bis_state_t
*
s
)
static
__inline__
void
symbol_sync
(
v22bis_state_t
*
s
)
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t
p
;
int32_t
p
;
int32_t
q
;
int32_t
q
;
complexi16_t
a
;
complexi16_t
a
;
...
@@ -447,13 +447,13 @@ static __inline__ void symbol_sync(v22bis_state_t *s)
...
@@ -447,13 +447,13 @@ static __inline__ void symbol_sync(v22bis_state_t *s)
}
}
/*- End of function --------------------------------------------------------*/
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
static
__inline__
void
process_half_baud
(
v22bis_state_t
*
s
,
const
complexi16_t
*
sample
)
static
__inline__
void
process_half_baud
(
v22bis_state_t
*
s
,
const
complexi16_t
*
sample
)
#else
#else
static
__inline__
void
process_half_baud
(
v22bis_state_t
*
s
,
const
complexf_t
*
sample
)
static
__inline__
void
process_half_baud
(
v22bis_state_t
*
s
,
const
complexf_t
*
sample
)
#endif
#endif
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t
z
;
complexi16_t
z
;
complexi16_t
zz
;
complexi16_t
zz
;
const
complexi16_t
*
target
;
const
complexi16_t
*
target
;
...
@@ -490,7 +490,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
...
@@ -490,7 +490,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
/* Find the constellation point */
/* Find the constellation point */
if
(
s
->
rx
.
sixteen_way_decisions
)
if
(
s
->
rx
.
sixteen_way_decisions
)
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
re
=
(
z
.
re
+
FP_Q_6_10
(
3
.
0
f
))
>>
FP_SHIFT_FACTOR
;
re
=
(
z
.
re
+
FP_Q_6_10
(
3
.
0
f
))
>>
FP_SHIFT_FACTOR
;
im
=
(
z
.
im
+
FP_Q_6_10
(
3
.
0
f
))
>>
FP_SHIFT_FACTOR
;
im
=
(
z
.
im
+
FP_Q_6_10
(
3
.
0
f
))
>>
FP_SHIFT_FACTOR
;
#else
#else
...
@@ -688,7 +688,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
...
@@ -688,7 +688,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
s
->
tx
.
training
=
V22BIS_TX_TRAINING_STAGE_TIMED_S11
;
s
->
tx
.
training
=
V22BIS_TX_TRAINING_STAGE_TIMED_S11
;
/* Normal reception starts immediately */
/* Normal reception starts immediately */
s
->
rx
.
training
=
V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION
;
s
->
rx
.
training
=
V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION
;
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
s
->
rx
.
carrier_track_i
=
8
;
s
->
rx
.
carrier_track_i
=
8
;
#else
#else
s
->
rx
.
carrier_track_i
=
8000
.
0
f
;
s
->
rx
.
carrier_track_i
=
8000
.
0
f
;
...
@@ -716,7 +716,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
...
@@ -716,7 +716,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
s
->
rx
.
sixteen_way_decisions
=
TRUE
;
s
->
rx
.
sixteen_way_decisions
=
TRUE
;
s
->
rx
.
training
=
V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400
;
s
->
rx
.
training
=
V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400
;
s
->
rx
.
pattern_repeats
=
0
;
s
->
rx
.
pattern_repeats
=
0
;
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
s
->
rx
.
carrier_track_i
=
8
;
s
->
rx
.
carrier_track_i
=
8
;
#else
#else
s
->
rx
.
carrier_track_i
=
8000
.
0
f
;
s
->
rx
.
carrier_track_i
=
8000
.
0
f
;
...
@@ -782,7 +782,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
...
@@ -782,7 +782,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
{
{
int
i
;
int
i
;
int
step
;
int
step
;
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t
z
;
complexi16_t
z
;
complexi16_t
zz
;
complexi16_t
zz
;
complexi16_t
sample
;
complexi16_t
sample
;
...
@@ -856,7 +856,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
...
@@ -856,7 +856,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
if
(
s
->
rx
.
training
==
V22BIS_RX_TRAINING_STAGE_SYMBOL_ACQUISITION
)
if
(
s
->
rx
.
training
==
V22BIS_RX_TRAINING_STAGE_SYMBOL_ACQUISITION
)
{
{
/* Only AGC during the initial symbol acquisition, and then lock the gain. */
/* Only AGC during the initial symbol acquisition, and then lock the gain. */
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
s
->
rx
.
agc_scaling
=
saturate16
(((
int32_t
)
(
1024
.
0
f
*
1024
.
0
f
*
0
.
18
f
*
3
.
60
f
))
/
fixed_sqrt32
(
power
));
s
->
rx
.
agc_scaling
=
saturate16
(((
int32_t
)
(
1024
.
0
f
*
1024
.
0
f
*
0
.
18
f
*
3
.
60
f
))
/
fixed_sqrt32
(
power
));
#else
#else
s
->
rx
.
agc_scaling
=
0
.
18
f
*
3
.
60
f
/
sqrtf
(
power
);
s
->
rx
.
agc_scaling
=
0
.
18
f
*
3
.
60
f
/
sqrtf
(
power
);
...
@@ -872,7 +872,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
...
@@ -872,7 +872,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
s
->
rx
.
eq_put_step
+=
PULSESHAPER_COEFF_SETS
*
40
/
(
3
*
2
);
s
->
rx
.
eq_put_step
+=
PULSESHAPER_COEFF_SETS
*
40
/
(
3
*
2
);
if
(
s
->
calling_party
)
if
(
s
->
calling_party
)
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
ii
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_2400_re
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
ii
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_2400_re
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
qq
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_2400_im
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
qq
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_2400_im
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
#else
#else
...
@@ -882,7 +882,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
...
@@ -882,7 +882,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
}
}
else
else
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
ii
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_1200_re
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
ii
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_1200_re
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
qq
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_1200_im
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
qq
=
vec_circular_dot_prodi16
(
s
->
rx
.
rrc_filter
,
rx_pulseshaper_1200_im
[
step
],
V22BIS_RX_FILTER_STEPS
,
s
->
rx
.
rrc_filter_step
)
>>
15
;
#else
#else
...
@@ -893,7 +893,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
...
@@ -893,7 +893,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
/* Shift to baseband - since this is done in a full complex form, the
/* Shift to baseband - since this is done in a full complex form, the
result is clean, and requires no further filtering apart from the
result is clean, and requires no further filtering apart from the
equalizer. */
equalizer. */
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
sample
.
re
=
(
ii
*
s
->
rx
.
agc_scaling
)
>>
FP_SHIFT_FACTOR
;
sample
.
re
=
(
ii
*
s
->
rx
.
agc_scaling
)
>>
FP_SHIFT_FACTOR
;
sample
.
im
=
(
qq
*
s
->
rx
.
agc_scaling
)
>>
FP_SHIFT_FACTOR
;
sample
.
im
=
(
qq
*
s
->
rx
.
agc_scaling
)
>>
FP_SHIFT_FACTOR
;
z
=
dds_lookup_complexi16
(
s
->
rx
.
carrier_phase
);
z
=
dds_lookup_complexi16
(
s
->
rx
.
carrier_phase
);
...
@@ -929,7 +929,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len)
...
@@ -929,7 +929,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len)
return
0
;
return
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
for
(
i
=
0
;
i
<
len
;
i
++
)
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
dds_advance
(
&
s
->
rx
.
carrier_phase
,
s
->
rx
.
carrier_phase_rate
);
dds_advance
(
&
s
->
rx
.
carrier_phase
,
s
->
rx
.
carrier_phase_rate
);
#else
#else
dds_advancef
(
&
s
->
rx
.
carrier_phase
,
s
->
rx
.
carrier_phase_rate
);
dds_advancef
(
&
s
->
rx
.
carrier_phase
,
s
->
rx
.
carrier_phase_rate
);
...
@@ -942,7 +942,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len)
...
@@ -942,7 +942,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len)
int
v22bis_rx_restart
(
v22bis_state_t
*
s
)
int
v22bis_rx_restart
(
v22bis_state_t
*
s
)
{
{
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
vec_zeroi16
(
s
->
rx
.
rrc_filter
,
sizeof
(
s
->
rx
.
rrc_filter
)
/
sizeof
(
s
->
rx
.
rrc_filter
[
0
]));
vec_zeroi16
(
s
->
rx
.
rrc_filter
,
sizeof
(
s
->
rx
.
rrc_filter
)
/
sizeof
(
s
->
rx
.
rrc_filter
[
0
]));
s
->
rx
.
training_error
=
0
;
s
->
rx
.
training_error
=
0
;
#else
#else
...
@@ -978,7 +978,7 @@ int v22bis_rx_restart(v22bis_state_t *s)
...
@@ -978,7 +978,7 @@ int v22bis_rx_restart(v22bis_state_t *s)
s
->
rx
.
baud_phase
=
0
;
s
->
rx
.
baud_phase
=
0
;
s
->
rx
.
total_baud_timing_correction
=
0
;
s
->
rx
.
total_baud_timing_correction
=
0
;
/* We want the carrier to pull in faster on the answerer side, as it has very little time to adapt. */
/* We want the carrier to pull in faster on the answerer side, as it has very little time to adapt. */
#if defined(SPANDSP_USE_FIXED_POINT
x
)
#if defined(SPANDSP_USE_FIXED_POINT)
s
->
rx
.
carrier_track_i
=
(
s
->
calling_party
)
?
8
:
40
;
s
->
rx
.
carrier_track_i
=
(
s
->
calling_party
)
?
8
:
40
;
s
->
rx
.
carrier_track_p
=
8000
;
s
->
rx
.
carrier_track_p
=
8000
;
#else
#else
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论