File: /usr/src/linux/drivers/net/hamradio/soundmodem/sm_tbl_afsk2666.h

1     /*
2      * THIS FILE IS GENERATED AUTOMATICALLY BY ./gentbl, DO NOT EDIT!
3      */
4     
5     
6     /*
7      * small cosine table in U8 format
8      */
9     #define OFFSCOSTABBITS 6
10     #define OFFSCOSTABSIZE (1<<OFFSCOSTABBITS)
11     
12     static unsigned char offscostab[OFFSCOSTABSIZE] = {
13     	 255, 254, 252, 249, 245, 240, 233, 226,
14     	 217, 208, 198, 187, 176, 164, 152, 140,
15     	 128, 115, 103,  91,  79,  68,  57,  47,
16     	  38,  29,  22,  15,  10,   6,   3,   1,
17     	   1,   1,   3,   6,  10,  15,  22,  29,
18     	  38,  47,  57,  68,  79,  91, 103, 115,
19     	 127, 140, 152, 164, 176, 187, 198, 208,
20     	 217, 226, 233, 240, 245, 249, 252, 254
21     };
22     
23     #define OFFSCOS(x) offscostab[((x)>>10)&0x3f]
24     
25     
26     /*
27      * more accurate cosine table
28      */
29     
30     static const short costab[64] = {
31     	 32767,  32609,  32137,  31356,  30272,  28897,  27244,  25329, 
32     	 23169,  20787,  18204,  15446,  12539,   9511,   6392,   3211, 
33     	     0,  -3211,  -6392,  -9511, -12539, -15446, -18204, -20787, 
34     	-23169, -25329, -27244, -28897, -30272, -31356, -32137, -32609, 
35     	-32767, -32609, -32137, -31356, -30272, -28897, -27244, -25329, 
36     	-23169, -20787, -18204, -15446, -12539,  -9511,  -6392,  -3211, 
37     	     0,   3211,   6392,   9511,  12539,  15446,  18204,  20787, 
38     	 23169,  25329,  27244,  28897,  30272,  31356,  32137,  32609
39     };
40     
41     #define COS(x) costab[((x)>>10)&0x3f]
42     #define SIN(x) COS((x)+0xc000)
43     
44     
45     /*
46      * afsk2666 specific tables
47      */
48     #define AFSK26_DEMCORRLEN 12
49     #define AFSK26_SAMPLERATE 16000
50     
51     static const unsigned int afsk26_carfreq[2] = { 0x2000, 0x3555 };
52     
53     
54     static const struct {
55     	int i[12];
56     	int q[12];
57     } afsk26_dem_tables[2][2] = {
58     	{
59     		{{      1,      7,    -18,    -73,   -100,    -47,     47,    100,     73,     18,     -7,     -1 }, {      0,     17,     43,     30,    -41,   -115,   -115,    -41,     30,     43,     17,      0 }},
60     #define AFSK26_DEM_SUM_I_0_0 0
61     #define AFSK26_DEM_SUM_Q_0_0 -132
62     		{{      1,     -7,    -46,    -10,    100,     76,    -75,   -100,     10,     46,      7,     -1 }, {      1,     17,     -6,    -79,    -41,     99,     99,    -41,    -79,     -6,     17,      1 }}
63     #define AFSK26_DEM_SUM_I_0_1 1
64     #define AFSK26_DEM_SUM_Q_0_1 -18
65     	},
66     	{
67     		{{      8,     22,      0,    -67,   -118,    -89,      0,     67,     63,     22,      0,      0 }, {      0,     22,     63,     67,      0,    -89,   -118,    -67,      0,     22,      8,      0 }},
68     #define AFSK26_DEM_SUM_I_1_0 -92
69     #define AFSK26_DEM_SUM_Q_1_0 -92
70     		{{      8,      8,    -54,    -67,     59,    122,      0,    -91,    -31,     22,      7,      0 }, {      0,     30,     31,    -67,   -102,     32,    118,     24,    -54,    -22,      4,      0 }}
71     #define AFSK26_DEM_SUM_I_1_1 -17
72     #define AFSK26_DEM_SUM_Q_1_1 -6
73     	}
74     };
75     
76