00001 /* ---------------------------------------------------------------------- 00002 * Copyright (C) 2011 ARM Limited. All rights reserved. 00003 * 00004 * $Date: 15. December 2011 00005 * $Revision: V2.0.0 00006 * 00007 * Project: Cortex-R DSP Library 00008 * Title: arm_biquad_cascade_df1_32x64_init_q31.c 00009 * 00010 * Description: High precision Q31 Biquad cascade filter initialization function. 00011 * 00012 * Target Processor: Cortex-R4/R5 00013 * 00014 * Version 1.0.0 2011/03/08 00015 * Alpha release. 00016 * 00017 * Version 1.0.1 2011/09/30 00018 * Beta release. 00019 * 00020 * Version 2.0.0 2011/12/15 00021 * Final release. 00022 * 00023 * -------------------------------------------------------------------- */ 00024 #include "arm_math.h" 00025 00068 void arm_biquad_cas_df1_32x64_init_q31( 00069 arm_biquad_cas_df1_32x64_ins_q31 * S, 00070 uint8_t numStages, 00071 q31_t * pCoeffs, 00072 q63_t * pState, 00073 uint8_t postShift) 00074 { 00075 /* Assign filter stages */ 00076 S->numStages = numStages; 00077 00078 /* Assign postShift to be applied to the output */ 00079 S->postShift = postShift; 00080 00081 /* Assign coefficient pointer */ 00082 S->pCoeffs = pCoeffs; 00083 00084 /* Clear state buffer and size is always 4 * numStages */ 00085 memset(pState, 0, (4u * (uint32_t) numStages) * sizeof(q63_t)); 00086 00087 /* Assign state pointer */ 00088 S->pState = pState; 00089 } 00090