Lines Matching refs:parity
1667 * @param $parity (int)
1670 protected function insertStructuredAppendHeader($items, $size, $index, $parity) {
1677 $buf = array($size, $index, $parity);
1686 * @return int parity
1689 $parity = 0;
1693 $parity ^= $item['data'][$i];
1697 return $parity;
2659 * @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
2700 * @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
2780 * Encode a Reed-Solomon codec and returns the parity array
2783 * @param $parity (array) parity
2784 * @return parity array
2786 protected function encode_rs_char($rs, $data, $parity) {
2792 $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block
2798 $parity = array_fill(0, $NROOTS, 0);
2800 $feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
2807 $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])];
2811 array_shift($parity);
2813 array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]);
2815 array_push($parity, 0);
2818 return $parity;