-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstArrays.h
35 lines (31 loc) · 9.83 KB
/
constArrays.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const float cosVec[256] = {1,-1,-0.5,6.1232e-17,0.30902,0.5,0.62349,0.70711,0.76604,0.80902,0.84125,0.86603,0.88546,0.90097,0.91355,0.92388,0.93247,0.93969,0.94582,0.95106,0.95557,0.95949,0.96292,0.96593,0.96858,0.97094,0.97304,0.97493,0.97662,0.97815,0.97953,0.98079,0.98193,0.98297,0.98393,0.98481,0.98562,0.98636,0.98705,0.98769,0.98828,0.98883,0.98934,0.98982,0.99027,0.99069,0.99108,0.99144,0.99179,0.99211,0.99242,0.99271,0.99298,0.99324,0.99348,0.99371,0.99393,0.99414,0.99433,0.99452,0.9947,0.99487,0.99503,0.99518,0.99533,0.99547,0.99561,0.99573,0.99586,0.99597,0.99609,0.99619,0.9963,0.9964,0.99649,0.99658,0.99667,0.99676,0.99684,0.99692,0.99699,0.99707,0.99714,0.9972,0.99727,0.99733,0.99739,0.99745,0.99751,0.99756,0.99762,0.99767,0.99772,0.99777,0.99781,0.99786,0.9979,0.99795,0.99799,0.99803,0.99807,0.9981,0.99814,0.99818,0.99821,0.99824,0.99828,0.99831,0.99834,0.99837,0.9984,0.99843,0.99845,0.99848,0.99851,0.99853,0.99856,0.99858,0.99861,0.99863,0.99865,0.99867,0.9987,0.99872,0.99874,0.99876,0.99878,0.9988,0.99881,0.99883,0.99885,0.99887,0.99888,0.9989,0.99892,0.99893,0.99895,0.99896,0.99898,0.99899,0.99901,0.99902,0.99903,0.99905,0.99906,0.99907,0.99909,0.9991,0.99911,0.99912,0.99913,0.99915,0.99916,0.99917,0.99918,0.99919,0.9992,0.99921,0.99922,0.99923,0.99924,0.99925,0.99926,0.99927,0.99928,0.99928,0.99929,0.9993,0.99931,0.99932,0.99933,0.99933,0.99934,0.99935,0.99936,0.99936,0.99937,0.99938,0.99938,0.99939,0.9994,0.9994,0.99941,0.99942,0.99942,0.99943,0.99944,0.99944,0.99945,0.99945,0.99946,0.99946,0.99947,0.99948,0.99948,0.99949,0.99949,0.9995,0.9995,0.99951,0.99951,0.99952,0.99952,0.99953,0.99953,0.99953,0.99954,0.99954,0.99955,0.99955,0.99956,0.99956,0.99956,0.99957,0.99957,0.99958,0.99958,0.99958,0.99959,0.99959,0.9996,0.9996,0.9996,0.99961,0.99961,0.99961,0.99962,0.99962,0.99962,0.99963,0.99963,0.99963,0.99964,0.99964,0.99964,0.99965,0.99965,0.99965,0.99965,0.99966,0.99966,0.99966,0.99967,0.99967,0.99967,0.99967,0.99968,0.99968,0.99968,0.99968,0.99969,0.99969,0.99969,0.99969,0.9997,0.9997};
const float sinVec[256] = {-2.4493e-16,1.2246e-16,0.86603,1,0.95106,0.86603,0.78183,0.70711,0.64279,0.58779,0.54064,0.5,0.46472,0.43388,0.40674,0.38268,0.36124,0.34202,0.3247,0.30902,0.29476,0.28173,0.2698,0.25882,0.24869,0.23932,0.23062,0.22252,0.21497,0.20791,0.2013,0.19509,0.18925,0.18375,0.17856,0.17365,0.169,0.16459,0.16041,0.15643,0.15265,0.14904,0.1456,0.14231,0.13917,0.13617,0.13329,0.13053,0.12788,0.12533,0.12289,0.12054,0.11827,0.11609,0.11399,0.11196,0.11001,0.10812,0.10629,0.10453,0.10282,0.10117,0.099568,0.098017,0.096514,0.095056,0.093641,0.092268,0.090935,0.089639,0.08838,0.087156,0.085965,0.084806,0.083678,0.082579,0.081509,0.080467,0.07945,0.078459,0.077492,0.076549,0.075629,0.07473,0.073853,0.072995,0.072158,0.071339,0.070539,0.069756,0.068991,0.068242,0.06751,0.066793,0.066091,0.065403,0.06473,0.06407,0.063424,0.062791,0.06217,0.061561,0.060964,0.060378,0.059804,0.059241,0.058688,0.058145,0.057612,0.057089,0.056575,0.05607,0.055575,0.055088,0.054609,0.054139,0.053677,0.053222,0.052775,0.052336,0.051904,0.051479,0.051061,0.050649,0.050244,0.049846,0.049454,0.049068,0.048688,0.048313,0.047945,0.047582,0.047224,0.046872,0.046525,0.046183,0.045847,0.045515,0.045187,0.044865,0.044547,0.044233,0.043924,0.043619,0.043319,0.043022,0.04273,0.042441,0.042157,0.041876,0.041598,0.041325,0.041055,0.040789,0.040526,0.040266,0.04001,0.039757,0.039507,0.03926,0.039016,0.038775,0.038538,0.038303,0.038071,0.037841,0.037615,0.037391,0.03717,0.036951,0.036736,0.036522,0.036311,0.036102,0.035896,0.035692,0.035491,0.035291,0.035094,0.034899,0.034707,0.034516,0.034328,0.034141,0.033957,0.033774,0.033594,0.033415,0.033238,0.033063,0.03289,0.032719,0.03255,0.032382,0.032216,0.032052,0.031889,0.031728,0.031569,0.031411,0.031255,0.0311,0.030947,0.030795,0.030645,0.030496,0.030349,0.030203,0.030059,0.029915,0.029774,0.029633,0.029494,0.029356,0.02922,0.029085,0.028951,0.028818,0.028686,0.028556,0.028427,0.028299,0.028172,0.028046,0.027922,0.027798,0.027676,0.027554,0.027434,0.027315,0.027197,0.027079,0.026963,0.026848,0.026734,0.026621,0.026508,0.026397,0.026286,0.026177,0.026068,0.025961,0.025854,0.025748,0.025643,0.025539,0.025435,0.025333,0.025231,0.02513,0.02503,0.024931,0.024832,0.024734,0.024637,0.024541};
const int mell[27] = {18,22,26,30,35,40,45,51,57,63,70,77,85,93,101,110,120,130,141,153,165,178,192,206,222,238,255};
const float dctMatrix[26][26] = {
{1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.},
{0.99818,0.98362,0.95472,0.9119,0.85578,0.78718,0.70711,0.61672,0.51734,0.41041,0.2975,0.18026,0.060378,-0.060378,-0.18026,-0.2975,-0.41041,-0.51734,-0.61672,-0.70711,-0.78718,-0.85578,-0.9119,-0.95472,-0.98362,-0.99818},
{0.99271,0.93502,0.82298,0.66312,0.46472,0.23932,-1.6081e-16,-0.23932,-0.46472,-0.66312,-0.82298,-0.93502,-0.99271,-0.99271,-0.93502,-0.82298,-0.66312,-0.46472,-0.23932,-1.837e-16,0.23932,0.46472,0.66312,0.82298,0.93502,0.99271},
{0.98362,0.85578,0.61672,0.2975,-0.060378,-0.41041,-0.70711,-0.9119,-0.99818,-0.95472,-0.78718,-0.51734,-0.18026,0.18026,0.51734,0.78718,0.95472,0.99818,0.9119,0.70711,0.41041,0.060378,-0.2975,-0.61672,-0.85578,-0.98362},
{0.97094,0.74851,0.3546,-0.12054,-0.56806,-0.88546,-1,-0.88546,-0.56806,-0.12054,0.3546,0.74851,0.97094,0.97094,0.74851,0.3546,-0.12054,-0.56806,-0.88546,-1,-0.88546,-0.56806,-0.12054,0.3546,0.74851,0.97094},
{0.95472,0.61672,0.060378,-0.51734,-0.9119,-0.98362,-0.70711,-0.18026,0.41041,0.85578,0.99818,0.78718,0.2975,-0.2975,-0.78718,-0.99818,-0.85578,-0.41041,0.18026,0.70711,0.98362,0.9119,0.51734,-0.060378,-0.61672,-0.95472},
{0.93502,0.46472,-0.23932,-0.82298,-0.99271,-0.66312,-1.837e-16,0.66312,0.99271,0.82298,0.23932,-0.46472,-0.93502,-0.93502,-0.46472,0.23932,0.82298,0.99271,0.66312,5.5109e-16,-0.66312,-0.99271,-0.82298,-0.23932,0.46472,0.93502},
{0.9119,0.2975,-0.51734,-0.98362,-0.78718,-0.060378,0.70711,0.99818,0.61672,-0.18026,-0.85578,-0.95472,-0.41041,0.41041,0.95472,0.85578,0.18026,-0.61672,-0.99818,-0.70711,0.060378,0.78718,0.98362,0.51734,-0.2975,-0.9119},
{0.88546,0.12054,-0.74851,-0.97094,-0.3546,0.56806,1,0.56806,-0.3546,-0.97094,-0.74851,0.12054,0.88546,0.88546,0.12054,-0.74851,-0.97094,-0.3546,0.56806,1,0.56806,-0.3546,-0.97094,-0.74851,0.12054,0.88546},
{0.85578,-0.060378,-0.9119,-0.78718,0.18026,0.95472,0.70711,-0.2975,-0.98362,-0.61672,0.41041,0.99818,0.51734,-0.51734,-0.99818,-0.41041,0.61672,0.98362,0.2975,-0.70711,-0.95472,-0.18026,0.78718,0.9119,0.060378,-0.85578},
{0.82298,-0.23932,-0.99271,-0.46472,0.66312,0.93502,-5.8202e-16,-0.93502,-0.66312,0.46472,0.99271,0.23932,-0.82298,-0.82298,0.23932,0.99271,0.46472,-0.66312,-0.93502,-2.6948e-15,0.93502,0.66312,-0.46472,-0.99271,-0.23932,0.82298},
{0.78718,-0.41041,-0.98362,-0.060378,0.95472,0.51734,-0.70711,-0.85578,0.2975,0.99818,0.18026,-0.9119,-0.61672,0.61672,0.9119,-0.18026,-0.99818,-0.2975,0.85578,0.70711,-0.51734,-0.95472,0.060378,0.98362,0.41041,-0.78718},
{0.74851,-0.56806,-0.88546,0.3546,0.97094,-0.12054,-1,-0.12054,0.97094,0.3546,-0.88546,-0.56806,0.74851,0.74851,-0.56806,-0.88546,0.3546,0.97094,-0.12054,-1,-0.12054,0.97094,0.3546,-0.88546,-0.56806,0.74851},
{0.70711,-0.70711,-0.70711,0.70711,0.70711,-0.70711,-0.70711,0.70711,0.70711,-0.70711,-0.70711,0.70711,0.70711,-0.70711,-0.70711,0.70711,0.70711,-0.70711,-0.70711,0.70711,0.70711,-0.70711,-0.70711,0.70711,0.70711,-0.70711},
{0.66312,-0.82298,-0.46472,0.93502,0.23932,-0.99271,1.3477e-15,0.99271,-0.23932,-0.93502,0.46472,0.82298,-0.66312,-0.66312,0.82298,0.46472,-0.93502,-0.23932,0.99271,6.6149e-15,-0.99271,0.23932,0.93502,-0.46472,-0.82298,0.66312},
{0.61672,-0.9119,-0.18026,0.99818,-0.2975,-0.85578,0.70711,0.51734,-0.95472,-0.060378,0.98362,-0.41041,-0.78718,0.78718,0.41041,-0.98362,0.060378,0.95472,-0.51734,-0.70711,0.85578,0.2975,-0.99818,0.18026,0.9119,-0.61672},
{0.56806,-0.97094,0.12054,0.88546,-0.74851,-0.3546,1,-0.3546,-0.74851,0.88546,0.12054,-0.97094,0.56806,0.56806,-0.97094,0.12054,0.88546,-0.74851,-0.3546,1,-0.3546,-0.74851,0.88546,0.12054,-0.97094,0.56806},
{0.51734,-0.99818,0.41041,0.61672,-0.98362,0.2975,0.70711,-0.95472,0.18026,0.78718,-0.9119,0.060378,0.85578,-0.85578,-0.060378,0.9119,-0.78718,-0.18026,0.95472,-0.70711,-0.2975,0.98362,-0.61672,-0.41041,0.99818,-0.51734},
{0.46472,-0.99271,0.66312,0.23932,-0.93502,0.82298,5.5109e-16,-0.82298,0.93502,-0.23932,-0.66312,0.99271,-0.46472,-0.46472,0.99271,-0.66312,-0.23932,0.93502,-0.82298,-3.4296e-15,0.82298,-0.93502,0.23932,0.66312,-0.99271,0.46472},
{0.41041,-0.95472,0.85578,-0.18026,-0.61672,0.99818,-0.70711,-0.060378,0.78718,-0.98362,0.51734,0.2975,-0.9119,0.9119,-0.2975,-0.51734,0.98362,-0.78718,0.060378,0.70711,-0.99818,0.61672,0.18026,-0.85578,0.95472,-0.41041},
{0.3546,-0.88546,0.97094,-0.56806,-0.12054,0.74851,-1,0.74851,-0.12054,-0.56806,0.97094,-0.88546,0.3546,0.3546,-0.88546,0.97094,-0.56806,-0.12054,0.74851,-1,0.74851,-0.12054,-0.56806,0.97094,-0.88546,0.3546},
{0.2975,-0.78718,0.99818,-0.85578,0.41041,0.18026,-0.70711,0.98362,-0.9119,0.51734,0.060378,-0.61672,0.95472,-0.95472,0.61672,-0.060378,-0.51734,0.9119,-0.98362,0.70711,-0.18026,-0.41041,0.85578,-0.99818,0.78718,-0.2975},
{0.23932,-0.66312,0.93502,-0.99271,0.82298,-0.46472,1.1028e-15,0.46472,-0.82298,0.99271,-0.93502,0.66312,-0.23932,-0.23932,0.66312,-0.93502,0.99271,-0.82298,0.46472,7.3497e-15,-0.46472,0.82298,-0.99271,0.93502,-0.66312,0.23932},
{0.18026,-0.51734,0.78718,-0.95472,0.99818,-0.9119,0.70711,-0.41041,0.060378,0.2975,-0.61672,0.85578,-0.98362,0.98362,-0.85578,0.61672,-0.2975,-0.060378,0.41041,-0.70711,0.9119,-0.99818,0.95472,-0.78718,0.51734,-0.18026},
{0.12054,-0.3546,0.56806,-0.74851,0.88546,-0.97094,1,-0.97094,0.88546,-0.74851,0.56806,-0.3546,0.12054,0.12054,-0.3546,0.56806,-0.74851,0.88546,-0.97094,1,-0.97094,0.88546,-0.74851,0.56806,-0.3546,0.12054},
{0.060378,-0.18026,0.2975,-0.41041,0.51734,-0.61672,0.70711,-0.78718,0.85578,-0.9119,0.95472,-0.98362,0.99818,-0.99818,0.98362,-0.95472,0.9119,-0.85578,0.78718,-0.70711,0.61672,-0.51734,0.41041,-0.2975,0.18026,-0.060378}
};