Fix fixed point builds of spandsp, and improve logging of modem performance during tests

This commit is contained in:
Steve Underwood committed 2012-08-05 22:20:39 +08:00
1 parent 72566f6a3f
commit 04e93f4c0b
11 files changed
+197 -207

No files matched your search

+6
View File
@@ -209,6 +209,12 @@ working only on the most optimal lines, and being widely usable across most phon
TCM absolutely transformed the phone line modem business.
*/
#if defined(SPANDSP_USE_FIXED_POINT)
#define V17_CONSTELLATION_SCALING_FACTOR 1024.0
#else
#define V17_CONSTELLATION_SCALING_FACTOR 1.0
#endif
/*!
V.17 modem receive side descriptor. This defines the working state for a
single instance of a V.17 modem receiver.
+6
View File
@@ -48,6 +48,12 @@ or 1200bps if one or both ends to not acknowledge that 2400bps is OK.
#if !defined(_SPANDSP_V22BIS_H_)
#define _SPANDSP_V22BIS_H_
#if defined(SPANDSP_USE_FIXED_POINT)
#define V22BIS_CONSTELLATION_SCALING_FACTOR 1024.0
#else
#define V22BIS_CONSTELLATION_SCALING_FACTOR 1.0
#endif
enum
{
V22BIS_GUARD_TONE_NONE,
+6
View File
@@ -44,6 +44,12 @@ at the start of transmission, which makes the design of a V.27ter receiver relat
straightforward.
*/
#if defined(SPANDSP_USE_FIXED_POINT)
#define V27TER_CONSTELLATION_SCALING_FACTOR 1024.0
#else
#define V27TER_CONSTELLATION_SCALING_FACTOR 1.0
#endif
/*!
V.27ter modem receive side descriptor. This defines the working state for a
single instance of a V.27ter modem receiver.
+6
View File
@@ -118,6 +118,12 @@ scrambler register) cannot be trusted for the test. The receive modem,
therefore, only tests that bits starting at bit 24 are really ones.
*/
#if defined(SPANDSP_USE_FIXED_POINT)
#define V29_CONSTELLATION_SCALING_FACTOR 4096.0
#else
#define V29_CONSTELLATION_SCALING_FACTOR 1.0
#endif
#if defined(SPANDSP_USE_FIXED_POINT)
typedef void (*qam_report_handler_t)(void *user_data, const complexi16_t *constel, const complexi16_t *target, int symbol);
#else
+2 -1
View File
@@ -202,10 +202,11 @@ SPAN_DECLARE(int) v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs)
{
#if defined(SPANDSP_USE_FIXED_POINT)
*coeffs = NULL;
return 0;
#else
*coeffs = s->eq_coeff;
#endif
return V17_EQUALIZER_LEN;
#endif
}
/*- End of function --------------------------------------------------------*/