
#include "ssc_mode.h"
#include "ssc_pulsealloc.h"


#ifndef KHW_23BIT_WINDOW
static const short window108[108] = {
	3,24,68,133,220,329,459,610,783,976,1191,1426,1682,1958,
	2254,2569,2904,3258,3630,4020,4428,4853,5295,5753,6226,
	6714,7216,7731,8259,8799,9350,9911,10482,11061,11648,12241,
	12840,13443,14051,14661,15272,15884,16496,17106,17713,
	18317,18917,19511,20098,20678,21249,21811,22363,22904,
	23434,23951,24454,24944,25420,25881,26326,26756,27170,
	27568,27949,28313,28661,28991,29305,29603,29883,30148,
	30396,30628,30845,31046,31233,31406,31565,31710,31843,
	31964,32073,32171,32259,32337,32407,32467,32520,32566,
	32606,32639,32667,32690,32709,32725,32737,32746,32753,
	32759,32762,32765,32766,32767,32767,32767,32767,32767,
};
#else
static const int window108[108] = {
	348, 3135, 8707, 17058, 28182, 42069, 58707, 78081, 100174,
	124965, 152432, 182548, 215284, 250607, 288481, 328866, 371720, 416995,
	464640, 514600, 566815, 621221, 677751, 736331, 796885, 859332, 923585,
	989555, 1057145, 1126258, 1196789, 1268631, 1341674, 1415803, 1490899, 1566841,
	1643505, 1720765, 1798491, 1876555, 1954823, 2033165, 2111446, 2189535, 2267300,
	2344609, 2421333, 2497346, 2572522, 2646741, 2719885, 2791839, 2862496, 2931750,
	2999504, 3065666, 3130147, 3192869, 3253759, 3312750, 3369785, 3424811, 3477786,
	3528674, 3577446, 3624084, 3668573, 3710910, 3751097, 3789144, 3825069, 3858896,
	3890655, 3920383, 3948125, 3973927, 3997844, 4019936, 4040264, 4058895, 4075901,
	4091354, 4105330, 4117907, 4129165, 4139184, 4148044, 4155828, 4162616, 4168488,
	4173524, 4177800, 4181391, 4184372, 4186811, 4188775, 4190330, 4191533, 4192442,
	4193108, 4193577, 4193893, 4194093, 4194209, 4194269, 4194295, 4194303, 4194303,
};
#endif


static const short logN400[22] = {
	0,0,0,0,0,0,0,0,8,8,8,8,16,16,16,21,21,24,29,29,29,34,
};



static const short fft_bitrev432[144] = 
{
	0,216,432,648,54,270,486,702,108,324,540,756,162,378,594,810,18,234,450,666,72,288,504,720,126,342,558,774,180,396,612,828,36,252,468,684,
	90,306,522,738,144,360,576,792,198,414,630,846,6,222,438,654,60,276,492,708,114,330,546,762,168,384,600,816,24,240,456,672,78,294,510,726,
	132,348,564,780,186,402,618,834,42,258,474,690,96,312,528,744,150,366,582,798,204,420,636,852,12,228,444,660,66,282,498,714,120,336,552,768,
	174,390,606,822,30,246,462,678,84,300,516,732,138,354,570,786,192,408,624,840,48,264,480,696,102,318,534,750,156,372,588,804,210,426,642,858,
};

static const short fft_bitrev54[18] = 
{
	0,54,18,72,36,90,6,60,24,78,42,96,12,66,30,84,48,102,
};




static const kiss_fft_state fft_state44100_864_0 = {
	144,
	0,
	fft_bitrev432,  /* bitrev */
};


static const kiss_fft_state fft_state44100_864_3 = {
	18,
	3,      /* shift */
	fft_bitrev54,   /* bitrev */ 
};





static const AUDIOMode mode44100_864_108 = {
	44100,  /* Fs */
	108,    /* overlap */
	22,     /* nbEBands */
	eband5ms,       /* eBands */
	8,      /* nbShortMdcts */
	108,    /* shortMdctSize */
	11,     /* nbAllocVectors */
	band_allocation,        /* allocVectors */
#ifdef KHW_229kbps_SUPPORT
	band_allocation_high,
#endif
	logN400,        /* logN */
	window108,      /* window */
    {&fft_state44100_864_0, &fft_state44100_864_3,}
};


/* List of all the available modes */

#define TOTAL_MODES 1


static const AUDIOMode * const static_mode_list[TOTAL_MODES] = {
&mode44100_864_108,
};
