How to read 10-bit RGB values from HDR video?

I had a HDR video and the format is ProRes. The colour bit depth of ProRes is 10-bit. I would like to extract the 10-bit RGB values from the HDR video.

As per this link, I have first converted the 10-bit HDR video to a number of 16-bit TIFF images. However, when I use some program like python to read back the RGB values from the TIFF image, some of the 16-bit RGB values are larger than 1024 (=2^10). It looks to me the 10-bit RGB value has been expanded to 16-bit and store the expanded value in the TIFF image but I am not sure if that is the case. How can I obtain the original 10-bit RGB values from the 16-bit RGB values stored in the TIFF image?

All topic