|
|
|
@@ -8680,6 +8680,7 @@ void dft384(int16_t *x,int16_t *y,unsigned char scale_flag) // 96 x 4
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int16_t twa432[107*2*4];
|
|
|
|
|
static int16_t twb432[107*2*4];
|
|
|
|
|
static int16_t twc432[107*2*4];
|
|
|
|
@@ -9059,7 +9060,7 @@ static int16_t twc768[191*2*4];
|
|
|
|
|
|
|
|
|
|
void dft768(int16_t *x,int16_t *y,unsigned char scale_flag) { // 192x 4;
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
|
#if 0
|
|
|
|
|
int i,j;
|
|
|
|
|
simd_q15_t *x128=(simd_q15_t *)x;
|
|
|
|
|
simd_q15_t *y128=(simd_q15_t *)y;
|
|
|
|
@@ -9162,6 +9163,63 @@ void dft768(int16_t *x,int16_t *y,unsigned char scale_flag) { // 192x 4;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int16_t twa384i[95*2*4];
|
|
|
|
|
static int16_t twb384i[95*2*4];
|
|
|
|
|
// 128 x 3
|
|
|
|
|
void idft384(int16_t *input, int16_t *output, unsigned char scale)
|
|
|
|
|
{
|
|
|
|
|
int i,i2,j;
|
|
|
|
|
uint32_t tmp[3][128]__attribute__((aligned(32)));
|
|
|
|
|
uint32_t tmpo[3][128] __attribute__((aligned(32)));
|
|
|
|
|
simd_q15_t *y128p=(simd_q15_t*)output;
|
|
|
|
|
simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15);
|
|
|
|
|
|
|
|
|
|
for (i=0,j=0; i<128; i++) {
|
|
|
|
|
tmp[0][i] = ((uint32_t *)input)[j++];
|
|
|
|
|
tmp[1][i] = ((uint32_t *)input)[j++];
|
|
|
|
|
tmp[2][i] = ((uint32_t *)input)[j++];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
idft128((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
|
|
|
|
|
idft128((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
|
|
|
|
|
idft128((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
|
|
|
|
|
|
|
|
|
|
for (i=0,i2=0; i<256; i+=8,i2+=4) {
|
|
|
|
|
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
|
|
|
|
|
(simd_q15_t*)(output+i),(simd_q15_t*)(output+256+i),(simd_q15_t*)(output+512+i),
|
|
|
|
|
(simd_q15_t*)(twa384+i),(simd_q15_t*)(twb384+i));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (scale==1) {
|
|
|
|
|
for (i=0; i<6; i++) {
|
|
|
|
|
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
|
|
|
|
|
y128p+=16;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_mm_empty();
|
|
|
|
|
_m_empty();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 256 x 3
|
|
|
|
|
void idft768(int16_t *input, int16_t *output, unsigned char scale)
|
|
|
|
|
{
|
|
|
|
@@ -10669,6 +10727,7 @@ int dfts_autoinit(void)
|
|
|
|
|
init_rad3_rep(324,twa324,twb324);
|
|
|
|
|
init_rad3_rep(360,twa360,twb360);
|
|
|
|
|
init_rad4_rep(384,twa384,twb384,twc384);
|
|
|
|
|
init_rad3_rep(384,twa384i,twb384i);
|
|
|
|
|
init_rad4_rep(432,twa432,twb432,twc432);
|
|
|
|
|
init_rad4_rep(480,twa480,twb480,twc480);
|
|
|
|
|
init_rad3_rep(540,twa540,twb540);
|
|
|
|
@@ -10676,7 +10735,8 @@ int dfts_autoinit(void)
|
|
|
|
|
init_rad2_rep(600,twa600);
|
|
|
|
|
init_rad3_rep(648,twa648,twb648);
|
|
|
|
|
init_rad4_rep(720,twa720,twb720,twc720);
|
|
|
|
|
init_rad4_rep(768,twa768,twb768,twc768);
|
|
|
|
|
//init_rad4_rep(768,twa768,twb768,twc768);
|
|
|
|
|
init_rad3_rep(768,twa768,twb768);
|
|
|
|
|
init_rad3_rep(864,twa864,twb864);
|
|
|
|
|
init_rad3_rep(900,twa900,twb900);
|
|
|
|
|
init_rad4_rep(960,twa960,twb960,twc960);
|
|
|
|
|