📄 v34priv.h
字号:
#ifndef V34PRIV_H#define V34PRIV_H#define MAX_MAPPING_FRAME_SIZE 79#define M_MAX 18/* symbol rate */enum { V34_S2400, V34_S2743, V34_S2800, V34_S3000, V34_S3200, V34_S3429,};/* constellation parameters */#define L_MAX 1664 /* max number of points in the constellation */#define C_MIN -11#define C_MAX 11#define C_MAX_SIZE ((C_MAX-C_MIN+1)*(C_MAX-C_MIN+1))#define C_RADIUS (2*(C_MAX-C_MIN)+1) /* max coordinate of the constellation */#define SYNC_PATTERN 0x77FA /* (table 12) synchronisation pattern for J=8 */#define V34_SAMPLE_RATE_NUM 10#define V34_SAMPLE_RATE_DEN 3#define V34_SAMPLE_RATE ((2400*V34_SAMPLE_RATE_NUM)/V34_SAMPLE_RATE_DEN)/* size of the raised root cosine filter (for both rx & tx) */#define RC_FILTER_SIZE 40#define TX_BUF_SIZE (2048)#define RX_BUF1_SIZE 256#define RX_BUF2_SIZE 256/* size of the complex equalizer filter */#define EQ_FRAC 3#define EQ_SIZE (52*EQ_FRAC)#define AGC_WINDOW_SIZE 512 /* must be a power of two, in input samples */#define TRELLIS_MAX_STATES 64/* 5 times the constraint length */#define TRELLIS_LENGTH (6*5)/* 10 fractional bits for nyquist filters */#define NQ_BITS 10#define NQ_BASE (1 << NQ_BITS)/* state of the signal processing part of the V34 transmitter */typedef struct V34DSPState { /* V34 parameters */ int calling; /* true if we are the caller */ int S; /* index for symbol rate */ int expanded_shape; /* true if expanded shape used */ int R; /* transmit rate (in bits/s, including aux channel) */ int conv_nb_states; /* number of states of the convolutional coder */ int use_non_linear; int use_high_carrier; s16 h[3][2]; /* precoding coefficients (14 bits fractional part) */ void *opaque; get_bit_func get_bit; put_bit_func put_bit; /* do not modify after this */ int N; /* total number of bits in a data frame */ int W; /* number of aux bits in a data frame (0 = no aux channel) */ int J; /* number of data frame in a super frame */ int P; /* number of mapping frame in a data frame */ int b; /* max length of a mapping frame */ int r; /* counter to know the length of the mapping frame */ int K; /* mapping parameters */ int q; int L; /* current number of points of the constellation */ int M; /* current number of rings */ int Z_1; /* previous Z value (see
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -