Skip to content

Commit fde11a6

Browse files
Adds arm_fir_decimate_f64
2 parents d08d9c4 + b33b3cd commit fde11a6

File tree

3 files changed

+606
-2
lines changed

3 files changed

+606
-2
lines changed

Include/dsp/filtering_functions.h

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ extern "C"
820820
} arm_fir_decimate_instance_q31;
821821

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

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

834-
/**
844+
/**
845+
@brief Processing function for floating-point FIR decimator.
846+
@param[in] S points to an instance of the floating-point FIR decimator structure
847+
@param[in] pSrc points to the block of input data
848+
@param[out] pDst points to the block of output data
849+
@param[in] blockSize number of samples to process
850+
*/
851+
void arm_fir_decimate_f64(
852+
const arm_fir_decimate_instance_f64 * S,
853+
const float64_t * pSrc,
854+
float64_t * pDst,
855+
uint32_t blockSize);
856+
857+
858+
/**
859+
@brief Initialization function for the floating-point FIR decimator.
860+
@param[in,out] S points to an instance of the floating-point FIR decimator structure
861+
@param[in] numTaps number of coefficients in the filter
862+
@param[in] M decimation factor
863+
@param[in] pCoeffs points to the filter coefficients
864+
@param[in] pState points to the state buffer
865+
@param[in] blockSize number of input samples to process per call
866+
@return execution status
867+
- \ref ARM_MATH_SUCCESS : Operation successful
868+
- \ref ARM_MATH_LENGTH_ERROR : <code>blockSize</code> is not a multiple of <code>M</code>
869+
*/
870+
arm_status arm_fir_decimate_init_f64(
871+
arm_fir_decimate_instance_f64 * S,
872+
uint16_t numTaps,
873+
uint8_t M,
874+
const float64_t * pCoeffs,
875+
float64_t * pState,
876+
uint32_t blockSize);
877+
878+
879+
/**
835880
@brief Processing function for floating-point FIR decimator.
836881
@param[in] S points to an instance of the floating-point FIR decimator structure
837882
@param[in] pSrc points to the block of input data

0 commit comments

Comments
 (0)