Support for non-square images and kernels