Fix issue with quantization matrix optimization

Update quantization matrix in trellis loop