Skip to content

Segmentation map reference logic

Rupert Swarbrick requested to merge rswarbrick-argon/dav1d:bug-169-segmap into master

The previous code raised an error if !segmentation.update_map but the reference frame didn't yield any segmentation data. (The first "goto error" that the patch removes happens if the reference frame was the right size but had no segmentation data; the second happens if the reference frame was the wrong size).

This doesn't match the logic in the description of load_previous_segment_ids in section 6.8.2 of the spec.

This patch allows such streams, allocating and zeroing cur_segmap in this case. It is still an error for a stream to signal a temporal update but not to have valid segmentation data from the ref frame - that's the error case that the patch puts back in.

Edited by Rupert Swarbrick

Merge request reports