<p></p>
<p dir="auto">This is implemented here: <a href="https://source.squeak.org/VMMaker/VMMaker.oscog-nice.3251.diff" rel="nofollow">https://source.squeak.org/VMMaker/VMMaker.oscog-nice.3251.diff</a></p>
<p dir="auto">The algorithm is slightly modified to cope with 5-bits RGB channels in 16bits depth.<br><br>
We still have to handle that case in two half-words and care for the shift of odd channels (green) in the upper half-word:<br><br>
it must leave enough room (nBits) for double precision red1*red2, which will leak in upper half-word...</p>
<p dir="auto">Exhaustive tests are also provided for each and every channel combination.</p>
<p dir="auto">Note that many operations (forming the masks) are repeated at each word of the bitmap, so we could probably accelerate things with additional static variables...</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/651#issuecomment-1227490067">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW7MYXQXI3OR7NWKCT3V26MJPANCNFSM57SPOYNQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AIJPEWZ65RVVEUJOI4BKARDV26MJPA5CNFSM57SPOYN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJEVAGEY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><OpenSmalltalk/opensmalltalk-vm/issues/651/1227490067</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/651#issuecomment-1227490067",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/651#issuecomment-1227490067",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>