better
This commit is contained in:
parent
271101edeb
commit
d9be882fe2
1 changed files with 2 additions and 4 deletions
|
@ -535,6 +535,7 @@ proc blitLineNormalSse2*(
|
||||||
oddMask = mm_set1_epi16(cast[int16](0xff00))
|
oddMask = mm_set1_epi16(cast[int16](0xff00))
|
||||||
div255 = mm_set1_epi16(cast[int16](0x8081))
|
div255 = mm_set1_epi16(cast[int16](0x8081))
|
||||||
vec255 = mm_set1_epi8(255)
|
vec255 = mm_set1_epi8(255)
|
||||||
|
vecAlpha255 = mm_set1_epi32(cast[int32]([0.uint8, 255, 0, 255]))
|
||||||
|
|
||||||
var i: int
|
var i: int
|
||||||
while i < len - 4:
|
while i < len - 4:
|
||||||
|
@ -553,10 +554,7 @@ proc blitLineNormalSse2*(
|
||||||
|
|
||||||
sourceAlpha = mm_or_si128(sourceAlpha, mm_srli_epi32(sourceAlpha, 16))
|
sourceAlpha = mm_or_si128(sourceAlpha, mm_srli_epi32(sourceAlpha, 16))
|
||||||
|
|
||||||
let multiplier = mm_sub_epi32(
|
let multiplier = mm_sub_epi32(vecAlpha255, sourceAlpha)
|
||||||
mm_set1_epi32(cast[int32]([0.uint8, 255, 0, 255])),
|
|
||||||
sourceAlpha
|
|
||||||
)
|
|
||||||
|
|
||||||
backdropEven = mm_mulhi_epu16(backdropEven, multiplier)
|
backdropEven = mm_mulhi_epu16(backdropEven, multiplier)
|
||||||
backdropOdd = mm_mulhi_epu16(backdropOdd, multiplier)
|
backdropOdd = mm_mulhi_epu16(backdropOdd, multiplier)
|
||||||
|
|
Loading…
Reference in a new issue