[Hdrflow-svn] SF.net SVN: hdrflow: [401] trunk/lib/openlibraries/src/openimagelib/il
Status: Pre-Alpha
Brought to you by:
glslang
From: <gl...@us...> - 2008-01-14 21:17:57
|
Revision: 401 http://hdrflow.svn.sourceforge.net/hdrflow/?rev=401&view=rev Author: glslang Date: 2008-01-14 13:17:51 -0800 (Mon, 14 Jan 2008) Log Message: ----------- + more dpx log transfer functions Modified Paths: -------------- trunk/lib/openlibraries/src/openimagelib/il/lut_functions.cpp trunk/lib/openlibraries/src/openimagelib/il/lut_functions.hpp Modified: trunk/lib/openlibraries/src/openimagelib/il/lut_functions.cpp =================================================================== --- trunk/lib/openlibraries/src/openimagelib/il/lut_functions.cpp 2008-01-10 22:09:39 UTC (rev 400) +++ trunk/lib/openlibraries/src/openimagelib/il/lut_functions.cpp 2008-01-14 21:17:51 UTC (rev 401) @@ -16,11 +16,6 @@ namespace olib { namespace openimagelib { namespace il { -namespace -{ - const float dpx_black_offset = 0.0107977516233f; -} - float to_sRGB( float v ) { if( v < ( 0.04045f / 12.92f ) ) @@ -47,7 +42,14 @@ float from_dpxLog( float v ) { - return ( powf( 10.0f, ( v - 685.0f ) * ( 0.002f / 0.6f )) - dpx_black_offset ) / ( 1.0f - dpx_black_offset ); + const float dpx_black_offset = 0.0107977516233f; + + return ( powf( 10.0f, ( v - 685.0f ) * ( 0.002f / 0.6f ) ) - dpx_black_offset ) / ( 1.0f - dpx_black_offset ); } +float from_dpxLog_byte_scaled( float v ) +{ + return from_dpxLog( v ) * 1.0f / 1023.0f; +} + } } } Modified: trunk/lib/openlibraries/src/openimagelib/il/lut_functions.hpp =================================================================== --- trunk/lib/openlibraries/src/openimagelib/il/lut_functions.hpp 2008-01-10 22:09:39 UTC (rev 400) +++ trunk/lib/openlibraries/src/openimagelib/il/lut_functions.hpp 2008-01-14 21:17:51 UTC (rev 401) @@ -14,6 +14,7 @@ IL_DECLSPEC float to_rec709( float v ); IL_DECLSPEC float from_rec709( float v ); IL_DECLSPEC float from_dpxLog( float v ); +IL_DECLSPEC float from_dpxLog_byte_scaled( float v ); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |