~ubuntu-branches/ubuntu/trusty/argyll/trusty-proposed

« back to all changes in this revision

Viewing changes to target/targen.c

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2014-02-12 00:35:39 UTC
  • mfrom: (13.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20140212003539-24tautzlitsiz61w
Tags: 1.5.1-5ubuntu1
* Merge from Debian unstable. (LP: #1275572) Remaining changes:
  - debian/control:
    + Build-depend on libtiff-dev rather than libtiff4-dev.
  - debian/control, debian/patches/06_fix_udev_rule.patch:
    + Fix udev rules to actually work; ENV{ACL_MANAGE} has
      stopped working ages ago, and with logind it's now the
      "uaccess" tag. Dropping also consolekit from Recommends.
  - debian/patches/drop-usb-db.patch:
    + Use hwdb builtin, instead of the obsolete usb-db
      in the udev rules.
* debian/patches/05_ftbfs-underlinkage.diff:
  - Dropped change, no needed anymore.
* Refresh the patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
        Should add an option to generate grey and near grey
22
22
        or other PCS based pattern test points based on the previous profile.
23
23
        How about an option to read in an CGATS file containing
24
 
        PCS values ? How is the black level chosen though ?
25
 
 
26
 
        Might be good to change/allow tweaking of the EMPH_NEUTRAL
27
 
        to increase the grey region patch density even more.
28
 
 
29
 
        Would be nice to be able to generate secondary
30
 
        color ramps (ie. CMY for RGB space, RGB for CMYK space.)
 
24
        PCS or device values ? How is the black level chosen for PCS though ?
31
25
 
32
26
        Would be nice to be able to take a previous .ti3 and
33
27
        then suppliment the measured patches. Would have to add another
34
28
        set of measurement columns to .ti1 & .ti2 to carry the
35
 
        already measured values through ? 
 
29
        already measured values through, or do clumbsy post merge ? 
 
30
 
 
31
        Would be nice to be able to generate secondary
 
32
        color ramps (ie. CMY for RGB space, RGB for CMYK space.)
36
33
 
37
34
        Using adaptive patch creation for grey colorspace is broken.
38
35
        This should be fixed.
829
826
/* Research options: */
830
827
/*      fprintf(stderr,"  -A pPERCWGHT    Device (0.0) ... Perceptual (1.0) weighting\n"); */
831
828
/*      fprintf(stderr,"  -A cCURVEWGHT   Curvature weighting  0.0 = none ... "); */
832
 
        fprintf(stderr," -l ilimit        Total ink limit in %%(default = none) \n");
 
829
        fprintf(stderr," -l ilimit        Total ink limit in %% (default = none)\n");
833
830
        fprintf(stderr," -p power         Optional power-like value applied to all device values.\n");
834
831
        fprintf(stderr," -c profile       Optional device ICC or MPP pre-conditioning profile filename\n");
835
832
        fprintf(stderr,"                  (Use \"none\" to turn off any conditioning)\n");
1767
1764
 
1768
1765
        if (fsteps > fxno) { /* Top up with full spread (perceptually even) and other patch types */
1769
1766
 
1770
 
                /* Generate random numbers. Don't check for duplicates */
 
1767
                /* Generate device random numbers. Don't check for duplicates */
1771
1768
                if (userand == 1 || useqrand == 1) {
1772
1769
                        int i, j;
1773
1770
                        sobol *sl = NULL;
1843
1840
 
1844
1841
                        sprintf(buf,"%d",j);
1845
1842
                        if (sl != NULL)
1846
 
                                pp->add_kword(pp, 0, "SPACEFILING_RANDOM_PATCHES", buf, NULL);
 
1843
                                pp->add_kword(pp, 0, "SPACEFILLING_RANDOM_PATCHES", buf, NULL);
1847
1844
                        else
1848
 
                                pp->add_kword(pp, 0, "RANDOM_PATCHES", buf, NULL);
 
1845
                                pp->add_kword(pp, 0, "RANDOM_DEVICE_PATCHES", buf, NULL);
1849
1846
 
1850
1847
                        if (sl != NULL)
1851
1848
                                sl->del(sl);
1863
1860
                        /* number of patches won't reach the target. This could be fixed fairly easily */
1864
1861
                        /* for some of these (new_prand).  */
1865
1862
                        if (uselat)      {
1866
 
                                /* A "greedy"/incremental farp point approach */
 
1863
                                /* A "greedy"/incremental far point approach */
1867
1864
                                t = new_ifarp(di, uilimit, fsteps, fxlist, fxno,
1868
1865
                                                (void(*)(void *, double *, double *))pdata->dev_to_perc, (void *)pdata);
1869
1866
                                sprintf(buf,"%d",fsteps - fxno);
1870
 
                                pp->add_kword(pp, 0, "INC_FAR_PATCHES", buf, NULL);
 
1867
                                pp->add_kword(pp, 0, "IFP_PATCHES", buf, NULL);
1871
1868
                        } else if (usedsim) {
1872
1869
                                /* Device space simplex latice test points */
1873
1870
                                dx = new_simdlat(di, uilimit, fsteps, fxlist, fxno, SIMDLAT_TYPE, simangle,
1885
1882
                                rx = new_prand(di, uilimit, fsteps, fxlist, fxno, useqrand == 2 ? 1 : 0,
1886
1883
                                        (void(*)(void *, double *, double *))pdata->dev_to_perc, (void *)pdata);
1887
1884
                                sprintf(buf,"%d",fsteps - fxno);
1888
 
                                pp->add_kword(pp, 0, "ERROR_OPTIMISED_PATCHES", buf, NULL);
 
1885
                                pp->add_kword(pp, 0, "RANDOM_PERCEPTUAL_PATCHES", buf, NULL);
1889
1886
 
1890
1887
                        } else {                /* Default full spread algorithm */
1891
1888
                                /* Optimised Farthest Point Sampling */
1893
1890
                                            dadapt, 1.0 - perc_wght, perc_wght, curv_wght, fxlist, fxno,
1894
1891
                                        (void(*)(void *, double *, double *))pdata->dev_to_perc, (void *)pdata);
1895
1892
                                sprintf(buf,"%d",fsteps - fxno);
1896
 
                                pp->add_kword(pp, 0, "ERROR_OPTIMISED_PATCHES", buf, NULL);
 
1893
                                pp->add_kword(pp, 0, "OFPS_PATCHES", buf, NULL);
1897
1894
                        }
1898
1895
 
1899
1896
        
1964
1961
        }
1965
1962
 
1966
1963
        /* Use ofps to measure the stats of the points */
 
1964
        /* Note that if new_ofps() fails it will exit() */
1967
1965
        if (verb > 1
1968
1966
     && di <= 4
1969
1967
         && (userand || useqrand || usedsim || usepsim || uselat)) {
1970
1968
                ofps *s;
1971
1969
                printf("Computing device space point stats:\n");
1972
 
                s = new_ofps(verb, di, uilimit, fxno, 0, 0.0, 0.0, 0.0, 0.0, fxlist, fxno,
1973
 
                        (void(*)(void *, double *, double *))pdata->dev_to_perc, (void *)pdata);
1974
 
                s->stats(s);
1975
 
                printf("Max distance stats: Min = %f, Average = %f, Max = %f\n",s->mn,s->av,s->mx);
1976
 
 
1977
 
                s->del(s);
 
1970
                if ((s = new_ofps(verb, di, uilimit, fxno, 0, 0.0, 0.0, 0.0, 0.0, fxlist, fxno,
 
1971
                   (void(*)(void *, double *, double *))pdata->dev_to_perc, (void *)pdata)) == NULL) {
 
1972
                        printf("Failed to compute stats\n");
 
1973
                } else {
 
1974
                        s->stats(s);
 
1975
                        printf("Max distance stats: Min = %f, Average = %f, Max = %f\n",s->mn,s->av,s->mx);
 
1976
                        s->del(s);
 
1977
                }
1978
1978
        }
1979
1979
 
1980
1980
        /* Add the eight entries in the second table. */