swscale: Introduce a helper to identify semi-planar formats