Thanks Sebastian. The patch you did provide works fine for me. I made a bug report to upstream: https://bitbucket.org/multicoreware/x265/issue/98/make-cli-work-with-any-bit-depth-version