avx/neon: remove double increment of the value

The span was incremented both in the for loop instruction
(ARRAY_FOREACH) and inside the loop body. Fixed.

@Issue: https://github.com/thorvg/thorvg/issues/3547
This commit is contained in:
Mira Grudzinska 2025-06-18 00:33:08 +02:00 committed by Hermet Park
parent 5cced60daa
commit b8ef2d44d9
2 changed files with 0 additions and 4 deletions

View file

@ -204,8 +204,6 @@ static bool avxRasterTranslucentRle(SwSurface* surface, const SwRle* rle, const
*dst = src + ALPHA_BLEND(*dst, ialpha); *dst = src + ALPHA_BLEND(*dst, ialpha);
dst++; dst++;
} }
++span;
} }
//8bit grayscale //8bit grayscale
} else if (surface->channelSize == sizeof(uint8_t)) { } else if (surface->channelSize == sizeof(uint8_t)) {

View file

@ -123,8 +123,6 @@ static bool neonRasterTranslucentRle(SwSurface* surface, const SwRle* rle, const
auto leftovers = (span->len - align) % 2; auto leftovers = (span->len - align) % 2;
if (leftovers > 0) dst[span->len - 1] = src + ALPHA_BLEND(dst[span->len - 1], ialpha); if (leftovers > 0) dst[span->len - 1] = src + ALPHA_BLEND(dst[span->len - 1], ialpha);
++span;
} }
//8bit grayscale //8bit grayscale
} else if (surface->channelSize == sizeof(uint8_t)) { } else if (surface->channelSize == sizeof(uint8_t)) {