Bitrate calculation based on uofw implementation.