More thrashing. This change makes the buffer sizes dependent on the filter kernel size.