Lines Matching defs:symbol

553 static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol)
557 if (symbol == 0)
576 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol)
578 symbol |= 0x100;
581 RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1);
582 symbol <<= 1;
584 while (symbol < 0x10000);
587 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte)
590 symbol |= 0x100;
594 RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1);
595 symbol <<= 1;
596 offs &= ~(matchByte ^ symbol);
598 while (symbol < 0x10000);
625 #define GET_PRICE(prob, symbol) \
626 p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
628 #define GET_PRICEa(prob, symbol) \
629 ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
637 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices)
640 symbol |= 0x100;
643 price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1);
644 symbol <<= 1;
646 while (symbol < 0x10000);
650 static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices)
654 symbol |= 0x100;
658 price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1);
659 symbol <<= 1;
660 offs &= ~(matchByte ^ symbol);
662 while (symbol < 0x10000);
667 static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
675 bit = (symbol >> i) & 1;
681 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
687 UInt32 bit = symbol & 1;
690 symbol >>= 1;
694 static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
697 symbol |= (1 << numBitLevels);
698 while (symbol != 1)
700 price += GET_PRICEa(probs[symbol >> 1], symbol & 1);
701 symbol >>= 1;
706 static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
713 UInt32 bit = symbol & 1;
714 symbol >>= 1;
734 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)
736 if (symbol < kLenNumLowSymbols)
739 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol);
744 if (symbol < kLenNumLowSymbols + kLenNumMidSymbols)
747 RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols);
752 RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols);
793 static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices)
795 LenEnc_Encode(&p->p, rc, symbol, posState);