freerds: fix bitmap and surface bits encoding