(y, x, h, w, bits)
| 77427 | var augumentbch = function (poly, p, genpoly, q) { |
| 77428 | var modulus = poly << q; |
| 77429 | for (var i = p - 1; i >= 0; --i) { |
| 77430 | if ((modulus >> (q + i)) & 1) |
| 77431 | modulus ^= genpoly << i; |
| 77432 | } |
| 77433 | return (poly << q) | modulus; |
| 77434 | }; |
| 77435 | |
| 77436 | // creates the base matrix for given version. it returns two matrices, one of |
| 77437 | // them is the actual one and the another represents the "reserved" portion |
| 77438 | // (e.g. finder and timing patterns) of the matrix. |
| 77439 | // |