View Single Post
Old 24th July 2020, 21:07   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,370
Quote:
Originally Posted by feisty2 View Post
when the input range is "limited", the bit depth conversion is a bit shift operation, concretely
result = input << (output_depth - input_depth)
and as you can see, 235 << (10-8) = 235 * 4 = 940

for full range input, the pixel range is first normalized to [0, 1], then linearly scaled to the target range
235 / 255 * 1023 = 942.76470588235294117647058823529 ≈ 943
Ahhh!
Thanks f2!
poisondeathray is offline   Reply With Quote