}
byte[] encodedBlock = useSVC2 ?
ScreenVideoEncoder.encodePixelsSVC2(pixelsCopy, getWidth(), getHeight()) :
ScreenVideoEncoder.encodePixels(pixelsCopy, getWidth(), getHeight(), (sentCount.longValue() < 5) /* send grayscale image */);
return new EncodedBlockData(position, encodedBlock);
}