(SoftFilters) Port of scale2x.c - buggy/broken