Re: [Offtopic]| half lossy datatype

Paul Miller <[email protected]>
Newsgroups gmane.comp.video.openexr.devel
Organization FXTECH
Message-ID <[email protected]>
On 4/30/2014 2:08 PM, Gonzalo Garramuno wrote:
> I find myself with updating ffmpeg's exr reader (don't ask). One thing i
> am trying to do is add a gamma function to the reading of the format,
> with a gamma table.
> However, I find myself against a wall not being able to get the float
> and half float to behave correctly.  I end up with greens in places
> where there were negative values or nans.
> I am wondering if someone could take a look at these functions I am
> using to see if some bit is being set wrong.  Or if it is indeed
> impossible to have half->float->half (as done in my filling of the
> table) mantaining the same values (with gamma 1.0).

pow() doesn't like negative values, and I've seen different results on 
different machines. You should clip negatives before calling it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.