Quoting Richard Hughes <[email protected]>:
> I also think I've found a bug in lcms2 somewhere. This does not work:
>
> static cmsInt32Number
> lcms_sampler_cb (const cmsFloat32Number data_in[], cmsFloat32Number
> data_out[], void *user_data)
> {
> cmsFloat64Number out[3];
> cmsHTRANSFORM transform = (cmsHTRANSFORM) user_data;
>
> cmsDoTransform (transform, data_in, &out, 1);
> ...
> }
>
> but this does:
>
> static cmsInt32Number
> lcms_sampler_cb (const cmsFloat32Number data_in[], cmsFloat32Number
> data_out[], void *user_data)
> {
> int i;
> cmsFloat64Number in[3];
> cmsFloat64Number out[3];
> cmsHTRANSFORM transform = (cmsHTRANSFORM) user_data;
>
> in[0] = data_in[0];
> in[1] = data_in[1];
> in[2] = data_in[2];
>
> cmsDoTransform (transform, in, &out, 1);
> ...
> }
>
> i.e. copying the non-register const data fixes things.
You go from cmsFloat32Number to cmsFloat64Number. If your transform
uses *_DBL for the input, the first code is not going to work.
Regards
Marti
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user