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.

DSP_fft16x16r.c文件里的d2s( )



如图,请问在DSP_fft16x16r.c文件里的这个d2s( )是起什么作用的,在哪里能找到?

  • /* D2S -- Truncate a 'double' to a 'short', with clamping. */

    /* ======================================================================== */

    static short d2s(double d)

    {

    if (d >= 32767.0) return 32767;

    if (d <= -32768.0) return -32768;

    return (short)d;

    }
    可以看一下gen_twiddle_fft16x16.c的源码