sgienc: Support encoding high bit depth images with RLE