simplify SAO edgeIdx computation by reordering the saoOffsetVal[] array