scan the interval counts to get output offsets
Implement some serial code which works for a single segment