Scene Linear Data

Hello,

I'm looking to decode DNG files into linear 16-bit using LibRaw. Would someone know the formula to convert this to a floating point Scene Linear format (scaled to utilize negative and numbers above 1)?

Forums: 

Scene Linear Data

Go here:

https://github.com/butcherg/rawproc/blob/master/gimage.cpp

Scroll to line 77, and you'll find a C++ method that contains the code to turn 16-bit RGB data into RGB floating point 0.0-1.0. It's the loop within the conditional 'colors==3'. To meet your requirements, the 16-bit input data should not be scaled.