FIR Filter implementation vs Linear convolution implementation
I believe that the code is written in such a way that it gives a correct output only when the coefficients are passed in the reverse fashion. Comparatively, the code will be simpler if we pass the coefficients in reverse fashion.