add features for each ancestor of the output frame