bayer: generalize get_unit_size
This is a simple patch which generalize get_unit_size calculation. This will be useful when bayer plugins get 16-bit support in the future. This MR also fixes minor type inconsistencies in this method.
Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
This is a simple patch which generalize get_unit_size calculation. This will be useful when bayer plugins get 16-bit support in the future. This MR also fixes minor type inconsistencies in this method.