Skip to content
Snippets Groups Projects
arm_math.h 243 KiB
Newer Older
  • Learn to ignore specific revisions
  •   {
        uint16_t fftLen;                 /**< length of the FFT. */
        uint8_t ifftFlag;                /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
        uint8_t bitReverseFlag;          /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
        q15_t *pTwiddle;                     /**< points to the Sin twiddle factor table. */
        uint16_t *pBitRevTable;          /**< points to the bit reversal table. */
        uint16_t twidCoefModifier;       /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
        uint16_t bitRevFactor;           /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
      } arm_cfft_radix2_instance_q15;
    
      /**
       * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
       */
    
      typedef struct
      {
        uint16_t fftLen;                 /**< length of the FFT. */
        uint8_t ifftFlag;                /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
        uint8_t bitReverseFlag;          /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
        q31_t *pTwiddle;                     /**< points to the Twiddle factor table. */
        uint16_t *pBitRevTable;          /**< points to the bit reversal table. */
        uint16_t twidCoefModifier;       /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
        uint16_t bitRevFactor;           /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
      } arm_cfft_radix2_instance_q31;
    
      /**
       * @brief Instance structure for the floating-point CFFT/CIFFT function.
       */
    
      typedef struct
      {
        uint16_t fftLen;                   /**< length of the FFT. */
        uint8_t ifftFlag;                  /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
        uint8_t bitReverseFlag;            /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
        float32_t *pTwiddle;               /**< points to the Twiddle factor table. */
        uint16_t *pBitRevTable;            /**< points to the bit reversal table. */
        uint16_t twidCoefModifier;         /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
        uint16_t bitRevFactor;             /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
        float32_t onebyfftLen;                 /**< value of 1/fftLen. */
      } arm_cfft_radix2_instance_f32;
    
    
      /**
       * @brief Processing function for the Q15 CFFT/CIFFT.
       * @param[in]      *S    points to an instance of the Q15 CFFT/CIFFT structure.
       * @param[in, out] *pSrc points to the complex data buffer. Processing occurs in-place.
       * @return none.
       */
    
      void arm_cfft_radix4_q15(
      const arm_cfft_radix4_instance_q15 * S,
      q15_t * pSrc);
    
      /**
       * @brief Processing function for the Q15 CFFT/CIFFT.
       * @param[in]      *S    points to an instance of the Q15 CFFT/CIFFT structure.
       * @param[in, out] *pSrc points to the complex data buffer. Processing occurs in-place.
       * @return none.
       */
    
      void arm_cfft_radix2_q15(
      const arm_cfft_radix2_instance_q15 * S,
      q15_t * pSrc);
    
      /**
       * @brief Initialization function for the Q15 CFFT/CIFFT.
       * @param[in,out] *S             points to an instance of the Q15 CFFT/CIFFT structure.
       * @param[in]     fftLen         length of the FFT.
       * @param[in]     ifftFlag       flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
       * @return        arm_status     function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLen</code> is not a supported value.
       */
    
      arm_status arm_cfft_radix4_init_q15(
      arm_cfft_radix4_instance_q15 * S,
      uint16_t fftLen,
      uint8_t ifftFlag,
      uint8_t bitReverseFlag);
    
      /**
       * @brief Initialization function for the Q15 CFFT/CIFFT.
       * @param[in,out] *S             points to an instance of the Q15 CFFT/CIFFT structure.
       * @param[in]     fftLen         length of the FFT.
       * @param[in]     ifftFlag       flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
       * @return        arm_status     function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLen</code> is not a supported value.
       */
    
      arm_status arm_cfft_radix2_init_q15(
      arm_cfft_radix2_instance_q15 * S,
      uint16_t fftLen,
      uint8_t ifftFlag,
      uint8_t bitReverseFlag);
    
      /**
       * @brief Processing function for the Q31 CFFT/CIFFT.
       * @param[in]      *S    points to an instance of the Q31 CFFT/CIFFT structure.
       * @param[in, out] *pSrc points to the complex data buffer. Processing occurs in-place.
       * @return none.
       */
    
      void arm_cfft_radix4_q31(
      const arm_cfft_radix4_instance_q31 * S,
      q31_t * pSrc);
    
      /**
       * @brief  Initialization function for the Q31 CFFT/CIFFT.
       * @param[in,out] *S             points to an instance of the Q31 CFFT/CIFFT structure.
       * @param[in]     fftLen         length of the FFT.
       * @param[in]     ifftFlag       flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
       * @return        arm_status     function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLen</code> is not a supported value.
       */
    
      arm_status arm_cfft_radix4_init_q31(
      arm_cfft_radix4_instance_q31 * S,
      uint16_t fftLen,
      uint8_t ifftFlag,
      uint8_t bitReverseFlag);
    
      /**
       * @brief Processing function for the Radix-2 Q31 CFFT/CIFFT.
       * @param[in]      *S    points to an instance of the Radix-2 Q31 CFFT/CIFFT structure.
       * @param[in, out] *pSrc points to the complex data buffer. Processing occurs in-place.
       * @return none.
       */
    
      void arm_cfft_radix2_q31(
      const arm_cfft_radix2_instance_q31 * S,
      q31_t * pSrc);
    
      /**
       * @brief  Initialization function for the Radix-2 Q31 CFFT/CIFFT.
       * @param[in,out] *S             points to an instance of the Radix-2 Q31 CFFT/CIFFT structure.
       * @param[in]     fftLen         length of the FFT.
       * @param[in]     ifftFlag       flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
       * @return        arm_status     function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLen</code> is not a supported value.
       */
    
      arm_status arm_cfft_radix2_init_q31(
      arm_cfft_radix2_instance_q31 * S,
      uint16_t fftLen,
      uint8_t ifftFlag,
      uint8_t bitReverseFlag);
    
    
    
      /**
       * @brief Processing function for the floating-point CFFT/CIFFT.
       * @param[in]      *S    points to an instance of the floating-point CFFT/CIFFT structure.
       * @param[in, out] *pSrc points to the complex data buffer. Processing occurs in-place.
       * @return none.
       */
    
      void arm_cfft_radix2_f32(
      const arm_cfft_radix2_instance_f32 * S,
      float32_t * pSrc);
    
      /**
       * @brief  Initialization function for the floating-point CFFT/CIFFT.
       * @param[in,out] *S             points to an instance of the floating-point CFFT/CIFFT structure.
       * @param[in]     fftLen         length of the FFT.
       * @param[in]     ifftFlag       flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
       * @return        The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLen</code> is not a supported value.
       */
    
      arm_status arm_cfft_radix2_init_f32(
      arm_cfft_radix2_instance_f32 * S,
      uint16_t fftLen,
      uint8_t ifftFlag,
      uint8_t bitReverseFlag);
    
      /**
       * @brief Processing function for the floating-point CFFT/CIFFT.
       * @param[in]      *S    points to an instance of the floating-point CFFT/CIFFT structure.
       * @param[in, out] *pSrc points to the complex data buffer. Processing occurs in-place.
       * @return none.
       */
    
      void arm_cfft_radix4_f32(
      const arm_cfft_radix4_instance_f32 * S,
      float32_t * pSrc);
    
      /**
       * @brief  Initialization function for the floating-point CFFT/CIFFT.
       * @param[in,out] *S             points to an instance of the floating-point CFFT/CIFFT structure.
       * @param[in]     fftLen         length of the FFT.
       * @param[in]     ifftFlag       flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
       * @return        The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLen</code> is not a supported value.
       */
    
      arm_status arm_cfft_radix4_init_f32(
      arm_cfft_radix4_instance_f32 * S,
      uint16_t fftLen,
      uint8_t ifftFlag,
      uint8_t bitReverseFlag);
    
    
    
      /*----------------------------------------------------------------------
    
       *    Internal functions prototypes FFT function
    
       ----------------------------------------------------------------------*/
    
      /**
       * @brief  Core function for the floating-point CFFT butterfly process.
       * @param[in, out] *pSrc            points to the in-place buffer of floating-point data type.
       * @param[in]      fftLen           length of the FFT.
       * @param[in]      *pCoef           points to the twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @return none.
       */
    
      void arm_radix4_butterfly_f32(
      float32_t * pSrc,
      uint16_t fftLen,
      float32_t * pCoef,
      uint16_t twidCoefModifier);
    
      /**
       * @brief  Core function for the floating-point CIFFT butterfly process.
       * @param[in, out] *pSrc            points to the in-place buffer of floating-point data type.
       * @param[in]      fftLen           length of the FFT.
       * @param[in]      *pCoef           points to twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @param[in]      onebyfftLen      value of 1/fftLen.
       * @return none.
       */
    
      void arm_radix4_butterfly_inverse_f32(
      float32_t * pSrc,
      uint16_t fftLen,
      float32_t * pCoef,
      uint16_t twidCoefModifier,
      float32_t onebyfftLen);
    
      /**
       * @brief  In-place bit reversal function.
       * @param[in, out] *pSrc        points to the in-place buffer of floating-point data type.
       * @param[in]      fftSize      length of the FFT.
       * @param[in]      bitRevFactor bit reversal modifier that supports different size FFTs with the same bit reversal table.
       * @param[in]      *pBitRevTab  points to the bit reversal table.
       * @return none.
       */
    
      void arm_bitreversal_f32(
      float32_t * pSrc,
      uint16_t fftSize,
      uint16_t bitRevFactor,
      uint16_t * pBitRevTab);
    
      /**
       * @brief  Core function for the Q31 CFFT butterfly process.
       * @param[in, out] *pSrc            points to the in-place buffer of Q31 data type.
       * @param[in]      fftLen           length of the FFT.
       * @param[in]      *pCoef           points to Twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @return none.
       */
    
      void arm_radix4_butterfly_q31(
      q31_t * pSrc,
      uint32_t fftLen,
      q31_t * pCoef,
      uint32_t twidCoefModifier);
    
      /**
       * @brief  Core function for the f32 FFT butterfly process.
       * @param[in, out] *pSrc            points to the in-place buffer of f32 data type.
       * @param[in]      fftLen           length of the FFT.
    
       * @param[in]      *pCoef           points to Twiddle coefficient buffer.
    
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @return none.
       */
    
      void arm_radix2_butterfly_f32(
      float32_t * pSrc,
      uint32_t fftLen,
      float32_t * pCoef,
      uint16_t twidCoefModifier);
    
            /**  
    
       * @brief  Core function for the Radix-2 Q31 CFFT butterfly process. 
       * @param[in, out] *pSrc            points to the in-place buffer of Q31 data type. 
       * @param[in]      fftLen           length of the FFT. 
       * @param[in]      *pCoef           points to Twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. 
       * @return none. 
       */
    
    
      void arm_radix2_butterfly_q31(
      q31_t * pSrc,
      uint32_t fftLen,
      q31_t * pCoef,
      uint16_t twidCoefModifier);
    
            /**  
    
       * @brief  Core function for the Radix-2 Q15 CFFT butterfly process. 
       * @param[in, out] *pSrc            points to the in-place buffer of Q15 data type. 
       * @param[in]      fftLen           length of the FFT. 
       * @param[in]      *pCoef           points to Twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. 
       * @return none. 
       */
    
    
      void arm_radix2_butterfly_q15(
      q15_t * pSrc,
      uint32_t fftLen,
      q15_t * pCoef,
      uint16_t twidCoefModifier);
    
            /**  
    
       * @brief  Core function for the Radix-2 Q15 CFFT Inverse butterfly process. 
       * @param[in, out] *pSrc            points to the in-place buffer of Q15 data type. 
       * @param[in]      fftLen           length of the FFT. 
       * @param[in]      *pCoef         points to Twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. 
       * @return none. 
       */
    
    
      void arm_radix2_butterfly_inverse_q15(
      q15_t * pSrc,
      uint32_t fftLen,
      q15_t * pCoef,
      uint16_t twidCoefModifier);
    
            /**  
    
       * @brief  Core function for the Radix-2 Q31 CFFT Inverse butterfly process. 
       * @param[in, out] *pSrc            points to the in-place buffer of Q31 data type. 
       * @param[in]      fftLen           length of the FFT. 
       * @param[in]      *pCoef           points to Twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. 
       * @return none. 
       */
    
    
      void arm_radix2_butterfly_inverse_q31(
      q31_t * pSrc,
      uint32_t fftLen,
      q31_t * pCoef,
      uint16_t twidCoefModifier);
    
      /**
       * @brief  Core function for the f32 IFFT butterfly process.
       * @param[in, out] *pSrc            points to the in-place buffer of f32 data type.
       * @param[in]      fftLen           length of the FFT.
    
       * @param[in]      *pCoef           points to Twiddle coefficient buffer.
    
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
    
       * @param[in]    onebyfftLen    1/fftLenfth
    
       * @return none.
       */
    
      void arm_radix2_butterfly_inverse_f32(
      float32_t * pSrc,
      uint32_t fftLen,
      float32_t * pCoef,
      uint16_t twidCoefModifier,
      float32_t onebyfftLen);
    
                                                                    /**
       * @brief  Core function for the Q31 CIFFT butterfly process.
       * @param[in, out] *pSrc            points to the in-place buffer of Q31 data type.
       * @param[in]      fftLen           length of the FFT.
       * @param[in]      *pCoef           points to twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @return none.
       */
    
      void arm_radix4_butterfly_inverse_q31(
      q31_t * pSrc,
      uint32_t fftLen,
      q31_t * pCoef,
      uint32_t twidCoefModifier);
    
      /**
       * @brief  In-place bit reversal function.
       * @param[in, out] *pSrc        points to the in-place buffer of Q31 data type.
       * @param[in]      fftLen       length of the FFT.
       * @param[in]      bitRevFactor bit reversal modifier that supports different size FFTs with the same bit reversal table
       * @param[in]      *pBitRevTab  points to bit reversal table.
       * @return none.
       */
    
      void arm_bitreversal_q31(
      q31_t * pSrc,
      uint32_t fftLen,
      uint16_t bitRevFactor,
      uint16_t * pBitRevTab);
    
      /**
       * @brief  Core function for the Q15 CFFT butterfly process.
       * @param[in, out] *pSrc16          points to the in-place buffer of Q15 data type.
       * @param[in]      fftLen           length of the FFT.
       * @param[in]      *pCoef16         points to twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @return none.
       */
    
      void arm_radix4_butterfly_q15(
      q15_t * pSrc16,
      uint32_t fftLen,
      q15_t * pCoef16,
      uint32_t twidCoefModifier);
    
    
      /**
       * @brief  Core function for the Q15 CIFFT butterfly process.
       * @param[in, out] *pSrc16          points to the in-place buffer of Q15 data type.
       * @param[in]      fftLen           length of the FFT.
       * @param[in]      *pCoef16         points to twiddle coefficient buffer.
       * @param[in]      twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table.
       * @return none.
       */
    
      void arm_radix4_butterfly_inverse_q15(
      q15_t * pSrc16,
      uint32_t fftLen,
      q15_t * pCoef16,
      uint32_t twidCoefModifier);
    
      /**
       * @brief  In-place bit reversal function.
       * @param[in, out] *pSrc        points to the in-place buffer of Q15 data type.
       * @param[in]      fftLen       length of the FFT.
       * @param[in]      bitRevFactor bit reversal modifier that supports different size FFTs with the same bit reversal table
       * @param[in]      *pBitRevTab  points to bit reversal table.
       * @return none.
       */
    
      void arm_bitreversal_q15(
      q15_t * pSrc,
      uint32_t fftLen,
      uint16_t bitRevFactor,
      uint16_t * pBitRevTab);
    
    
      /**
       * @brief Instance structure for the Q15 RFFT/RIFFT function.
       */
    
      typedef struct
      {
        uint32_t fftLenReal;                      /**< length of the real FFT. */
        uint32_t fftLenBy2;                       /**< length of the complex FFT. */
        uint8_t ifftFlagR;                        /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
        uint8_t bitReverseFlagR;                      /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
        uint32_t twidCoefRModifier;               /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
        q15_t *pTwiddleAReal;                     /**< points to the real twiddle factor table. */
        q15_t *pTwiddleBReal;                     /**< points to the imag twiddle factor table. */
        arm_cfft_radix4_instance_q15 *pCfft;          /**< points to the complex FFT instance. */
      } arm_rfft_instance_q15;
    
      /**
       * @brief Instance structure for the Q31 RFFT/RIFFT function.
       */
    
      typedef struct
      {
        uint32_t fftLenReal;                        /**< length of the real FFT. */
        uint32_t fftLenBy2;                         /**< length of the complex FFT. */
        uint8_t ifftFlagR;                          /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
        uint8_t bitReverseFlagR;                        /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
        uint32_t twidCoefRModifier;                 /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
        q31_t *pTwiddleAReal;                       /**< points to the real twiddle factor table. */
        q31_t *pTwiddleBReal;                       /**< points to the imag twiddle factor table. */
        arm_cfft_radix4_instance_q31 *pCfft;        /**< points to the complex FFT instance. */
      } arm_rfft_instance_q31;
    
      /**
       * @brief Instance structure for the floating-point RFFT/RIFFT function.
       */
    
      typedef struct
      {
        uint32_t fftLenReal;                        /**< length of the real FFT. */
        uint16_t fftLenBy2;                         /**< length of the complex FFT. */
        uint8_t ifftFlagR;                          /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
        uint8_t bitReverseFlagR;                    /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
        uint32_t twidCoefRModifier;                     /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
        float32_t *pTwiddleAReal;                   /**< points to the real twiddle factor table. */
        float32_t *pTwiddleBReal;                   /**< points to the imag twiddle factor table. */
        arm_cfft_radix4_instance_f32 *pCfft;        /**< points to the complex FFT instance. */
      } arm_rfft_instance_f32;
    
      /**
       * @brief Processing function for the Q15 RFFT/RIFFT.
       * @param[in]  *S    points to an instance of the Q15 RFFT/RIFFT structure.
       * @param[in]  *pSrc points to the input buffer.
       * @param[out] *pDst points to the output buffer.
       * @return none.
       */
    
      void arm_rfft_q15(
      const arm_rfft_instance_q15 * S,
      q15_t * pSrc,
      q15_t * pDst);
    
      /**
       * @brief  Initialization function for the Q15 RFFT/RIFFT.
       * @param[in, out] *S             points to an instance of the Q15 RFFT/RIFFT structure.
       * @param[in]      *S_CFFT        points to an instance of the Q15 CFFT/CIFFT structure.
       * @param[in]      fftLenReal     length of the FFT.
       * @param[in]      ifftFlagR      flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform.
       * @param[in]      bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
    
       * @return    The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported value.
    
       */
    
      arm_status arm_rfft_init_q15(
      arm_rfft_instance_q15 * S,
      arm_cfft_radix4_instance_q15 * S_CFFT,
      uint32_t fftLenReal,
      uint32_t ifftFlagR,
      uint32_t bitReverseFlag);
    
      /**
       * @brief Processing function for the Q31 RFFT/RIFFT.
       * @param[in]  *S    points to an instance of the Q31 RFFT/RIFFT structure.
       * @param[in]  *pSrc points to the input buffer.
       * @param[out] *pDst points to the output buffer.
       * @return none.
       */
    
      void arm_rfft_q31(
      const arm_rfft_instance_q31 * S,
      q31_t * pSrc,
      q31_t * pDst);
    
      /**
       * @brief  Initialization function for the Q31 RFFT/RIFFT.
       * @param[in, out] *S             points to an instance of the Q31 RFFT/RIFFT structure.
       * @param[in, out] *S_CFFT        points to an instance of the Q31 CFFT/CIFFT structure.
       * @param[in]      fftLenReal     length of the FFT.
       * @param[in]      ifftFlagR      flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform.
       * @param[in]      bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
    
       * @return    The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported value.
    
       */
    
      arm_status arm_rfft_init_q31(
      arm_rfft_instance_q31 * S,
      arm_cfft_radix4_instance_q31 * S_CFFT,
      uint32_t fftLenReal,
      uint32_t ifftFlagR,
      uint32_t bitReverseFlag);
    
      /**
       * @brief  Initialization function for the floating-point RFFT/RIFFT.
       * @param[in,out] *S             points to an instance of the floating-point RFFT/RIFFT structure.
       * @param[in,out] *S_CFFT        points to an instance of the floating-point CFFT/CIFFT structure.
       * @param[in]     fftLenReal     length of the FFT.
       * @param[in]     ifftFlagR      flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform.
       * @param[in]     bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
    
       * @return    The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported value.
    
       */
    
      arm_status arm_rfft_init_f32(
      arm_rfft_instance_f32 * S,
      arm_cfft_radix4_instance_f32 * S_CFFT,
      uint32_t fftLenReal,
      uint32_t ifftFlagR,
      uint32_t bitReverseFlag);
    
      /**
       * @brief Processing function for the floating-point RFFT/RIFFT.
       * @param[in]  *S    points to an instance of the floating-point RFFT/RIFFT structure.
       * @param[in]  *pSrc points to the input buffer.
       * @param[out] *pDst points to the output buffer.
       * @return none.
       */
    
      void arm_rfft_f32(
      const arm_rfft_instance_f32 * S,
      float32_t * pSrc,
      float32_t * pDst);
    
      /**
       * @brief Instance structure for the floating-point DCT4/IDCT4 function.
       */
    
      typedef struct
      {
        uint16_t N;                         /**< length of the DCT4. */
        uint16_t Nby2;                      /**< half of the length of the DCT4. */
        float32_t normalize;                /**< normalizing factor. */
        float32_t *pTwiddle;                /**< points to the twiddle factor table. */
        float32_t *pCosFactor;              /**< points to the cosFactor table. */
        arm_rfft_instance_f32 *pRfft;        /**< points to the real FFT instance. */
        arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
      } arm_dct4_instance_f32;
    
      /**
       * @brief  Initialization function for the floating-point DCT4/IDCT4.
       * @param[in,out] *S         points to an instance of floating-point DCT4/IDCT4 structure.
       * @param[in]     *S_RFFT    points to an instance of floating-point RFFT/RIFFT structure.
       * @param[in]     *S_CFFT    points to an instance of floating-point CFFT/CIFFT structure.
       * @param[in]     N          length of the DCT4.
       * @param[in]     Nby2       half of the length of the DCT4.
       * @param[in]     normalize  normalizing factor.
    
       * @return    arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported transform length.
    
       */
    
      arm_status arm_dct4_init_f32(
      arm_dct4_instance_f32 * S,
      arm_rfft_instance_f32 * S_RFFT,
      arm_cfft_radix4_instance_f32 * S_CFFT,
      uint16_t N,
      uint16_t Nby2,
      float32_t normalize);
    
      /**
       * @brief Processing function for the floating-point DCT4/IDCT4.
       * @param[in]       *S             points to an instance of the floating-point DCT4/IDCT4 structure.
       * @param[in]       *pState        points to state buffer.
       * @param[in,out]   *pInlineBuffer points to the in-place input and output buffer.
       * @return none.
       */
    
      void arm_dct4_f32(
      const arm_dct4_instance_f32 * S,
      float32_t * pState,
      float32_t * pInlineBuffer);
    
      /**
       * @brief Instance structure for the Q31 DCT4/IDCT4 function.
       */
    
      typedef struct
      {
        uint16_t N;                         /**< length of the DCT4. */
        uint16_t Nby2;                      /**< half of the length of the DCT4. */
        q31_t normalize;                    /**< normalizing factor. */
        q31_t *pTwiddle;                    /**< points to the twiddle factor table. */
        q31_t *pCosFactor;                  /**< points to the cosFactor table. */
        arm_rfft_instance_q31 *pRfft;        /**< points to the real FFT instance. */
        arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
      } arm_dct4_instance_q31;
    
      /**
       * @brief  Initialization function for the Q31 DCT4/IDCT4.
       * @param[in,out] *S         points to an instance of Q31 DCT4/IDCT4 structure.
       * @param[in]     *S_RFFT    points to an instance of Q31 RFFT/RIFFT structure
       * @param[in]     *S_CFFT    points to an instance of Q31 CFFT/CIFFT structure
       * @param[in]     N          length of the DCT4.
       * @param[in]     Nby2       half of the length of the DCT4.
       * @param[in]     normalize  normalizing factor.
    
       * @return    arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length.
    
       */
    
      arm_status arm_dct4_init_q31(
      arm_dct4_instance_q31 * S,
      arm_rfft_instance_q31 * S_RFFT,
      arm_cfft_radix4_instance_q31 * S_CFFT,
      uint16_t N,
      uint16_t Nby2,
      q31_t normalize);
    
      /**
       * @brief Processing function for the Q31 DCT4/IDCT4.
       * @param[in]       *S             points to an instance of the Q31 DCT4 structure.
       * @param[in]       *pState        points to state buffer.
       * @param[in,out]   *pInlineBuffer points to the in-place input and output buffer.
       * @return none.
       */
    
      void arm_dct4_q31(
      const arm_dct4_instance_q31 * S,
      q31_t * pState,
      q31_t * pInlineBuffer);
    
      /**
       * @brief Instance structure for the Q15 DCT4/IDCT4 function.
       */
    
      typedef struct
      {
        uint16_t N;                         /**< length of the DCT4. */
        uint16_t Nby2;                      /**< half of the length of the DCT4. */
        q15_t normalize;                    /**< normalizing factor. */
        q15_t *pTwiddle;                    /**< points to the twiddle factor table. */
        q15_t *pCosFactor;                  /**< points to the cosFactor table. */
        arm_rfft_instance_q15 *pRfft;        /**< points to the real FFT instance. */
        arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
      } arm_dct4_instance_q15;
    
      /**
       * @brief  Initialization function for the Q15 DCT4/IDCT4.
       * @param[in,out] *S         points to an instance of Q15 DCT4/IDCT4 structure.
       * @param[in]     *S_RFFT    points to an instance of Q15 RFFT/RIFFT structure.
       * @param[in]     *S_CFFT    points to an instance of Q15 CFFT/CIFFT structure.
       * @param[in]     N          length of the DCT4.
       * @param[in]     Nby2       half of the length of the DCT4.
       * @param[in]     normalize  normalizing factor.
    
       * @return    arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length.
    
    2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000
       */
    
      arm_status arm_dct4_init_q15(
      arm_dct4_instance_q15 * S,
      arm_rfft_instance_q15 * S_RFFT,
      arm_cfft_radix4_instance_q15 * S_CFFT,
      uint16_t N,
      uint16_t Nby2,
      q15_t normalize);
    
      /**
       * @brief Processing function for the Q15 DCT4/IDCT4.
       * @param[in]       *S             points to an instance of the Q15 DCT4 structure.
       * @param[in]       *pState        points to state buffer.
       * @param[in,out]   *pInlineBuffer points to the in-place input and output buffer.
       * @return none.
       */
    
      void arm_dct4_q15(
      const arm_dct4_instance_q15 * S,
      q15_t * pState,
      q15_t * pInlineBuffer);
    
      /**
       * @brief Floating-point vector addition.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_add_f32(
      float32_t * pSrcA,
      float32_t * pSrcB,
      float32_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q7 vector addition.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_add_q7(
      q7_t * pSrcA,
      q7_t * pSrcB,
      q7_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q15 vector addition.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_add_q15(
      q15_t * pSrcA,
      q15_t * pSrcB,
      q15_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q31 vector addition.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_add_q31(
      q31_t * pSrcA,
      q31_t * pSrcB,
      q31_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Floating-point vector subtraction.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_sub_f32(
      float32_t * pSrcA,
      float32_t * pSrcB,
      float32_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q7 vector subtraction.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_sub_q7(
      q7_t * pSrcA,
      q7_t * pSrcB,
      q7_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q15 vector subtraction.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_sub_q15(
      q15_t * pSrcA,
      q15_t * pSrcB,
      q15_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q31 vector subtraction.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_sub_q31(
      q31_t * pSrcA,
      q31_t * pSrcB,
      q31_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Multiplies a floating-point vector by a scalar.
       * @param[in]       *pSrc points to the input vector
       * @param[in]       scale scale factor to be applied
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in the vector
       * @return none.
       */
    
      void arm_scale_f32(
      float32_t * pSrc,
      float32_t scale,
      float32_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Multiplies a Q7 vector by a scalar.
       * @param[in]       *pSrc points to the input vector
       * @param[in]       scaleFract fractional portion of the scale value
       * @param[in]       shift number of bits to shift the result by
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in the vector
       * @return none.
       */
    
      void arm_scale_q7(
      q7_t * pSrc,
      q7_t scaleFract,
      int8_t shift,
      q7_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Multiplies a Q15 vector by a scalar.
       * @param[in]       *pSrc points to the input vector
       * @param[in]       scaleFract fractional portion of the scale value
       * @param[in]       shift number of bits to shift the result by
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in the vector
       * @return none.
       */
    
      void arm_scale_q15(
      q15_t * pSrc,
      q15_t scaleFract,
      int8_t shift,
      q15_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Multiplies a Q31 vector by a scalar.
       * @param[in]       *pSrc points to the input vector
       * @param[in]       scaleFract fractional portion of the scale value
       * @param[in]       shift number of bits to shift the result by
       * @param[out]      *pDst points to the output vector
       * @param[in]       blockSize number of samples in the vector
       * @return none.
       */
    
      void arm_scale_q31(
      q31_t * pSrc,
      q31_t scaleFract,
      int8_t shift,
      q31_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q7 vector absolute value.
       * @param[in]       *pSrc points to the input buffer
       * @param[out]      *pDst points to the output buffer
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_abs_q7(
      q7_t * pSrc,
      q7_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Floating-point vector absolute value.
       * @param[in]       *pSrc points to the input buffer
       * @param[out]      *pDst points to the output buffer
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_abs_f32(
      float32_t * pSrc,
      float32_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q15 vector absolute value.
       * @param[in]       *pSrc points to the input buffer
       * @param[out]      *pDst points to the output buffer
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_abs_q15(
      q15_t * pSrc,
      q15_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Q31 vector absolute value.
       * @param[in]       *pSrc points to the input buffer
       * @param[out]      *pDst points to the output buffer
       * @param[in]       blockSize number of samples in each vector
       * @return none.
       */
    
      void arm_abs_q31(
      q31_t * pSrc,
      q31_t * pDst,
      uint32_t blockSize);
    
      /**
       * @brief Dot product of floating-point vectors.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[in]       blockSize number of samples in each vector
       * @param[out]      *result output result returned here
       * @return none.
       */
    
      void arm_dot_prod_f32(
      float32_t * pSrcA,
      float32_t * pSrcB,
      uint32_t blockSize,
      float32_t * result);
    
      /**
       * @brief Dot product of Q7 vectors.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[in]       blockSize number of samples in each vector
       * @param[out]      *result output result returned here
       * @return none.
       */
    
      void arm_dot_prod_q7(
      q7_t * pSrcA,
      q7_t * pSrcB,
      uint32_t blockSize,
      q31_t * result);
    
      /**
       * @brief Dot product of Q15 vectors.
       * @param[in]       *pSrcA points to the first input vector
       * @param[in]       *pSrcB points to the second input vector
       * @param[in]       blockSize number of samples in each vector
       * @param[out]      *result output result returned here
       * @return none.
       */
    
      void arm_dot_prod_q15(
      q15_t * pSrcA,
      q15_t * pSrcB,
      uint32_t blockSize,
      q63_t * result);
    
      /**