Commit e1b6c42e authored by Jim Bankoski's avatar Jim Bankoski
Browse files

partition plane context speed up

Removes silly operations inside loop.

Change-Id: I9eeab1e914e715a887f86cf1089de508e2364165
parent ffb17e2c
......@@ -337,13 +337,12 @@ static INLINE int partition_plane_context(
assert(bsl >= 0);
assert(boffset >= 0);
for (i = 0; i < bs; i++)
above |= (above_ctx[i] & (1 << boffset));
for (i = 0; i < bs; i++)
left |= (left_ctx[i] & (1 << boffset));
above = (above > 0);
left = (left > 0);
for (i = 0; i < bs; i++) {
above |= above_ctx[i];
left |= left_ctx[i];
}
above = (above & (1 << boffset)) > 0;
left = (left & (1 << boffset)) > 0;
return (left * 2 + above) + bsl * PARTITION_PLOFFSET;
}
......
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