Encoder to support 24 and 32 bpp