C language implementation of FIR filter