| OLD | NEW |
| 1 //------------------------------------------------------------------------------
--- | 1 //------------------------------------------------------------------------------
--- |
| 2 // | 2 // |
| 3 // Little Color Management System | 3 // Little Color Management System |
| 4 // Copyright (c) 1998-2011 Marti Maria Saguer | 4 // Copyright (c) 1998-2011 Marti Maria Saguer |
| 5 // | 5 // |
| 6 // Permission is hereby granted, free of charge, to any person obtaining | 6 // Permission is hereby granted, free of charge, to any person obtaining |
| 7 // a copy of this software and associated documentation files (the "Software"), | 7 // a copy of this software and associated documentation files (the "Software"), |
| 8 // to deal in the Software without restriction, including without limitation | 8 // to deal in the Software without restriction, including without limitation |
| 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar
e | 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar
e |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 605 |
| 606 // Remove prelinearization. Since we have duplicated the curve | 606 // Remove prelinearization. Since we have duplicated the curve |
| 607 // in destination LUT, the sampling shoud be applied after this
stage. | 607 // in destination LUT, the sampling shoud be applied after this
stage. |
| 608 cmsPipelineUnlinkStage(Src, cmsAT_BEGIN, &KeepPreLin); | 608 cmsPipelineUnlinkStage(Src, cmsAT_BEGIN, &KeepPreLin); |
| 609 } | 609 } |
| 610 } | 610 } |
| 611 } | 611 } |
| 612 | 612 |
| 613 // Allocate the CLUT | 613 // Allocate the CLUT |
| 614 CLUT = cmsStageAllocCLut16bit(Src ->ContextID, nGridPoints, Src ->InputChann
els, Src->OutputChannels, NULL); | 614 CLUT = cmsStageAllocCLut16bit(Src ->ContextID, nGridPoints, Src ->InputChann
els, Src->OutputChannels, NULL); |
| 615 if (CLUT == NULL) return FALSE; | 615 if (CLUT == NULL) goto Error; |
| 616 | 616 |
| 617 // Add the CLUT to the destination LUT | 617 // Add the CLUT to the destination LUT |
| 618 if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) { | 618 if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) { |
| 619 goto Error; | 619 goto Error; |
| 620 } | 620 } |
| 621 | 621 |
| 622 // Postlinearization tables are kept unless indicated by flags | 622 // Postlinearization tables are kept unless indicated by flags |
| 623 if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) { | 623 if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) { |
| 624 | 624 |
| 625 // Get a pointer to the postlinearization if present | 625 // Get a pointer to the postlinearization if present |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 | 1786 |
| 1787 if (Opts ->OptimizePtr(PtrLut, Intent, InputFormat, OutputFormat, dw
Flags)) { | 1787 if (Opts ->OptimizePtr(PtrLut, Intent, InputFormat, OutputFormat, dw
Flags)) { |
| 1788 | 1788 |
| 1789 return TRUE; | 1789 return TRUE; |
| 1790 } | 1790 } |
| 1791 } | 1791 } |
| 1792 | 1792 |
| 1793 // Only simple optimizations succeeded | 1793 // Only simple optimizations succeeded |
| 1794 return AnySuccess; | 1794 return AnySuccess; |
| 1795 } | 1795 } |
| OLD | NEW |