On 13/05/2013 22:01, Richard Hughes wrote:
> I'm trying to make my transform go fast. I've got a 1920x1080 RGB
> image being transformed from sRGB to the display profile. I've got a
> quad core processor on my development box, no shaders or GPU, and I'm
> trying to do the transform as quickly as possible.

Before you dive into the complexities of multithreading etc, it would 
seem sensible to ensure you are getting the best possible performance 
out of the transform routine in the first place.

LCMS has various different transform routines built in; by using a 
cunning scheme, it can pick the appropriate one at runtime. If there 
happens to be one in its repertoire that exactly fits your needs, it can 
run considerably faster than if it has to use a generic one.

To speed ghostscripts use of lcms2, I wanted to optimise the transforms 
that we use as much as possible. But we use quite a lot of them, and I 
didn't want to have to hand write optimised ones for all of the 
different cases. So I implemented a system that uses a chameleonic 
header; set a few options with #defines, and include the header, and it 
makes the optimised transform function for you.

You can find this as part of the copy of lcms2 in the Ghostscript 
source, or on my git repository:

  https://github.com/robinwatts/Little-CMS/tree/artifex

I offered this code back to Marti for inclusion in stock lcms2, so that 
people could easily add their own optimised transforms, but he wasn't 
keen on taking it as is.

He did however point out that I could recast the code slightly as a 
plugin for lcms 2. This gives the same benefits without polluting the 
internals of the library itself. I plan to do this at some point, but I 
have not got round to it yet.

In the meantime, if anyone has any use for the existing code, please 
feel free.

Robin


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to