nal/cabac refactoring