Home | History | Annotate | Download | only in C

Lines Matching refs:symbol

602 static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol)

606 if (symbol == 0)
625 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol)
627 symbol |= 0x100;
630 RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1);
631 symbol <<= 1;
633 while (symbol < 0x10000);
636 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte)
639 symbol |= 0x100;
643 RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1);
644 symbol <<= 1;
645 symbol);
647 while (symbol < 0x10000);
674 #define GET_PRICE(prob, symbol) \
675 p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
677 #define GET_PRICEa(prob, symbol) \
678 ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
686 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, const UInt32 *ProbPrices)
689 symbol |= 0x100;
692 price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1);
693 symbol <<= 1;
695 while (symbol < 0x10000);
699 static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, const UInt32 *ProbPrices)
703 symbol |= 0x100;
707 price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1);
708 symbol <<= 1;
709 offs &= ~(matchByte ^ symbol);
711 while (symbol < 0x10000);
716 static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
724 bit = (symbol >> i) & 1;
730 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
736 UInt32 bit = symbol & 1;
739 symbol >>= 1;
743 static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, const UInt32 *ProbPrices)
746 symbol |= (1 << numBitLevels);
747 while (symbol != 1)
749 price += GET_PRICEa(probs[symbol >> 1], symbol & 1);
750 symbol >>= 1;
755 static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, const UInt32 *ProbPrices)
762 UInt32 bit = symbol & 1;
763 symbol >>= 1;
783 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)
785 if (symbol < kLenNumLowSymbols)
788 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol);
793 if (symbol < kLenNumLowSymbols + kLenNumMidSymbols)
796 RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols);
801 RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols);
842 static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, const UInt32 *ProbPrices)
844 LenEnc_Encode(&p->p, rc, symbol, posState);