2d convolution with periodization before subsampling