Trellis quantization