Joint source and channel coding