[Digikam-devel] [Bug 310211] New: Adjusting 16-bit curves requires 32-bit precision

Dik Takken d.h.j.takken at xs4all.nl
Fri Nov 16 14:07:57 GMT 2012


https://bugs.kde.org/show_bug.cgi?id=310211

            Bug ID: 310211
          Severity: normal
           Version: 2.6.0
          Priority: NOR
          Assignee: digikam-devel at kde.org
           Summary: Adjusting 16-bit curves requires 32-bit precision
    Classification: Unclassified
                OS: Linux
          Reporter: d.h.j.takken at xs4all.nl
          Hardware: Gentoo Packages
            Status: NEW
         Component: Adjust Curves
           Product: digikamimageplugins

When doing subtle curve corrections to 16-bit images, the histogram often shows
damage caused by the curves correction. The resulting histogram looks 'hairy'
(see attachment), which suggests that the curve correction calculation is done
at 16 bits per channel. This lack of precision causes many different input
values to yield the same output value, which explains the spikes on the
histogram.

I have not seen any visible effects of the damage caused by the curves plugin,
but it might be easy to fix:

1. Take the 16-bit input value, store in 32-bit variable.
2. Bitshift the 32-bit value to the left by 16 places
3. Add a random 16-bit value
4. Apply curves correction function, yields 32-bit output value
5. Bitshift the 32-bit output value to the right by 16 places
6. Store 32-bit output value in 16-bit variable

The same applies to curve corrections to 8-bit images, which requires 16 bits
of precision.


Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list