Fix YUV horizontal and vertical sampling checks

The should fix crashes while decoding skps.

BUG=skia:4991
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1766523002

Review URL: https://codereview.chromium.org/1766523002
1 file changed