Consider negative differences in encodes channel as encodes

The current code breaks if there are two adjacent encodes and the
first is greater than the second.