Factor out the filter logic from the filter cofficients.