819 // the original parameters as a logging.
820 // Note that cmsFLAGS_CAN_CHANGE_FORMATTER is not set, so by default
821 // an optimized transform is not reusable. The plug-in can, however, change
822 // the flags and make it suitable.
823
824 p->ContextID = ContextID;
825 p->InputFormat = *InputFormat;
826 p->OutputFormat = *OutputFormat;
827 p->dwOriginalFlags = *dwFlags;
828
829 // Fill the formatters just in case the optimized routine is interested.
830 // No error is thrown if the formatter doesn't exist. It is up to the optimization
831 // factory to decide what to do in those cases.
832 p->FromInput = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
833 p->ToOutput = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
834 p->FromInputFloat = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
835 p->ToOutputFloat = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
836
837 // Save the day? (Ignore the warning)
838 if (Plugin->OldXform) {
839 p->OldXform = (_cmsTransformFn) p->xform;
840 p->xform = _cmsTransform2toTransformAdaptor;
841 }
842
843 return p;
844 }
845 }
846
847 // Not suitable for the transform plug-in, let's check the pipeline plug-in
848 _cmsOptimizePipeline(ContextID, &p->Lut, Intent, InputFormat, OutputFormat, dwFlags);
849 }
850
851 // Check whatever this is a true floating point transform
852 if (_cmsFormatterIsFloat(*InputFormat) && _cmsFormatterIsFloat(*OutputFormat)) {
853
854 // Get formatter function always return a valid union, but the contents of this union may be NULL.
855 p ->FromInputFloat = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
856 p ->ToOutputFloat = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
857 *dwFlags |= cmsFLAGS_CAN_CHANGE_FORMATTER;
858
859 if (p ->FromInputFloat == NULL || p ->ToOutputFloat == NULL) {
|
819 // the original parameters as a logging.
820 // Note that cmsFLAGS_CAN_CHANGE_FORMATTER is not set, so by default
821 // an optimized transform is not reusable. The plug-in can, however, change
822 // the flags and make it suitable.
823
824 p->ContextID = ContextID;
825 p->InputFormat = *InputFormat;
826 p->OutputFormat = *OutputFormat;
827 p->dwOriginalFlags = *dwFlags;
828
829 // Fill the formatters just in case the optimized routine is interested.
830 // No error is thrown if the formatter doesn't exist. It is up to the optimization
831 // factory to decide what to do in those cases.
832 p->FromInput = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
833 p->ToOutput = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
834 p->FromInputFloat = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
835 p->ToOutputFloat = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
836
837 // Save the day? (Ignore the warning)
838 if (Plugin->OldXform) {
839 p->OldXform = (_cmsTransformFn)(void*) p->xform;
840 p->xform = _cmsTransform2toTransformAdaptor;
841 }
842
843 return p;
844 }
845 }
846
847 // Not suitable for the transform plug-in, let's check the pipeline plug-in
848 _cmsOptimizePipeline(ContextID, &p->Lut, Intent, InputFormat, OutputFormat, dwFlags);
849 }
850
851 // Check whatever this is a true floating point transform
852 if (_cmsFormatterIsFloat(*InputFormat) && _cmsFormatterIsFloat(*OutputFormat)) {
853
854 // Get formatter function always return a valid union, but the contents of this union may be NULL.
855 p ->FromInputFloat = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
856 p ->ToOutputFloat = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
857 *dwFlags |= cmsFLAGS_CAN_CHANGE_FORMATTER;
858
859 if (p ->FromInputFloat == NULL || p ->ToOutputFloat == NULL) {
|