lavfi/lut3d: add sanity checks.

Should fix CID1026775 and CID1026774.