Lines Matching defs:prim
2656 * @param $prim (int) primitive element to generate polynomial roots
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>.
2661 protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
2664 OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) {
2669 $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad);
2697 * @param $prim (int) primitive element to generate polynomial roots
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>.
2702 protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
2712 if (($prim <= 0) OR ($prim >= (1<<$symsize))) {
2750 $rs['prim'] = $prim;
2753 // Find prim-th root of 1, used in decoding
2754 for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) {
2757 $rs['iprim'] = (int)($iprim / $prim);
2759 for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
2794 $PRIM =& $rs['prim']; // primitive element, index form
2795 $IPRIM =& $rs['iprim']; // prim-th root of 1, index form