Lines Matching defs:symbol

598 static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol)
602 if (symbol == 0)
621 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol)
623 symbol |= 0x100;
626 RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1);
627 symbol <<= 1;
629 while (symbol < 0x10000);
632 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte)
635 symbol |= 0x100;
639 RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1);
640 symbol <<= 1;
641 offs &= ~(matchByte ^ symbol);
643 while (symbol < 0x10000);
670 #define GET_PRICE(prob, symbol) \
671 p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
673 #define GET_PRICEa(prob, symbol) \
674 ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
682 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices)
685 symbol |= 0x100;
688 price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1);
689 symbol <<= 1;
691 while (symbol < 0x10000);
695 static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices)
699 symbol |= 0x100;
703 price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1);
704 symbol <<= 1;
705 offs &= ~(matchByte ^ symbol);
707 while (symbol < 0x10000);
712 static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
720 bit = (symbol >> i) & 1;
726 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
732 UInt32 bit = symbol & 1;
735 symbol >>= 1;
739 static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
742 symbol |= (1 << numBitLevels);
743 while (symbol != 1)
745 price += GET_PRICEa(probs[symbol >> 1], symbol & 1);
746 symbol >>= 1;
751 static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
758 UInt32 bit = symbol & 1;
759 symbol >>= 1;
779 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)
781 if (symbol < kLenNumLowSymbols)
784 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol);
789 if (symbol < kLenNumLowSymbols + kLenNumMidSymbols)
792 RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols);
797 RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols);
838 static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices)
840 LenEnc_Encode(&p->p, rc, symbol, posState);