ref: 8eed0b67610b91b82c46c639079f7f14e5a08704
parent: 690ed6881305c9ba403b5d62f3c40698d15bfe99
author: Ronald S. Bultje <rsbultje@gmail.com>
date: Tue Oct 23 03:49:01 EDT 2018
Order skipmode references incrementally This is identical to what libaom does. Fixes #65.
--- a/src/obu.c
+++ b/src/obu.c
@@ -788,14 +788,14 @@
}
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;
}
}