Prepare code to adaptive quantization in bar