Skip to content

Commit

Permalink
Adds arm_fir_decimate_f64
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe0606 committed Mar 6, 2024
2 parents d08d9c4 + b33b3cd commit fde11a6
Show file tree
Hide file tree
Showing 3 changed files with 606 additions and 2 deletions.
49 changes: 47 additions & 2 deletions Include/dsp/filtering_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ extern "C"
} arm_fir_decimate_instance_q31;

/**
@brief Instance structure for floating-point FIR decimator.
@brief Instance structure for single precision floating-point FIR decimator.
*/
typedef struct
{
Expand All @@ -830,8 +830,53 @@ typedef struct
float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
} arm_fir_decimate_instance_f32;

/**
@brief Instance structure for double precision floating-point FIR decimator.
*/
typedef struct
{
uint8_t M; /**< decimation factor. */
uint16_t numTaps; /**< number of coefficients in the filter. */
const float64_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
float64_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
} arm_fir_decimate_instance_f64;

/**
/**
@brief Processing function for floating-point FIR decimator.
@param[in] S points to an instance of the floating-point FIR decimator structure
@param[in] pSrc points to the block of input data
@param[out] pDst points to the block of output data
@param[in] blockSize number of samples to process
*/
void arm_fir_decimate_f64(
const arm_fir_decimate_instance_f64 * S,
const float64_t * pSrc,
float64_t * pDst,
uint32_t blockSize);


/**
@brief Initialization function for the floating-point FIR decimator.
@param[in,out] S points to an instance of the floating-point FIR decimator structure
@param[in] numTaps number of coefficients in the filter
@param[in] M decimation factor
@param[in] pCoeffs points to the filter coefficients
@param[in] pState points to the state buffer
@param[in] blockSize number of input samples to process per call
@return execution status
- \ref ARM_MATH_SUCCESS : Operation successful
- \ref ARM_MATH_LENGTH_ERROR : <code>blockSize</code> is not a multiple of <code>M</code>
*/
arm_status arm_fir_decimate_init_f64(
arm_fir_decimate_instance_f64 * S,
uint16_t numTaps,
uint8_t M,
const float64_t * pCoeffs,
float64_t * pState,
uint32_t blockSize);


/**
@brief Processing function for floating-point FIR decimator.
@param[in] S points to an instance of the floating-point FIR decimator structure
@param[in] pSrc points to the block of input data
Expand Down
Loading

0 comments on commit fde11a6

Please sign in to comment.