[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1564-g8b5af0e
[email protected] (Robin Watts)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via 8b5af0e2db28be36d96de97eb1a145d5716ffea3 (commit)
from 15d95340389f0f46bd214803ec19685c0a738a0e (commit)
----------------------------------------------------------------------
commit 8b5af0e2db28be36d96de97eb1a145d5716ffea3
Author: Robin Watts <[email protected]>
Date: Tue Aug 13 11:54:36 2019 +0100
Tweak lcms to optimise the pipeline before consulting plugins.
This allows us to recognise identity transforms before selecting
one of our optimised lookup functions. Firstly, however optimised
our code is, we aren't going to beat the identity code. Secondly,
lcms doesn't calculate the tables for identity transforms, so
our code can fall in a heap here.
diff --git a/lcms2mt/src/cmsxform.c b/lcms2mt/src/cmsxform.c
index 56f5849..52f4815 100644
--- a/lcms2mt/src/cmsxform.c
+++ b/lcms2mt/src/cmsxform.c
@@ -1138,6 +1138,11 @@ _cmsTRANSFORM* AllocEmptyTransform(cmsContext ContextID, cmsPipeline* lut,
// Let's see if any plug-in want to do the transform by itself
if (core->Lut != NULL) {
+ // First, optimise the pipeline. This may cause us to recognise that the Luts are
+ // identity.
+ _cmsOptimizePipeline(ContextID, &core->Lut, Intent, InputFormat, OutputFormat, dwFlags);
+
+ if (_cmsLutIsIdentity(core->Lut) == FALSE) {
for (Plugin = ctx->TransformCollection;
Plugin != NULL;
Plugin = Plugin->Next) {
@@ -1170,9 +1175,8 @@ _cmsTRANSFORM* AllocEmptyTransform(cmsContext ContextID, cmsPipeline* lut,
return p;
}
}
+ }
- // Not suitable for the transform plug-in, let's check the pipeline plug-in
- _cmsOptimizePipeline(ContextID, &core->Lut, Intent, InputFormat, OutputFormat, dwFlags);
}
// Check whatever this is a true floating point transform
Summary of changes:
lcms2mt/src/cmsxform.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)