Bug 687414 - An analythic implementation for gs_direct_color_space::is_linear
Summary: An analythic implementation for gs_direct_color_space::is_linear
Status: RESOLVED LATER
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: All All
: P2 enhancement
Assignee: Ralph Giles
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2004-04-08 03:00 UTC by Igor Melichev
Modified: 2009-09-03 15:43 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
initial_patch.txt (19.65 KB, patch)
2004-04-08 03:01 UTC, Igor Melichev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Melichev 2004-04-08 03:00:07 UTC
Rather we have got a default in gx_cspace_is_linear_default, the default 
implementation isn't well based on math and therefore it has a risk of glitches 
and performance leak. We would like to replase it with a better one.
Comment 1 Igor Melichev 2004-04-08 03:01:46 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.
Comment 2 Igor Melichev 2004-05-17 05:46:44 UTC
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.
Comment 3 leonardo 2007-05-07 02:50:05 UTC
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 .
Comment 4 Ralph Giles 2009-09-03 15:43:19 UTC
I think this bug is obsolete.