Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create arm_fir_decimate_f64 based on arm_fir_decimate_f32 #157

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading