n</span> p <span class="keyword">else</span> widthMinus1)) &lt;&lt; <span class="number">2</span>

          r_in_sum += (stackIn.r = pixels[p])
          g_in_sum += (stackIn.g = pixels[p + <span class="number">1</span>])
          b_in_sum += (stackIn.b = pixels[p + <span class="number">2</span>])

          r_sum += r_in_sum
          g_sum += g_in_sum
          b_sum += b_in_sum

          stackIn = stackIn.next

          r_out_sum += (pr = stackOut.r)
          g_out_sum += (pg = stackOut.g)
         