Adding demosaic, make filter parameterizable

tested OK.