st/dri: replace format conversion functions with single mapping table