libx264 API usage example
Safety check against malicious high bit-depth input which could cause crash