svq1enc: fix out of bounds reads