Commit 8eed0b67 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Jean-Baptiste Kempf

Order skipmode references incrementally

This is identical to what libaom does. Fixes #65.
parent 690ed688
......@@ -788,14 +788,14 @@ static int parse_frame_hdr(Dav1dContext *const c, GetBits *const gb,
}
if (off_before[0] != 0xFFFFFFFFU && off_after != -1) {
hdr->skip_mode_refs[0] = off_before_idx[0];
hdr->skip_mode_refs[1] = off_after_idx;
hdr->skip_mode_refs[0] = imin(off_before_idx[0], off_after_idx);
hdr->skip_mode_refs[1] = imax(off_before_idx[0], off_after_idx);
hdr->skip_mode_allowed = 1;
} else if (off_before[0] != 0xFFFFFFFFU &&
off_before[1] != 0xFFFFFFFFU)
{
hdr->skip_mode_refs[0] = off_before_idx[0];
hdr->skip_mode_refs[1] = off_before_idx[1];
hdr->skip_mode_refs[0] = imin(off_before_idx[0], off_before_idx[1]);
hdr->skip_mode_refs[1] = imax(off_before_idx[0], off_before_idx[1]);
hdr->skip_mode_allowed = 1;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment