diff options
author | Marti Maria <marti.maria@littlecms.com> | 2021-06-05 16:05:49 +0200 |
---|---|---|
committer | Marti Maria <marti.maria@littlecms.com> | 2021-06-05 16:05:49 +0200 |
commit | 08768f06683a843d79fa4f9a0ba3784bd0059876 (patch) | |
tree | 332289c3e3724e49eee0a76be0c0f011ec07a91e /plugins | |
parent | 807809d7dd9b09c0380b71d5d5ebee3c1439ca99 (diff) | |
download | lcms2-08768f06683a843d79fa4f9a0ba3784bd0059876.tar.gz |
fix alpha handling on fast float
Fix broken alpha handling on some interpolation in fast float plugin
Thanks to Lynx3d for spotting that.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/fast_float/src/fast_8_tethra.c | 7 | ||||
-rw-r--r-- | plugins/fast_float/src/fast_float_lab.c | 5 | ||||
-rw-r--r-- | plugins/fast_float/src/fast_float_tethra.c | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/plugins/fast_float/src/fast_8_tethra.c b/plugins/fast_float/src/fast_8_tethra.c index 98601d1..26a5a5d 100644 --- a/plugins/fast_float/src/fast_8_tethra.c +++ b/plugins/fast_float/src/fast_8_tethra.c @@ -249,11 +249,12 @@ void PerformanceEval8(struct _cmstransform_struct *CMMcargo, *out[OutChan] = FROM_16_TO_8(res16); out[OutChan] += DestIncrements[OutChan]; - if (ain) - *out[TotalOut] = *ain; - } + if (ain) { + *out[TotalOut] = *ain; + out[TotalOut] += DestIncrements[TotalOut]; + } } diff --git a/plugins/fast_float/src/fast_float_lab.c b/plugins/fast_float/src/fast_float_lab.c index 553d5fe..d392a84 100644 --- a/plugins/fast_float/src/fast_float_lab.c +++ b/plugins/fast_float/src/fast_float_lab.c @@ -316,7 +316,10 @@ void LabCLUTEval(struct _cmstransform_struct* CMMcargo, } if (xin) - *out[TotalOut] = *xin; + { + *(cmsFloat32Number*) (out[TotalOut]) = *xin; + out[TotalOut] += DestIncrements[TotalOut]; + } } strideIn += Stride->BytesPerLineIn; diff --git a/plugins/fast_float/src/fast_float_tethra.c b/plugins/fast_float/src/fast_float_tethra.c index 982ff20..0e3015a 100644 --- a/plugins/fast_float/src/fast_float_tethra.c +++ b/plugins/fast_float/src/fast_float_tethra.c @@ -210,8 +210,10 @@ void FloatCLUTEval(struct _cmstransform_struct* CMMcargo, out[OutChan] += DestIncrements[OutChan]; } - if (ain) - *out[TotalOut] = *ain; + if (ain) { + *(cmsFloat32Number*)(out[TotalOut]) = *ain; + out[TotalOut] += DestIncrements[TotalOut]; + } } strideIn += Stride->BytesPerLineIn; |