Sample reference coding