Commit 1ccf6c1f authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Janne Grunau

Use max value for all trailing palette entries

Otherwise, if the non-last has a max value, the ones after it can go
beyond the allowed range. Fixes #95.
parent 7b101d4f
......@@ -426,7 +426,7 @@ static void read_pal_plane(Dav1dTileContext *const t, Av1Block *const b,
prev = pal[i++] = imin(prev + delta + !pl, max);
if (prev + !pl >= max) {
for (; i < pal_sz; i++)
pal[i] = pal[i - 1] + !pl;
pal[i] = max;
break;
}
bits = imin(bits, 1 + ulog2(max - prev - !pl));
......
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