Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
egecetin committed Nov 8, 2022
1 parent 1a0c0e9 commit 6ded2aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/kaleidoscope.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,13 @@ void processKaleidoscope(KaleidoscopeHandle *handler, double k, ImageData *imgIn
// Dim image
for (idx = 0; idx < nPixels; ++idx, ++destPtr, ++srcPtr)
*destPtr = (unsigned char)((*srcPtr) * k);
for (idx = 0; idx < handler->nPoints; ++idx)
for (idx = 0; idx < handler->nPoints; ++idx, ++ptrTransform)
{
unsigned long long srcIdx =
ptrTransform->srcLocation.y * multiplier2 + ptrTransform->srcLocation.x * multiplier1;
unsigned long long dstIdx =
ptrTransform->dstLocation.y * multiplier2 + ptrTransform->dstLocation.x * multiplier1;
memcpy(&(imgOut->data[dstIdx]), &(imgIn->data[srcIdx]), multiplier1);
++ptrTransform;
}
}

Expand Down

0 comments on commit 6ded2aa

Please sign in to comment.