CMSIS DSP library
Dependents: performance_timer Surfboard_ gps2rtty Capstone ... more
Legacy Warning
This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.
Diff: cmsis_dsp/FilteringFunctions/arm_fir_fast_q31.c
- Revision:
- 5:3762170b6d4d
- Parent:
- 3:7a284390b0ce
--- a/cmsis_dsp/FilteringFunctions/arm_fir_fast_q31.c Mon Jun 23 09:30:09 2014 +0100 +++ b/cmsis_dsp/FilteringFunctions/arm_fir_fast_q31.c Fri Nov 20 08:45:18 2015 +0000 @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------- -* Copyright (C) 2010-2013 ARM Limited. All rights reserved. +* Copyright (C) 2010-2014 ARM Limited. All rights reserved. * -* $Date: 17. January 2013 -* $Revision: V1.4.1 +* $Date: 19. March 2015 +* $Revision: V.1.4.5 * * Project: CMSIS DSP Library * Title: arm_fir_fast_q31.c @@ -138,10 +138,10 @@ while(i > 0u) { /* Read the b[numTaps] coefficient */ - c0 = *(pb++); + c0 = *pb; /* Read x[n-numTaps-3] sample */ - x3 = *(px++); + x3 = *px; /* acc0 += b[numTaps] * x[n-numTaps] */ multAcc_32x32_keep32_R(acc0, x0, c0); @@ -156,10 +156,10 @@ multAcc_32x32_keep32_R(acc3, x3, c0); /* Read the b[numTaps-1] coefficient */ - c0 = *(pb++); + c0 = *(pb + 1u); /* Read x[n-numTaps-4] sample */ - x0 = *(px++); + x0 = *(px + 1u); /* Perform the multiply-accumulates */ multAcc_32x32_keep32_R(acc0, x1, c0); @@ -168,10 +168,10 @@ multAcc_32x32_keep32_R(acc3, x0, c0); /* Read the b[numTaps-2] coefficient */ - c0 = *(pb++); + c0 = *(pb + 2u); /* Read x[n-numTaps-5] sample */ - x1 = *(px++); + x1 = *(px + 2u); /* Perform the multiply-accumulates */ multAcc_32x32_keep32_R(acc0, x2, c0); @@ -180,16 +180,22 @@ multAcc_32x32_keep32_R(acc3, x1, c0); /* Read the b[numTaps-3] coefficients */ - c0 = *(pb++); + c0 = *(pb + 3u); /* Read x[n-numTaps-6] sample */ - x2 = *(px++); + x2 = *(px + 3u); /* Perform the multiply-accumulates */ multAcc_32x32_keep32_R(acc0, x3, c0); multAcc_32x32_keep32_R(acc1, x0, c0); multAcc_32x32_keep32_R(acc2, x1, c0); multAcc_32x32_keep32_R(acc3, x2, c0); + + /* update coefficient pointer */ + pb += 4u; + px += 4u; + + /* Decrement the loop counter */ i--; }