[Panda] Modify bit allocation algorithm