Lines Matching refs:bstream
1468 * @param $bstream (array)
1471 protected function newInputItem($mode, $size, $data, $bstream=null) {
1483 $inputitem['bstream'] = $bstream;
1495 $inputitem['bstream'] = array();
1497 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val);
1498 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(self::QR_MODE_NM, $version), $inputitem['size']);
1503 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val);
1507 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val);
1511 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val);
1524 $inputitem['bstream'] = array();
1525 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02);
1526 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(self::QR_MODE_AN, $version), $inputitem['size']);
1530 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val);
1534 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val);
1546 $inputitem['bstream'] = array();
1547 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4);
1548 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(self::QR_MODE_8B, $version), $inputitem['size']);
1550 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i]));
1562 $inputitem['bstream'] = array();
1563 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8);
1564 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(self::QR_MODE_KJ, $version), (int)($inputitem['size'] / 2));
1574 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val);
1585 $inputitem['bstream'] = array();
1586 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03);
1587 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1);
1588 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1);
1589 $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2]));
1600 $inputitem['bstream'] = array();
1607 $inputitem['bstream'] = array();
1608 $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']);
1609 $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']);
1973 $bits = count($items[$key]['bstream']);
2010 * @param $bstream (array)
2013 protected function appendPaddingBit($bstream) {
2014 if (is_null($bstream)) {
2017 $bits = count($bstream);
2021 return $bstream;
2024 return $this->appendNum($bstream, $maxbits - $bits, 0);
2038 return $this->appendBitstream($bstream, $padding);
2051 $bstream = array();
2053 $bstream = $this->appendBitstream($bstream, $item['bstream']);
2055 return $bstream;
2064 $bstream = $this->mergeBitStream($items);
2065 return $this->appendPaddingBit($bstream);
2074 $bstream = $this->getBitStream($items);
2075 return $this->bitstreamToByte($bstream);
2098 $bstream = $this->allocate($bits);
2102 $bstream[$i] = 1;
2104 $bstream[$i] = 0;
2108 return $bstream;
2118 $bstream = $this->allocate($size * 8);
2124 $bstream[$p] = 1;
2126 $bstream[$p] = 0;
2132 return $bstream;
2183 * @param $bstream (array) original bitstream
2186 protected function bitstreamToByte($bstream) {
2187 if (is_null($bstream)) {
2190 $size = count($bstream);
2201 $v |= $bstream[$p];
2210 $v |= $bstream[$p];