Adaptive bit assignment for audio encoder and decoder