This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6748计算复数模值速度太慢



大家好:

我项目中需要对一段音频信号进行去噪处理,去噪原理是开机后先采集一段声音信号进行FFT,去出信号模值后,每次输入的信号经过FFT后与该信号相减,最后在变换回去,这个过程中,FFT以及一些乘法已经优化到最好,但是开平方以及分数次的幂效果很差,代码如下,我想问一下我这段代码还有没有别的优化方法。

        for (i = j = 0; i <= lpow2; i += 2, ++j)
        {
            ar = frame[i];
            ai = frame[i+1];
            power   = sqrtdp(ar * ar + ai * ai + 1.0e-30);
            ar   /= power;
            ai   /= power;

            //当前的信号幅度减去噪声信号幅度
            kk = powdp(power, 0.4) - 0.9 * powdp(noise[j], 0.4);
            if (kk < 0) kk = 0;
            kk = powdp(kk, (1/0.4));

            frame[i]   = ar * kk * DEFAULT_AGCKK;
            frame[i+1] = ai * kk * DEFAULT_AGCKK;
        }

备注:sqrtdp需要使用300个机器周期,powdp需要使用700个机器周期