adpcm: Avoid reading out of bounds in the IMA QT trellis encoder