[FFmpeg-devel] libavcodec/exr : fix float to uint16 conversion for negative value

2017-04-23 Thread Martin Vignali
Hello, In attach a patch who fix this sample : https://we.tl/HWgF0SFEll This sample contain negative value in the red channel. Before this patch, negative red float are converted to max red instead of zero. The previous hack doesn't seems to work for float to uint so i add an explicit sign chec

Re: [FFmpeg-devel] libavcodec/exr : fix float to uint16 conversion for negative value

2017-04-25 Thread Michael Niedermayer
On Sun, Apr 23, 2017 at 06:00:06PM +0200, Martin Vignali wrote: > Hello, > > In attach a patch who fix this sample : > https://we.tl/HWgF0SFEll > > This sample contain negative value in the red channel. > > Before this patch, negative red float are converted to max red > instead of zero. > > Th

Re: [FFmpeg-devel] libavcodec/exr : fix float to uint16 conversion for negative value

2017-04-25 Thread Martin Vignali
> > did you try to make exp int32_t to avoid the 2nd check ? > > [...] > New patch in attach, with exp (and v) in int32_t Also fix the sample for me Martin 0001-libavcodec-exr-fix-float-to-uint16-conversion-for-ne.patch Description: Binary data ___ f

Re: [FFmpeg-devel] libavcodec/exr : fix float to uint16 conversion for negative value

2017-04-26 Thread Michael Niedermayer
On Tue, Apr 25, 2017 at 11:04:21PM +0200, Martin Vignali wrote: > > > > did you try to make exp int32_t to avoid the 2nd check ? > > > > [...] > > > > New patch in attach, with exp (and v) in int32_t > > Also fix the sample for me > > Martin > exr.c |4 ++-- > 1 file changed, 2 insertions(