Added condition to use optimized kernels for images of size that multiple of 4 only