[Lcms-user] How to change buffer format ?
An ICC-based CMM for color management
Brought to you by:
mm2
From: Prevost J. <J.P...@le...> - 2010-05-26 15:02:52
|
Hello, I just take a look at migrating to V2, but don't find the cmsChangeBuffersFormat function any more (or an equivalent). As I use it all the time (because I can't know in advance what is the buffer format will be), how can I change it without recreating the transform (which would be way too slow) ? About this subject, in fact, the way the buffers are defined seems very complicated and restrictive (I can not for example use buffers with transparency for each channel) because of the exhaustive aspect. I used to use the Kodak CMS a few years ago and they chose a very simple and universal way to describe buffers (what they called layouts) and they don't use function pointers (that can not be inlined) internally for each buffer format. The internal implementation (I got the source code) is much simpler and compact without the whole set of input/output functions because of the buffer description. I don't know if you know the old Kodak CMM, I can give you the buffer structure (a C struct, actually) and you will see how simple it is for the user and for the internal implementation of the CMM ! I was reluctant to migrate to V2 because I made a lots of changes into the v1.19, changing all these functions to accept a buffer instead of a single pixel. So the buffer goes directly to the lowest level of the transform. By doing this, I could get a speedup from ten to twenty for any type of transform, most of the time is lost across calls. In addition to that, using OpenMP adds somme more speed and I could get, with these (very boring !) modifications, something better than the Kodak CMS. The V2 is a large improvement into the architecture, a very elegant one ! The buffer part is the weakest part of the edifice now. But even with that (and all the modification I will do again), I think it's worth migrating. Perhaps in V3 ! Thanks in advance, J. |