Thanks for the help! Yes it's mostly like the old sRGB and that. Did not know about those tricks, understand it's more important to protect compatbility. I'll certainly look into the plugin thing.
/Anders On 11/24/2013 06:24:18 PM, marti.ma...@littlecms.com wrote: > > Anders, > > This is not a matter of adding or not the feature. It would be easy > for me just to promote the tables and use them in floating point > mode. > The issue is, there are profiles around using the limited > precision as a trick to do other things, and doing what you propose > would break color rendition on those tricky yet legal profiles. > > Thinking a little bit more on that, I believe it could be done by > using a plug-in. If I understand correctly, you want to limit this > to matrix shaper profiles, like the old sRGB, and only in floating > point mode. Is that right? > > Using a optimization plug-in, you could capture the cases where > input and output profiles a both matrix shaper and the CMM is > operating in foating point. The actual code does something similar > wwhen using 8 bits, to provide high performance. You could do > some similar for high accuracy. > > In the documentation is explained how to build such plug-ins. > Look for "optimization plug in". The "myOptimize" function > described in the manual should be changed to something like that > > if (*InputFormat == TYPE_RGB_FLT && > *OutputFormat == TYPE_RGB_FLT && > cmsPipelineCheckAndRetreiveStages(Src, 4, > cmsSigCurveSetElemType, cmsSigMatrixElemType, > cmsSigMatrixElemType, cmsSigCurveSetElemType, > &Curve1, &Matrix1, &Matrix2, &Curve2)) > { > - Store the matrixes and the curves elsewere > _cmsPipelineSetOptimizationParameters(*Lut, > MyEvaluator, NULL, NULL, NULL); > > } > > Then in MyEvaluator() do whatever interpolation you wish > with matrix and curves. This approach would capture only > matrix-shaper pipelines, so the huge rest of other > profiles and formats will be handled transparently by the > CMM. > > Sorry, I really cannot break compatibility because other > users, but I think plug-ins gives you a clear path forward. > Please let me know if you need any additional help with > the plug-in. > > Regards > Marti > > Quoting Anders Torger <tor...@ludd.ltu.se>: > > > Ok, I was afraid that this would be the response. People are using > > legacy icc profiles all the time so having poor support for them is > not > > really a great idea, at least not for our project. As a first step > we > > can implement matrix shaper conversions ourselves though as it's > quite > > easy to do, but it would be great if we could get floating point > > support throughout *including* legacy icc profiles. > > > > /Anders > > > > On 11/24/2013 01:25:34 AM, marti.ma...@littlecms.com wrote: > >> > >> Quoting Anders Torger <tor...@ludd.ltu.se>: > >> > >> > >> Hello, > >> > with the gamma curve specified as an array of numbers > >> > >> That's the whole point. If the gamma is specified as an array of > 16 > >> bits numbers, then the interpolation happens in 16 bits. This is > >> because the profile, not the CMM. In fact, if the profile uses > >> multiprofile elements and a table of floats, then the > interpolation > >> happens in float precision. > >> > >> I would recommend to use modern (V4) profiles, with parametric > curves > >> > >> or much better with multiprofile elements. This runs well in > >> unbounded > >> > >> mode. > >> > >> > >> Regards > >> Marti > >> > >> > Hello, > >> > > >> > I'm one of the developers of RawTherapee, a photo editing > software > >> with > >> > a floating point engine and which uses lcms2 for color > management. > >> > > >> > Recently I discovered that when making a transform from float to > >> float > >> > (or float to 16 bit) using a basic icc with the gamma curve > >> secified > >> as > >> > an array of numbers the output contains fewer distinct values > than > >> the > >> > input. If the gamma is specified with a single number (ie pow(x, > >> > g/256)) but otherwise the same icc (not LUT, just matrix) the > >> output > >> > is the expected, ie about the same amount of distinct numbers as > >> the > >> > input. > >> > > >> > Thus there is some precision lost in the curve interpolation > code. > >> > > >> > If I've managed to navigate the code correctly it happens in > >> > cmsEvalToneCurveFloat() where a 16 bit integer path is taken > >> despite > >> > it's perfectly possible to make a floating point interpolation. > >> > > >> > As we want to maintain precision with widely used legacy icc > files > >> we'd > >> > like to see this fixed. > >> > > >> > /Anders Torger > >> > > >> > ------------------------------------------------------------------------------ > >> > Shape the Mobile Experience: Free Subscription > >> > Software experts and developers: Be at the forefront of tech > >> innovation. > >> > Intel(R) Software Adrenaline delivers strategic insight and > >> game-changing > >> > conversations that shape the rapidly evolving mobile landscape. > >> Sign > >> up now. > >> > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ > >> ostg.clktrk > >> > _______________________________________________ > >> > Lcms-user mailing list > >> > Lcms-user@lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/lcms-user > >> > >> > >> > >> > > > > > > > > > ------------------------------------------------------------------------------ > > Shape the Mobile Experience: Free Subscription > > Software experts and developers: Be at the forefront of tech > innovation. > > Intel(R) Software Adrenaline delivers strategic insight and > game-changing > > conversations that shape the rapidly evolving mobile landscape. > Sign > up now. > > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ > ostg.clktrk > > _______________________________________________ > > Lcms-user mailing list > > Lcms-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/lcms-user > > > ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user