[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Cineon -> half conversion?

From: Ken McGaugh
Subject: Re: [Openexr-devel] Cineon -> half conversion?
Date: Wed, 02 Mar 2005 10:24:21 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040914

Paul Miller wrote:
Does anyone have a good reference for Cineon log -> linear half conversion?

The method I recommend comes from Josh Pines (who monitors this list).  I'll
summarize it by showing how we do it here, including the header attributes we
use to store the parameters controlling the conversion.

The attributes are prefixed with "pdx" which stands for Printing Density Xform.
They look like

    pdxLinReference (type v3f): (0.18 0.18 0.18)
    pdxLogReference (type v3f): (445 445 445)
    pdxNegativeGamma (type v3f): (0.6 0.6 0.6)
    pdxDensityPerCodeValue (type v3f): (0.002 0.002 0.002)

Note that we typically leave out the pdxDensityPerCodeValue and just assume
a value of 0.002.

Say you have a cineon code value named xLog in the range 0-1023.  To convert
it into a linear value xLin you would do

    xLin = pow( 10.0, (xLog - 
pdxLogReference)*pdxDensityPerCodeValue/pdxnegativeGamma );
    xLin *= pdxLinReference;

Similarly, to convert back

    xLog = max( xLin, 1e-10 ) / pdxLinReference;
    xLog = pdxLogReference + 

Note that nowhere is there any reference to "black" or "white".  They are video
concepts and should only be used when preparing pixel values for display.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]