swscale: improve dither checks