C implementations of some filters