Update of /cvsroot/ufraw/ufraw In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22422
Modified Files: ufraw_developer.c Log Message: Small clean-up to lcms2 code. Index: ufraw_developer.c =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw_developer.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- ufraw_developer.c 16 Oct 2013 16:25:11 -0000 1.91 +++ ufraw_developer.c 23 Oct 2013 23:11:06 -0000 1.92 @@ -284,8 +284,6 @@ #ifdef HAVE_LCMS2 cmsPipeline* Pipeline = NULL; cmsStage* CLUT = NULL; - cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS]; - int i; hICC = cmsCreateProfilePlaceholder(NULL); if (hICC == NULL) return NULL; // can't allocate @@ -299,10 +297,9 @@ Pipeline = cmsPipelineAlloc(NULL, 3, 3); if (!Pipeline) goto error_out; - for (i = 0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = 11; - CLUT = cmsStageAllocCLut16bitGranular(NULL, Dimensions, 3, 3, NULL); - if (!CLUT || - !cmsStageSampleCLut16bit(CLUT, contrast_saturation_sampler, &cs, 0)) + if (!(CLUT = cmsStageAllocCLut16bit(NULL, 11, 3, 3, NULL))) + goto error_out; + if (!cmsStageSampleCLut16bit(CLUT, contrast_saturation_sampler, &cs, 0)) goto error_out; #if LCMS_VERSION >= 2050 @@ -313,8 +310,8 @@ #endif // Create tags - cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void *) cmsD50_XYZ()); - cmsWriteTag(hICC, cmsSigAToB0Tag, (void *) Pipeline); + cmsWriteTag(hICC, cmsSigMediaWhitePointTag, cmsD50_XYZ()); + cmsWriteTag(hICC, cmsSigAToB0Tag, Pipeline); // Pipeline is already on virtual profile cmsPipelineFree(Pipeline); @@ -407,8 +404,6 @@ #ifdef HAVE_LCMS2 cmsPipeline* Pipeline = NULL; cmsStage* CLUT = NULL; - cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS]; - int i; hICC = cmsCreateProfilePlaceholder(NULL); if (hICC == NULL) return NULL; // can't allocate @@ -422,12 +417,11 @@ Pipeline = cmsPipelineAlloc(NULL, 3, 3); if (!Pipeline) goto error_out; - for (i = 0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = 33; - CLUT = cmsStageAllocCLut16bitGranular(NULL, Dimensions, 3, 3, NULL); + if (!(CLUT = cmsStageAllocCLut16bit(NULL, 11, 3, 3, NULL))) + goto error_out; - if (!CLUT || - !cmsStageSampleCLut16bit(CLUT, luminance_adjustment_sampler, - (void*)d, 0)) + if (!cmsStageSampleCLut16bit(CLUT, luminance_adjustment_sampler, + (void*)d, 0)) goto error_out; #if LCMS_VERSION >= 2050 @@ -438,8 +432,8 @@ #endif // Create tags - cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void *) cmsD50_XYZ()); - cmsWriteTag(hICC, cmsSigAToB0Tag, (void *) Pipeline); + cmsWriteTag(hICC, cmsSigMediaWhitePointTag, cmsD50_XYZ()); + cmsWriteTag(hICC, cmsSigAToB0Tag, Pipeline); // Pipeline is already on virtual profile cmsPipelineFree(Pipeline); ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ ufraw-cvs mailing list ufraw-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ufraw-cvs