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_fir_sparse_init_q7.c 00009 * 00010 * Description: Q7 sparse FIR 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 00056 void arm_fir_sparse_init_q7( 00057 arm_fir_sparse_instance_q7 * S, 00058 uint16_t numTaps, 00059 q7_t * pCoeffs, 00060 q7_t * pState, 00061 int32_t * pTapDelay, 00062 uint16_t maxDelay, 00063 uint32_t blockSize) 00064 { 00065 /* Assign filter taps */ 00066 S->numTaps = numTaps; 00067 00068 /* Assign coefficient pointer */ 00069 S->pCoeffs = pCoeffs; 00070 00071 /* Assign TapDelay pointer */ 00072 S->pTapDelay = pTapDelay; 00073 00074 /* Assign MaxDelay */ 00075 S->maxDelay = maxDelay; 00076 00077 /* reset the stateIndex to 0 */ 00078 S->stateIndex = 0u; 00079 00080 /* Clear state buffer and size is always maxDelay + blockSize */ 00081 memset(pState, 0, (maxDelay + blockSize) * sizeof(q7_t)); 00082 00083 /* Assign state pointer */ 00084 S->pState = pState; 00085 00086 } 00087
1.7.2