Lines Matching refs:UInt32

39 #define kTopValue ((UInt32)1 << kNumTopBits)
75 UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) in LzmaEncProps_GetDictSize()
92 UInt32 GetPosSlot1(UInt32 pos) in GetPosSlot1()
94 UInt32 res; in GetPosSlot1()
114 UInt32 k = (1 << ((slotFast >> 1) - 1)); in LzmaEnc_FastPosInit()
115 UInt32 j; in LzmaEnc_FastPosInit()
121 #define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \
122 (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \
143 UInt32 price;
149 UInt32 posPrev2;
150 UInt32 backPrev2;
152 UInt32 posPrev;
153 UInt32 backPrev;
154 UInt32 backs[LZMA_NUM_REPS];
177 #define CLzmaProb UInt32
215 UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
216 UInt32 tableSize;
217 UInt32 counters[LZMA_NUM_PB_STATES_MAX];
222 UInt32 range;
272 UInt32 reps[LZMA_NUM_REPS];
273 UInt32 state;
292 UInt32 optimumEndIndex;
293 UInt32 optimumCurrentIndex;
295 UInt32 longestMatchLength;
296 UInt32 numPairs;
297 UInt32 numAvail;
304 UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
305 UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
306 UInt32 numFastBytes;
307 UInt32 additionalOffset;
308 UInt32 reps[LZMA_NUM_REPS];
309 UInt32 state;
311 UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
312 UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
313 UInt32 alignPrices[kAlignTableSize];
314 UInt32 alignPriceCount;
316 UInt32 distTableSize;
345 UInt32 matchPriceCount;
350 UInt32 dictSize;
351 UInt32 matchFinderCycles;
436 UInt32 numHashBytes = 4; in LzmaEnc_SetProps()
531 if ((UInt32)p->low < (UInt32)0xFF000000 || (int)(p->low >> 32) != 0) in RangeEnc_ShiftLow()
544 p->cache = (Byte)((UInt32)p->low >> 24); in RangeEnc_ShiftLow()
547 p->low = (UInt32)p->low << 8; in RangeEnc_ShiftLow()
557 static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int numBits) in RangeEnc_EncodeDirectBits()
572 static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol) in RangeEnc_EncodeBit()
574 UInt32 ttt = *prob; in RangeEnc_EncodeBit()
575 UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt; in RangeEnc_EncodeBit()
595 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol) in LitEnc_Encode()
606 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte) in LitEnc_EncodeMatched()
608 UInt32 offs = 0x100; in LitEnc_EncodeMatched()
620 void LzmaEnc_InitPriceTables(UInt32 *ProbPrices) in LzmaEnc_InitPriceTables()
622 UInt32 i; in LzmaEnc_InitPriceTables()
626 UInt32 w = i; in LzmaEnc_InitPriceTables()
627 UInt32 bitCount = 0; in LzmaEnc_InitPriceTables()
633 while (w >= ((UInt32)1 << 16)) in LzmaEnc_InitPriceTables()
656 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices) in LitEnc_GetPrice()
658 UInt32 price = 0; in LitEnc_GetPrice()
669 static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt3… in LitEnc_GetPriceMatched()
671 UInt32 price = 0; in LitEnc_GetPriceMatched()
672 UInt32 offs = 0x100; in LitEnc_GetPriceMatched()
686 static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) in RcTree_Encode()
688 UInt32 m = 1; in RcTree_Encode()
692 UInt32 bit; in RcTree_Encode()
700 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) in RcTree_ReverseEncode()
702 UInt32 m = 1; in RcTree_ReverseEncode()
706 UInt32 bit = symbol & 1; in RcTree_ReverseEncode()
713 static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *Prob… in RcTree_GetPrice()
715 UInt32 price = 0; in RcTree_GetPrice()
725 static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt3… in RcTree_ReverseGetPrice()
727 UInt32 price = 0; in RcTree_ReverseGetPrice()
728 UInt32 m = 1; in RcTree_ReverseGetPrice()
732 UInt32 bit = symbol & 1; in RcTree_ReverseGetPrice()
753 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) in LenEnc_Encode()
776 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 in LenEnc_SetPrices()
778 UInt32 a0 = GET_PRICE_0a(p->choice); in LenEnc_SetPrices()
779 UInt32 a1 = GET_PRICE_1a(p->choice); in LenEnc_SetPrices()
780 UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); in LenEnc_SetPrices()
781 UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); in LenEnc_SetPrices()
782 UInt32 i = 0; in LenEnc_SetPrices()
799 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPric… in LenPriceEnc_UpdateTable()
805 static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices) in LenPriceEnc_UpdateTables()
807 UInt32 posState; in LenPriceEnc_UpdateTables()
812 … LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, in LenEnc_Encode2()
823 static void MovePos(CLzmaEnc *p, UInt32 num) in MovePos()
836 static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes) in ReadMatchDistances()
838 UInt32 lenRes = 0, numPairs; in ReadMatchDistances()
845 UInt32 i; in ReadMatchDistances()
856 UInt32 distance = p->matches[numPairs - 1] + 1; in ReadMatchDistances()
857 UInt32 numAvail = p->numAvail; in ReadMatchDistances()
872 #define MakeAsChar(p) (p)->backPrev = (UInt32)(-1); (p)->prev1IsChar = False;
876 static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState) in GetRepLen1Price()
883 static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState) in GetPureRepPrice()
885 UInt32 price; in GetPureRepPrice()
905 static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState) in GetRepPrice()
911 static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur) in Backward()
913 UInt32 posMem = p->opt[cur].posPrev; in Backward()
914 UInt32 backMem = p->opt[cur].backPrev; in Backward()
930 UInt32 posPrev = posMem; in Backward()
931 UInt32 backCur = backMem; in Backward()
949 static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes) in GetOptimum()
951 UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; in GetOptimum()
952 UInt32 matchPrice, repMatchPrice, normalMatchPrice; in GetOptimum()
953 UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS]; in GetOptimum()
954 UInt32 *matches; in GetOptimum()
960 UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex; in GetOptimum()
978 *backRes = (UInt32)(-1); in GetOptimum()
988 UInt32 lenTest; in GetOptimum()
1004 UInt32 lenRes; in GetOptimum()
1023 *backRes = (UInt32)-1; in GetOptimum()
1046 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); in GetOptimum()
1072 UInt32 repLen = repLens[i]; in GetOptimum()
1073 UInt32 price; in GetOptimum()
1079 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; in GetOptimum()
1097 UInt32 offs = 0; in GetOptimum()
1103 UInt32 distance = matches[offs + 1]; in GetOptimum()
1105UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; in GetOptimum()
1106 UInt32 lenToPosState = GetLenToPosState(len); in GetOptimum()
1111 UInt32 slot; in GetOptimum()
1146 UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; in GetOptimum()
1147 UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice; in GetOptimum()
1194 UInt32 pos; in GetOptimum()
1213 UInt32 i; in GetOptimum()
1222 UInt32 i; in GetOptimum()
1267 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); in GetOptimum()
1278 UInt32 temp = kNumOpts - 1 - cur; in GetOptimum()
1290 UInt32 temp; in GetOptimum()
1291 UInt32 lenTest2; in GetOptimum()
1293 UInt32 limit = p->numFastBytes + 1; in GetOptimum()
1301 UInt32 state2 = kLiteralNextStates[state]; in GetOptimum()
1302 UInt32 posStateNext = (position + 1) & p->pbMask; in GetOptimum()
1303 UInt32 nextRepMatchPrice = curAnd1Price + in GetOptimum()
1308 UInt32 curAndLenPrice; in GetOptimum()
1310 UInt32 offset = cur + 1 + lenTest2; in GetOptimum()
1329 UInt32 repIndex; in GetOptimum()
1332 UInt32 lenTest; in GetOptimum()
1333 UInt32 lenTestTemp; in GetOptimum()
1334 UInt32 price; in GetOptimum()
1345 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; in GetOptimum()
1363 UInt32 lenTest2 = lenTest + 1; in GetOptimum()
1364 UInt32 limit = lenTest2 + p->numFastBytes; in GetOptimum()
1365 UInt32 nextRepMatchPrice; in GetOptimum()
1372 UInt32 state2 = kRepNextStates[state]; in GetOptimum()
1373 UInt32 posStateNext = (position + lenTest) & p->pbMask; in GetOptimum()
1374 UInt32 curAndLenCharPrice = in GetOptimum()
1387 UInt32 curAndLenPrice; in GetOptimum()
1389 UInt32 offset = cur + lenTest + 1 + lenTest2; in GetOptimum()
1419 UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); in GetOptimum()
1420 UInt32 offs, curBack, posSlot; in GetOptimum()
1421 UInt32 lenTest; in GetOptimum()
1432UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN… in GetOptimum()
1433 UInt32 lenToPosState = GetLenToPosState(lenTest); in GetOptimum()
1453 UInt32 lenTest2 = lenTest + 1; in GetOptimum()
1454 UInt32 limit = lenTest2 + p->numFastBytes; in GetOptimum()
1455 UInt32 nextRepMatchPrice; in GetOptimum()
1462 UInt32 state2 = kMatchNextStates[state]; in GetOptimum()
1463 UInt32 posStateNext = (position + lenTest) & p->pbMask; in GetOptimum()
1464 UInt32 curAndLenCharPrice = curAndLenPrice + in GetOptimum()
1476 UInt32 offset = cur + lenTest + 1 + lenTest2; in GetOptimum()
1477 UInt32 curAndLenPrice; in GetOptimum()
1509 static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes) in GetOptimumFast()
1511 UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i; in GetOptimumFast()
1513 const UInt32 *matches; in GetOptimumFast()
1524 *backRes = (UInt32)-1; in GetOptimumFast()
1534 UInt32 len; in GetOptimumFast()
1592 UInt32 newDistance = matches[p->numPairs - 1]; in GetOptimumFast()
1603 UInt32 len, limit; in GetOptimumFast()
1617 static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) in WriteEndMarker()
1619 UInt32 len; in WriteEndMarker()
1626 RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits); in WriteEndMarker()
1643 static SRes Flush(CLzmaEnc *p, UInt32 nowPos) in Flush()
1656 UInt32 i; in FillAlignPrices()
1664 UInt32 tempPrices[kNumFullDistances]; in FillDistancesPrices()
1665 UInt32 i, lenToPosState; in FillDistancesPrices()
1668 UInt32 posSlot = GetPosSlot1(i); in FillDistancesPrices()
1669 UInt32 footerBits = ((posSlot >> 1) - 1); in FillDistancesPrices()
1670 UInt32 base = ((2 | (posSlot & 1)) << footerBits); in FillDistancesPrices()
1676 UInt32 posSlot; in FillDistancesPrices()
1678 UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState]; in FillDistancesPrices()
1685 UInt32 *distancesPrices = p->distancesPrices[lenToPosState]; in FillDistancesPrices()
1686 UInt32 i; in FillDistancesPrices()
1753 static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackS… in LzmaEnc_CodeOneBlock()
1755 UInt32 nowPos32, startPos32; in LzmaEnc_CodeOneBlock()
1767 nowPos32 = (UInt32)p->nowPos64; in LzmaEnc_CodeOneBlock()
1772 UInt32 numPairs; in LzmaEnc_CodeOneBlock()
1788 UInt32 pos, len, posState; in LzmaEnc_CodeOneBlock()
1800 if (len == 1 && pos == (UInt32)-1) in LzmaEnc_CodeOneBlock()
1829 UInt32 distance = p->reps[pos]; in LzmaEnc_CodeOneBlock()
1854 UInt32 posSlot; in LzmaEnc_CodeOneBlock()
1864 UInt32 footerBits = ((posSlot >> 1) - 1); in LzmaEnc_CodeOneBlock()
1865 UInt32 base = ((2 | (posSlot & 1)) << footerBits); in LzmaEnc_CodeOneBlock()
1866 UInt32 posReduced = pos - base; in LzmaEnc_CodeOneBlock()
1888 UInt32 processed; in LzmaEnc_CodeOneBlock()
1916 #define kBigHashDicLimit ((UInt32)1 << 24)
1918 static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) in LzmaEnc_Alloc()
1920 UInt32 beforeSize = kNumOpts; in LzmaEnc_Alloc()
1970 UInt32 i; in LzmaEnc_Init()
1980 UInt32 j; in LzmaEnc_Init()
1993 UInt32 num = 0x300 << (p->lp + p->lc); in LzmaEnc_Init()
2002 UInt32 j; in LzmaEnc_Init()
2041 static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *all… in LzmaEnc_AllocAndInit()
2043 UInt32 i; in LzmaEnc_AllocAndInit()
2044 for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++) in LzmaEnc_AllocAndInit()
2045 if (p->dictSize <= ((UInt32)1 << i)) in LzmaEnc_AllocAndInit()
2068 ISeqInStream *inStream, UInt32 keepWindowSize, in LzmaEnc_PrepareForLzma2()
2084 UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) in LzmaEnc_MemPrepare()
2126 UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) in LzmaEnc_GetNumAvailableBytes()
2139 Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) in LzmaEnc_CodeOneMemBlock()
2164 *unpackSize = (UInt32)(p->nowPos64 - nowPos64); in LzmaEnc_CodeOneMemBlock()
2210 UInt32 dictSize = p->dictSize; in LzmaEnc_WriteProperties()
2218 if (dictSize <= ((UInt32)2 << i)) in LzmaEnc_WriteProperties()
2223 if (dictSize <= ((UInt32)3 << i)) in LzmaEnc_WriteProperties()