CPU filters fixes
formatting
Alloc buffers before filtering and free them after loops completion
Makefile fixes
Gpu implementation of filters