Efficient labeling procedures for image partition encoding