ref: e1b6c42eed8d9526d62539afcb607925a91a2a1c
parent: ffb17e2c09c3e6de00b07da6e35f47e2ff6c7952
author: Jim Bankoski <[email protected]>
date: Fri Nov 15 03:00:43 EST 2013
partition plane context speed up Removes silly operations inside loop. Change-Id: I9eeab1e914e715a887f86cf1089de508e2364165
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -337,13 +337,12 @@
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;
}