Change PixelBuffer to PixelsBuffer, and make the pixel index calculation inline to have better performance;