FIR filter implementation in C