optimizing residual_coding