private int calculatePitch(int width, int blockDev, int channels) { return (width / blockDev) * channels; }