Lines Matching defs:sym
789 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym)
792 sym |= 0x100;
796 // RangeEnc_EncodeBit(p, probs + (sym >> 8), (sym >> 7) & 1);
797 CLzmaProb *prob = probs + (sym >> 8);
798 UInt32 bit = (sym >> 7) & 1;
799 sym <<= 1;
802 while (sym < 0x10000);
806 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte)
810 sym |= 0x100;
817 // RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (sym >> 8)), (sym >> 7) & 1);
818 prob = probs + (offs + (matchByte & offs) + (sym >> 8));
819 bit = (sym >> 7) & 1;
820 sym <<= 1;
821 offs &= ~(matchByte ^ sym);
824 while (sym < 0x10000);
868 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices)
871 sym |= 0x100;
874 unsigned bit = sym & 1;
875 sym >>= 1;
876 price += GET_PRICEa(probs[sym], bit);
878 while (sym >= 2);
883 static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const CProbPrice *ProbPrices)
887 sym |= 0x100;
891 price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1);
892 sym <<= 1;
893 offs &= ~(matchByte ^ sym);
895 while (sym < 0x10000);
900 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym)
907 unsigned bit = sym & 1;
909 sym >>= 1;
928 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posState)
934 if (sym >= kLenNumLowSymbols)
939 if (sym >= kLenNumLowSymbols * 2)
943 // RcTree_Encode(rc, p->high, kLenNumHighBits, sym - kLenNumLowSymbols * 2);
944 LitEnc_Encode(rc, p->high, sym - kLenNumLowSymbols * 2);
947 sym -= kLenNumLowSymbols;
950 // RcTree_Encode(rc, probs + (posState << kLenNumLowBits), kLenNumLowBits, sym);
956 bit = (sym >> 2) ; RC_BIT(rc, probs + 1, bit) m = (1 << 1) + bit;
957 bit = (sym >> 1) & 1; RC_BIT(rc, probs + m, bit) m = (m << 1) + bit;
958 bit = sym & 1; RC_BIT(rc, probs + m, bit)
1038 // UInt32 price = a + RcTree_GetPrice(probs, kLenNumHighBits - 1, sym, ProbPrices);
1039 unsigned sym = --i + (1 << (kLenNumHighBits - 1));
1043 unsigned bit = sym & 1;
1044 sym >>= 1;
1045 price += GET_PRICEa(probs[sym], bit);
1047 while (sym >= 2);
2211 unsigned sym = i;
2215 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit;
2216 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit;
2217 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit;
2245 unsigned sym = i;
2252 unsigned bit = sym & 1;
2253 sym >>= 1;
2278 unsigned sym = slot + (1 << (kNumPosSlotBits - 1));
2280 bit = sym & 1; sym >>= 1; price = GET_PRICEa(probs[sym], bit);
2281 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit);
2282 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit);
2283 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit);
2284 bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit);
2564 UInt32 sym = (UInt32)posSlot + (1 << kNumPosSlotBits);
2569 CLzmaProb *prob = probs + (sym >> kNumPosSlotBits);
2570 UInt32 bit = (sym >> (kNumPosSlotBits - 1)) & 1;
2571 sym <<= 1;
2574 while (sym < (1 << kNumPosSlotBits * 2));