compute sub pixel iterations