This function only works on 8 bit images. To use it on your 10 bit images, you would need to convert them to 8 bit first.
You could probably generate a 16 bit user lookup table that does what you need. The brightness and contrast are easy, but the gamma would take a little more work.
Bruce
Bruce Ammons
Ammons Engineering