Re: Optimizations, etc.
Kai-Uwe Behrmann <[email protected]>
| Newsgroups | gmane.comp.video.cinepaint.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 09.11.06, 18:05 -0500 schrieb Bradley A. Hare:
>
>
> While playing around with the Cinepaint source code, I noticed that
> the brightness/contrast and gamma functions could use some considerable
> optimization. Gamma seems to have been upgraded in 0.20 and 0.21,
> but the other functions in app/depth could use a little tuning -
> specifically in-lining, eliminating constants from the loop and
> a little algebra to reduce the number of calculations.
>
> I also believe that the CLAMP macro used in gamma_expose.c is
> producing two extra calls to pow() (checked asm using gcc -S).
>
> For small images this probably does not matter, but for 16M and
> up it makes a considerable difference in the response time. The
> speed-up in gamma_expose.c going from 0.19 to an optimized 0.21 is about
> 5X (for U16 image data).
>
> In brightness_contrast.c the math in contrast_func() is really weird, a
> little algebra + in-line code (move the whole thing into the loop) would
> eliminate half the code.
>
> I have not looked at the other controls yet, but I am assuming that they
> all could undergo considerable tweaking.
>
> I fixed the color corrector for U16. Just changed all the instances of
> 2^8 to 2^16. I only work with U16 images, so this is all I need to get
> going. If I get time I'll fix it for the rest. U8 and U16 would
> probably handle 99.9% of the still images out there.
>
> Also, I have not found the bug yet, but 0.21 occasionally produces
> corrupt tiff files. I have not had time to analyze the problem, but
> perhaps someone else has seen this ???
>
> I'm still playing with Cinepaint because there seems to be no other
> option. Are we ever going to see Glasgow ??? The CVS seems to be
> dead and the project is now 1 year past its original release date.
> I hate to be working on my tools when I have other things to
> do, but I will do what is necessary to get the job done.
>
> Also, for the truly masochistic, I brought cinepaint glib,
> gtk, lcms and libtiff into a private tree and compiled the whole lot
> -malign-double. In some places this seems to be good for a 20 - 50%
> speedup. This is a bit dangerous, but so far it has not produced
> crashes in my normal work flow.
>
> Regards to All
>
> Brad Hare
>
Your optimisation and suggestions are greatly welcome. Do you like to
create a patch against 0.21-2 for the above mentioned rendering and
manipulation code?
The last optimisation was done for playback of sequences. I optimised for
a common situation, but decided then for me not to continue in favour
of other tasks.
For tiff I would be interessted to see a reproducible scenario. A
patch is welcome as well ;-) Otherwise I remain a bit in darkness.
Thanks!
regards
Kai-Uwe Behrmann
+ development for color management
+ imaging / panoramas
+ email: [email protected]
+ http://www.behrmann.name
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642