Summary: | An analythic implementation for gs_direct_color_space::is_linear | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Igor Melichev <igor.melichev> |
Component: | Graphics Library | Assignee: | Ralph Giles <ralph.giles> |
Status: | RESOLVED LATER | ||
Severity: | enhancement | CC: | raph.levien |
Priority: | P2 | Keywords: | bountiable |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: | initial_patch.txt |
Description
Igor Melichev
2004-04-08 03:00:07 UTC
Created attachment 614 [details]
initial_patch.txt
Attaching a patch, which defines the scope of the project.
See comments in there about details of the suggested implementation.
An additional useful requirement : change function prototypes and implementations to return a maximal deviation from the linear approximation. is_quadrangle_color_linear in gxshade6.c needs this information for better choice of the patch subdivision. Passing to Tim. Set P2 as Bug 689189 for Customer 190 depends on it. We need to speed up gx_cspace_is_linear_default dramatically. Creating an array of quazilinear intervals may help. Here is an example for 1-dimensional color function (such as CIEBasedA) : Suppose the function is defined with a 256-elements array of values [0:255]. source array : 0 0 0 0 1 2 3 4 6 8 10 12 .... Create another 256 elements array, which stores indices of quazilinear intervals like this : intervals : 0 0 0 0 1 1 1 1 2 2 2 2 .... To know whether the function is quazilinear in an interval [i0:i1] just check intervals[i0] != intervals[i1]. Well in the multi-dimensional space it is more complicated, and needs a lazy calculation of the intervals array. A sample code may be found in gsfunc0.c:make_interpolation_tensor . I think this bug is obsolete. |