[FFmpeg-devel] [PATCH] Add a gamma flag to exr loader to avoid banding

Gonzalo Garramuno ggarra13 at gmail.com
Sun May 4 16:58:42 CEST 2014


On 03/05/14 23:45, Michael Niedermayer wrote:
> one way to do that is
> by adding a random small value to every non interger
> computation
> that is
> for example replace
> o.f *= magic.f; /* exponent adjust */
> if (o.f >= was_infnan.f) /* make sure Inf/NaN survive */
> by
>
> magic.f += random_small()
> o.f += random_small()
> o.f *= magic.f; /* exponent adjust */
> o.f += random_small()
> if (o.f + random_small() >= was_infnan.f + random_small()) /* make sure Inf/NaN survive */
>
I made the constants use the float value instead of the bit shifts. Can 
you give it a try?  If that does not work I'll try adding a random value 
to debug it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exr_patch12.diff
Type: text/x-patch
Size: 6961 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140504/fb884f19/attachment.bin>


More information about the ffmpeg-devel mailing list