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

Gonzalo Garramuno ggarra13 at gmail.com
Thu May 8 18:00:13 CEST 2014


On 08/05/14 12:29, Michael Niedermayer wrote:
> On Thu, May 08, 2014 at 11:30:08AM -0300, Gonzalo Garramuno wrote:
>> On 08/05/14 10:43, Michael Niedermayer wrote:
>>> On Thu, May 08, 2014 at 10:20:22AM -0300, Gonzalo Garramuno wrote:
>>>> On 07/05/14 23:30, Michael Niedermayer wrote:
>>>>> this one fails again:
>>>> The only things I changed were the defines and used av_intfloat32 to
>>>> avoid the aliasing problem.  There's something more severely broken
>>>> in the test suite.  I attach a version with returning av_intfloat32
>>>> instead of a float and see if that passes.
>>>>
>>> fails:
>>> also can you get rid of all floats int->union->float on the main
>>> gamma=1 path ?
>>> IIRC they are only used to transport a unchanged value,
>> Find it attached. In principle this should revert to the old
>> checksums, but when I run fate, it uses the new checksums.
> still fails:
>
> also theres still a float in there in the gamma=1 path:
> "if ( t.f <= 0.0f ) {"
>
No, there's no float in the gamma path:

+    if ( one_gamma > 0.9999f && one_gamma < 1.0001f ) {
+        for ( i = 0; i < 65536; ++i ) {
+            s->gamma_table[i] = exr_halflt2uint(i);
+        }
+    }




More information about the ffmpeg-devel mailing list