smoothing and downsample with shared memory