Commit aeb828f2 authored by Boudewijn Rempt's avatar Boudewijn Rempt

* Make it possible to start long-running background filters for paint

devices in certain colorspaces. Now I just have to debug wet.
* Fix all memory leaks with undo transactions being new'ed, but never
deleted or added to the undo stack
* Fix memory leak in transform worker (colors** never got deleted)
* Fix memory leak in adjustment filters: now the KisColorAdjustment gets
deleted
* Review all filters for suitability when painting
* Fix painting with filters so we don't create the lots of separate circles
anymore (painting with brightness/contrast is still a lot slower than it
should be)
* Remove all spaces around ->, Cyrille and Casper will be happy now
* Some work on the cubism filter to make it behave. Will finish this today.
I hope.

svn path=/trunk/koffice/; revision=520280
parent 8e7e2690
......@@ -46,8 +46,8 @@ CMYKU16Plugin::CMYKU16Plugin(QObject *parent, const char *name, const QStringLis
KisColorSpace * colorSpaceCMYKU16 = new KisCmykU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykU16ColorSpaceFactory();
Q_CHECK_PTR(colorSpaceCMYKU16);
f -> add(csf);
KisHistogramProducerFactoryRegistry::instance() -> add(
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU16HistogramProducer>
(KisID("CMYK16HISTO", i18n("CMYK16 Histogram")), colorSpaceCMYKU16) );
}
......
......@@ -66,13 +66,13 @@ void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
Q_UINT32 alpha = pixel -> alpha;
Q_UINT32 alpha = pixel->alpha;
Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
totalCyan += UINT16_MULT(pixel -> cyan, alphaTimesWeight);
totalMagenta += UINT16_MULT(pixel -> magenta, alphaTimesWeight);
totalYellow += UINT16_MULT(pixel -> yellow, alphaTimesWeight);
totalBlack += UINT16_MULT(pixel -> black, alphaTimesWeight);
totalCyan += UINT16_MULT(pixel->cyan, alphaTimesWeight);
totalMagenta += UINT16_MULT(pixel->magenta, alphaTimesWeight);
totalYellow += UINT16_MULT(pixel->yellow, alphaTimesWeight);
totalBlack += UINT16_MULT(pixel->black, alphaTimesWeight);
newAlpha += alphaTimesWeight;
weights++;
......@@ -83,7 +83,7 @@ void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
dstPixel -> alpha = newAlpha;
dstPixel->alpha = newAlpha;
if (newAlpha > 0) {
totalCyan = UINT16_DIVIDE(totalCyan, newAlpha);
......@@ -92,10 +92,10 @@ void KisCmykU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
totalBlack = UINT16_DIVIDE(totalBlack, newAlpha);
}
dstPixel -> cyan = totalCyan;
dstPixel -> magenta = totalMagenta;
dstPixel -> yellow = totalYellow;
dstPixel -> black = totalBlack;
dstPixel->cyan = totalCyan;
dstPixel->magenta = totalMagenta;
dstPixel->yellow = totalYellow;
dstPixel->black = totalBlack;
}
void KisCmykU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const
......@@ -519,7 +519,7 @@ void KisCmykU16ColorSpace::compositeErase(Q_UINT8 *dst,
for (Q_INT32 i = cols; i > 0; i--, s++, d++)
{
Q_UINT16 srcAlpha = s -> alpha;
Q_UINT16 srcAlpha = s->alpha;
// apply the alphamask
if (mask != 0) {
......@@ -530,7 +530,7 @@ void KisCmykU16ColorSpace::compositeErase(Q_UINT8 *dst,
}
mask++;
}
d -> alpha = UINT16_MULT(srcAlpha, d -> alpha);
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
dst += dstRowSize;
......
......@@ -52,7 +52,7 @@ CMYKPlugin::CMYKPlugin(QObject *parent, const char *name, const QStringList &)
Q_CHECK_PTR(colorSpaceCMYK);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance() -> add(
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer>
(KisID("CMYKHISTO", i18n("CMYK Histogram")), colorSpaceCMYK) );
}
......
......@@ -517,7 +517,7 @@ void KisCmykColorSpace::compositeErase(Q_UINT8 *dst,
for (Q_INT32 i = cols; i > 0; i--, s++, d++)
{
Q_UINT8 srcAlpha = s -> alpha;
Q_UINT8 srcAlpha = s->alpha;
// apply the alphamask
if (mask != 0) {
......@@ -528,7 +528,7 @@ void KisCmykColorSpace::compositeErase(Q_UINT8 *dst,
}
mask++;
}
d -> alpha = UINT8_MULT(srcAlpha, d -> alpha);
d->alpha = UINT8_MULT(srcAlpha, d->alpha);
}
dst += dstRowSize;
......
......@@ -49,7 +49,7 @@ GRAYU16Plugin::GRAYU16Plugin(QObject *parent, const char *name, const QStringLis
Q_CHECK_PTR(colorSpaceGRAYU16);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance() -> add(
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU16HistogramProducer>
(KisID("GRAYA16HISTO", i18n("GRAY/Alpha16 Histogram")), colorSpaceGRAYU16) );
}
......
......@@ -67,10 +67,10 @@ void KisGrayU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
Q_UINT32 alpha = pixel -> alpha;
Q_UINT32 alpha = pixel->alpha;
Q_UINT32 alphaTimesWeight = UINT16_MULT(alpha, UINT8_TO_UINT16(*weights));
totalGray += UINT16_MULT(pixel -> gray, alphaTimesWeight);
totalGray += UINT16_MULT(pixel->gray, alphaTimesWeight);
newAlpha += alphaTimesWeight;
weights++;
......@@ -81,13 +81,13 @@ void KisGrayU16ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weig
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
dstPixel -> alpha = newAlpha;
dstPixel->alpha = newAlpha;
if (newAlpha > 0) {
totalGray = UINT16_DIVIDE(totalGray, newAlpha);
}
dstPixel -> gray = totalGray;
dstPixel->gray = totalGray;
}
void KisGrayU16ColorSpace::convolveColors(Q_UINT8** colors, Q_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst,
......@@ -477,7 +477,7 @@ void KisGrayU16ColorSpace::compositeErase(Q_UINT8 *dst,
for (Q_INT32 i = cols; i > 0; i--, s++, d++)
{
Q_UINT16 srcAlpha = s -> alpha;
Q_UINT16 srcAlpha = s->alpha;
// apply the alphamask
if (mask != 0) {
......@@ -488,7 +488,7 @@ void KisGrayU16ColorSpace::compositeErase(Q_UINT8 *dst,
}
mask++;
}
d -> alpha = UINT16_MULT(srcAlpha, d -> alpha);
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
dst += dstRowSize;
......
......@@ -63,7 +63,7 @@ GrayPlugin::GrayPlugin(QObject *parent, const char *name, const QStringList &)
f->add(csf);
KisHistogramProducerFactoryRegistry::instance() -> add(
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer>
(KisID("GRAYA8HISTO", i18n("GRAY/Alpha8 Histogram")), colorSpaceGrayA) );
}
......
......@@ -55,26 +55,26 @@ void KisGrayColorSpaceTester::testBasics()
pixel[KisGrayColorSpace::PIXEL_GRAY] = 255;
pixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 128;
QString valueText = cs -> channelValueText(pixel, GRAY_CHANNEL);
QString valueText = cs->channelValueText(pixel, GRAY_CHANNEL);
CHECK(valueText, QString("255"));
valueText = cs -> channelValueText(pixel, ALPHA_CHANNEL);
valueText = cs->channelValueText(pixel, ALPHA_CHANNEL);
CHECK(valueText, QString("128"));
valueText = cs -> normalisedChannelValueText(pixel, GRAY_CHANNEL);
valueText = cs->normalisedChannelValueText(pixel, GRAY_CHANNEL);
CHECK(valueText, QString().setNum(1.0));
valueText = cs -> normalisedChannelValueText(pixel, ALPHA_CHANNEL);
valueText = cs->normalisedChannelValueText(pixel, ALPHA_CHANNEL);
CHECK(valueText, QString().setNum(128.0 / 255.0));
cs -> setPixel(pixel, 128, 192l);
cs->setPixel(pixel, 128, 192l);
CHECK((uint)pixel[KisGrayColorSpace::PIXEL_GRAY], 128u);
CHECK((uint)pixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 192u);
Q_UINT8 gray;
Q_UINT8 alpha;
cs -> getPixel(pixel, &gray, &alpha);
cs->getPixel(pixel, &gray, &alpha);
CHECK((uint)gray, 128u);
CHECK((uint)alpha, 192u);
......@@ -105,7 +105,7 @@ void KisGrayColorSpaceTester::testMixColors()
weights[0] = 255;
weights[1] = 0;
cs -> mixColors(pixelPtrs, weights, 2, outputPixel);
cs->mixColors(pixelPtrs, weights, 2, outputPixel);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY], 255);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 255);
......@@ -113,7 +113,7 @@ void KisGrayColorSpaceTester::testMixColors()
weights[0] = 0;
weights[1] = 255;
cs -> mixColors(pixelPtrs, weights, 2, outputPixel);
cs->mixColors(pixelPtrs, weights, 2, outputPixel);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY], 0);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 0);
......@@ -121,7 +121,7 @@ void KisGrayColorSpaceTester::testMixColors()
weights[0] = 128;
weights[1] = 127;
cs -> mixColors(pixelPtrs, weights, 2, outputPixel);
cs->mixColors(pixelPtrs, weights, 2, outputPixel);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY], 255);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 128);
......@@ -132,7 +132,7 @@ void KisGrayColorSpaceTester::testMixColors()
pixel2[KisGrayColorSpace::PIXEL_GRAY] = 100;
pixel2[KisGrayColorSpace::PIXEL_GRAY_ALPHA] = 255;
cs -> mixColors(pixelPtrs, weights, 2, outputPixel);
cs->mixColors(pixelPtrs, weights, 2, outputPixel);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY], 150);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 255);
......@@ -146,7 +146,7 @@ void KisGrayColorSpaceTester::testMixColors()
weights[0] = 89;
weights[1] = 166;
cs -> mixColors(pixelPtrs, weights, 2, outputPixel);
cs->mixColors(pixelPtrs, weights, 2, outputPixel);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY], 255);
CHECK((int)outputPixel[KisGrayColorSpace::PIXEL_GRAY_ALPHA], 165);
......
......@@ -67,54 +67,54 @@ void KisLmsF32ColorSpace::setPixel(Q_UINT8 *dst, float longWave, float middleWav
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
dstPixel -> longWave = longWave;
dstPixel -> middleWave = middleWave;
dstPixel -> shortWave = shortWave;
dstPixel -> alpha = alpha;
dstPixel->longWave = longWave;
dstPixel->middleWave = middleWave;
dstPixel->shortWave = shortWave;
dstPixel->alpha = alpha;
}
void KisLmsF32ColorSpace::getPixel(const Q_UINT8 *src, float *longWave, float *middleWave, float *shortWave, float *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
*longWave = srcPixel -> longWave;
*middleWave = srcPixel -> middleWave;
*shortWave = srcPixel -> shortWave;
*alpha = srcPixel -> alpha;
*longWave = srcPixel->longWave;
*middleWave = srcPixel->middleWave;
*shortWave = srcPixel->shortWave;
*alpha = srcPixel->alpha;
}
void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile * /*profile*/)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst -> longWave = computeLong(c.red(),c.green(),c.blue());
dst -> middleWave = computeMiddle(c.red(),c.green(),c.blue());
dst -> shortWave = computeShort(c.red(),c.green(),c.blue());
dst->longWave = computeLong(c.red(),c.green(),c.blue());
dst->middleWave = computeMiddle(c.red(),c.green(),c.blue());
dst->shortWave = computeShort(c.red(),c.green(),c.blue());
}
void KisLmsF32ColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile * /*profile*/)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst -> longWave = computeLong(c.red(),c.green(),c.blue());
dst -> middleWave = computeMiddle(c.red(),c.green(),c.blue());
dst -> shortWave = computeShort(c.red(),c.green(),c.blue());
dst -> alpha = UINT8_TO_FLOAT(opacity);
dst->longWave = computeLong(c.red(),c.green(),c.blue());
dst->middleWave = computeMiddle(c.red(),c.green(),c.blue());
dst->shortWave = computeShort(c.red(),c.green(),c.blue());
dst->alpha = UINT8_TO_FLOAT(opacity);
}
void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile * /*profile*/)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c -> setRgb(computeRed(src -> longWave,src -> middleWave,src -> shortWave), computeGreen(src -> longWave,src -> middleWave,src -> shortWave), computeBlue(src -> longWave,src -> middleWave,src -> shortWave));
c->setRgb(computeRed(src->longWave,src->middleWave,src->shortWave), computeGreen(src->longWave,src->middleWave,src->shortWave), computeBlue(src->longWave,src->middleWave,src->shortWave));
}
void KisLmsF32ColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile * /*profile*/)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c -> setRgb(computeRed(src -> longWave,src -> middleWave,src -> shortWave), computeGreen(src -> longWave,src -> middleWave,src -> shortWave), computeBlue(src -> longWave,src -> middleWave,src -> shortWave));
*opacity = FLOAT_TO_UINT8(src -> alpha);
c->setRgb(computeRed(src->longWave,src->middleWave,src->shortWave), computeGreen(src->longWave,src->middleWave,src->shortWave), computeBlue(src->longWave,src->middleWave,src->shortWave));
*opacity = FLOAT_TO_UINT8(src->alpha);
}
Q_UINT8 KisLmsF32ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
......@@ -122,9 +122,9 @@ Q_UINT8 KisLmsF32ColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *sr
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);
const Pixel *src2 = reinterpret_cast<const Pixel *>(src2U8);
return FLOAT_TO_UINT8(QMAX(QABS(src2 -> longWave - src1 -> longWave),
QMAX(QABS(src2 -> middleWave - src1 -> middleWave),
QABS(src2 -> shortWave - src1 -> shortWave))));
return FLOAT_TO_UINT8(QMAX(QABS(src2->longWave - src1->longWave),
QMAX(QABS(src2->middleWave - src1->middleWave),
QABS(src2->shortWave - src1->shortWave))));
}
void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const
......@@ -135,12 +135,12 @@ void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh
{
const Pixel *pixel = reinterpret_cast<const Pixel *>(*colors);
float alpha = pixel -> alpha;
float alpha = pixel->alpha;
float alphaTimesWeight = alpha * UINT8_TO_FLOAT(*weights);
totalLong += pixel -> longWave * alphaTimesWeight;
totalMiddle += pixel -> middleWave * alphaTimesWeight;
totalShort += pixel -> shortWave * alphaTimesWeight;
totalLong += pixel->longWave * alphaTimesWeight;
totalMiddle += pixel->middleWave * alphaTimesWeight;
totalShort += pixel->shortWave * alphaTimesWeight;
newAlpha += alphaTimesWeight;
weights++;
......@@ -151,7 +151,7 @@ void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
dstPixel -> alpha = newAlpha;
dstPixel->alpha = newAlpha;
if (newAlpha > EPSILON) {
totalLong = totalLong / newAlpha;
......@@ -159,9 +159,9 @@ void KisLmsF32ColorSpace::mixColors(const Q_UINT8 **colors, const Q_UINT8 *weigh
totalShort = totalShort / newAlpha;
}
dstPixel -> longWave = totalLong;
dstPixel -> middleWave = totalMiddle;
dstPixel -> shortWave = totalShort;
dstPixel->longWave = totalLong;
dstPixel->middleWave = totalMiddle;
dstPixel->shortWave = totalShort;
}
QValueVector<KisChannelInfo *> KisLmsF32ColorSpace::channels() const
......@@ -318,7 +318,7 @@ void KisLmsF32ColorSpace::compositeErase(Q_UINT8 *dst,
for (Q_INT32 i = cols; i > 0; i--, s++, d++)
{
float srcAlpha = s -> alpha;
float srcAlpha = s->alpha;
// apply the alphamask
if (mask != 0) {
......@@ -329,7 +329,7 @@ void KisLmsF32ColorSpace::compositeErase(Q_UINT8 *dst,
}
mask++;
}
d -> alpha = srcAlpha * d -> alpha;
d->alpha = srcAlpha * d->alpha;
}
dst += dstRowSize;
......
......@@ -48,9 +48,9 @@ LMSF32Plugin::LMSF32Plugin(QObject *parent, const char *name, const QStringList
KisColorSpace * colorSpaceLMSF32 = new KisLmsF32ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisLmsF32ColorSpaceFactory();
f -> add(csf);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance() -> add(
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicF32HistogramProducer>
(KisID("LMSF32HISTO", i18n("Float32 Histogram")), colorSpaceLMSF32) );
}
......
......@@ -67,54 +67,54 @@ void KisRgbF16HalfColorSpace::setPixel(Q_UINT8 *dst, half red, half green, half
{
Pixel *dstPixel = reinterpret_cast<Pixel *>(dst);
dstPixel -> red = red;
dstPixel -> green = green;
dstPixel -> blue = blue;
dstPixel -> alpha = alpha;
dstPixel->red = red;
dstPixel->green = green;
dstPixel->blue = blue;
dstPixel->alpha = alpha;
}
void KisRgbF16HalfColorSpace::getPixel(const Q_UINT8 *src, half *red, half *green, half *blue, half *alpha) const
{
const Pixel *srcPixel = reinterpret_cast<const Pixel *>(src);
*red = srcPixel -> red;
*green = srcPixel -> green;
*blue = srcPixel -> blue;
*alpha = srcPixel -> alpha;
*red = srcPixel->red;
*green = srcPixel->green;
*blue = srcPixel->blue;
*alpha = srcPixel->alpha;
}
void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 *dstU8, KisProfile *)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst -> red = UINT8_TO_HALF(c.red());
dst -> green = UINT8_TO_HALF(c.green());
dst -> blue = UINT8_TO_HALF(c.blue());
dst->red = UINT8_TO_HALF(c.red());
dst->green = UINT8_TO_HALF(c.green());
dst->blue = UINT8_TO_HALF(c.blue());
}
void KisRgbF16HalfColorSpace::fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dstU8, KisProfile *)
{
Pixel *dst = reinterpret_cast<Pixel *>(dstU8);
dst -> red = UINT8_TO_HALF(c.red());
dst -> green = UINT8_TO_HALF(c.green());
dst -> blue = UINT8_TO_HALF(c.blue());
dst -> alpha = UINT8_TO_HALF(opacity);
dst->red = UINT8_TO_HALF(c.red());
dst->green = UINT8_TO_HALF(c.green());
dst->blue = UINT8_TO_HALF(c.blue());
dst->alpha = UINT8_TO_HALF(opacity);
}
void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, KisProfile *)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c -> setRgb(HALF_TO_UINT8(src -> red), HALF_TO_UINT8(src -> green), HALF_TO_UINT8(src -> blue));
c->setRgb(HALF_TO_UINT8(src->red), HALF_TO_UINT8(src->green), HALF_TO_UINT8(src->blue));
}
void KisRgbF16HalfColorSpace::toQColor(const Q_UINT8 *srcU8, QColor *c, Q_UINT8 *opacity, KisProfile *)
{
const Pixel *src = reinterpret_cast<const Pixel *>(srcU8);
c -> setRgb(HALF_TO_UINT8(src -> red), HALF_TO_UINT8(src -> green), HALF_TO_UINT8(src -> blue));
*opacity = HALF_TO_UINT8(src -> alpha);
c->setRgb(HALF_TO_UINT8(src->red), HALF_TO_UINT8(src->green), HALF_TO_UINT8(src->blue));
*opacity = HALF_TO_UINT8(src->alpha);
}
Q_UINT8 KisRgbF16HalfColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8 *src2U8)
......@@ -122,9 +122,9 @@ Q_UINT8 KisRgbF16HalfColorSpace::difference(const Q_UINT8 *src1U8, const Q_UINT8
const Pixel *src1 = reinterpret_cast<const Pixel *>(src1U8);