From 1821c8ea9343aa672c6a1704f9bd51ed570bcf0e Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Tue, 21 Jun 2022 00:00:15 -0500 Subject: [PATCH] f --- src/pixie/images.nim | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pixie/images.nim b/src/pixie/images.nim index d448c18..250721f 100644 --- a/src/pixie/images.nim +++ b/src/pixie/images.nim @@ -412,18 +412,14 @@ proc applyOpacity*(target: Image | Mask, opacity: float32) {.raises: [].} = let index = i let values = mm_loadu_si128(target.data[index].addr) - if mm_movemask_epi8(mm_cmpeq_epi16(values, zeroVec)) != 0xffff: var valuesEven = mm_slli_epi16(values, 8) valuesOdd = mm_and_si128(values, oddMask) - valuesEven = mm_mulhi_epu16(valuesEven, opacityVec) valuesOdd = mm_mulhi_epu16(valuesOdd, opacityVec) - valuesEven = mm_srli_epi16(mm_mulhi_epu16(valuesEven, div255), 7) valuesOdd = mm_srli_epi16(mm_mulhi_epu16(valuesOdd, div255), 7) - mm_storeu_si128( target.data[index].addr, mm_or_si128(valuesEven, mm_slli_epi16(valuesOdd, 8))