If you have an appropriately configured modern version of FFmpeg and x265, (the repository FFmpeg under Zesty Zapus 17.04 falls into this category), you should find encoding with 8, 10 and 12bit fairly straightforward.
I illustrate a sample command line for each below:
1. 8bit HEVC encoding with FFmpeg...
Check the capability of your installed version of x265 for 8bit encoding as follows:
andrew@illium~$ x265 -V
x265 [info]: HEVC encoder version 2.4