• Home
  • Raw
  • Download

Lines Matching refs:UInt32

36 #define kTopValue ((UInt32)1 << kNumTopBits)
67 if ((UInt32)p->reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; } in LzmaEncProps_Normalize()
68 if ((UInt32)p->reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; } in LzmaEncProps_Normalize()
88 UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) in LzmaEncProps_GetDictSize()
105 UInt32 GetPosSlot1(UInt32 pos) in GetPosSlot1()
107 UInt32 res; in GetPosSlot1()
127 UInt32 k = (1 << ((slotFast >> 1) - 1)); in LzmaEnc_FastPosInit()
128 UInt32 j; in LzmaEnc_FastPosInit()
134 #define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \
135 (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \
156 UInt32 price;
162 UInt32 posPrev2;
163 UInt32 backPrev2;
165 UInt32 posPrev;
166 UInt32 backPrev;
167 UInt32 backs[LZMA_NUM_REPS];
190 #define CLzmaProb UInt32
228 UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
229 UInt32 tableSize;
230 UInt32 counters[LZMA_NUM_PB_STATES_MAX];
235 UInt32 range;
265 UInt32 reps[LZMA_NUM_REPS];
266 UInt32 state;
285 UInt32 optimumEndIndex;
286 UInt32 optimumCurrentIndex;
288 UInt32 longestMatchLength;
289 UInt32 numPairs;
290 UInt32 numAvail;
297 UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
298 UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
299 UInt32 numFastBytes;
300 UInt32 additionalOffset;
301 UInt32 reps[LZMA_NUM_REPS];
302 UInt32 state;
304 UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
305 UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
306 UInt32 alignPrices[kAlignTableSize];
307 UInt32 alignPriceCount;
309 UInt32 distTableSize;
338 UInt32 matchPriceCount;
343 UInt32 dictSize;
409 props.dictSize > ((UInt32)1 << kDicLogSizeMaxCompress) || props.dictSize > ((UInt32)1 << 30)) in LzmaEnc_SetProps()
426 UInt32 numHashBytes = 4; in LzmaEnc_SetProps()
521 if ((UInt32)p->low < (UInt32)0xFF000000 || (unsigned)(p->low >> 32) != 0) in RangeEnc_ShiftLow()
534 p->cache = (Byte)((UInt32)p->low >> 24); in RangeEnc_ShiftLow()
537 p->low = (UInt32)p->low << 8; in RangeEnc_ShiftLow()
547 static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, unsigned numBits) in RangeEnc_EncodeDirectBits()
562 static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol) in RangeEnc_EncodeBit()
564 UInt32 ttt = *prob; in RangeEnc_EncodeBit()
565 UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt; in RangeEnc_EncodeBit()
585 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol) in LitEnc_Encode()
596 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte) in LitEnc_EncodeMatched()
598 UInt32 offs = 0x100; in LitEnc_EncodeMatched()
610 void LzmaEnc_InitPriceTables(UInt32 *ProbPrices) in LzmaEnc_InitPriceTables()
612 UInt32 i; in LzmaEnc_InitPriceTables()
616 UInt32 w = i; in LzmaEnc_InitPriceTables()
617 UInt32 bitCount = 0; in LzmaEnc_InitPriceTables()
623 while (w >= ((UInt32)1 << 16)) in LzmaEnc_InitPriceTables()
646 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices) in LitEnc_GetPrice()
648 UInt32 price = 0; in LitEnc_GetPrice()
659 static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt3… in LitEnc_GetPriceMatched()
661 UInt32 price = 0; in LitEnc_GetPriceMatched()
662 UInt32 offs = 0x100; in LitEnc_GetPriceMatched()
676 static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) in RcTree_Encode()
678 UInt32 m = 1; in RcTree_Encode()
682 UInt32 bit; in RcTree_Encode()
690 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) in RcTree_ReverseEncode()
692 UInt32 m = 1; in RcTree_ReverseEncode()
696 UInt32 bit = symbol & 1; in RcTree_ReverseEncode()
703 static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *Prob… in RcTree_GetPrice()
705 UInt32 price = 0; in RcTree_GetPrice()
715 static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt3… in RcTree_ReverseGetPrice()
717 UInt32 price = 0; in RcTree_ReverseGetPrice()
718 UInt32 m = 1; in RcTree_ReverseGetPrice()
722 UInt32 bit = symbol & 1; in RcTree_ReverseGetPrice()
743 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) in LenEnc_Encode()
766 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 in LenEnc_SetPrices()
768 UInt32 a0 = GET_PRICE_0a(p->choice); in LenEnc_SetPrices()
769 UInt32 a1 = GET_PRICE_1a(p->choice); in LenEnc_SetPrices()
770 UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); in LenEnc_SetPrices()
771 UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); in LenEnc_SetPrices()
772 UInt32 i = 0; in LenEnc_SetPrices()
789 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPric… in LenPriceEnc_UpdateTable()
795 static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices) in LenPriceEnc_UpdateTables()
797 UInt32 posState; in LenPriceEnc_UpdateTables()
802 … LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, in LenEnc_Encode2()
813 static void MovePos(CLzmaEnc *p, UInt32 num) in MovePos()
827 static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes) in ReadMatchDistances()
829 UInt32 lenRes = 0, numPairs; in ReadMatchDistances()
837 UInt32 i; in ReadMatchDistances()
849 UInt32 distance = p->matches[numPairs - 1] + 1; in ReadMatchDistances()
850 UInt32 numAvail = p->numAvail; in ReadMatchDistances()
865 #define MakeAsChar(p) (p)->backPrev = (UInt32)(-1); (p)->prev1IsChar = False;
869 static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState) in GetRepLen1Price()
876 static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState) in GetPureRepPrice()
878 UInt32 price; in GetPureRepPrice()
898 static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState) in GetRepPrice()
904 static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur) in Backward()
906 UInt32 posMem = p->opt[cur].posPrev; in Backward()
907 UInt32 backMem = p->opt[cur].backPrev; in Backward()
923 UInt32 posPrev = posMem; in Backward()
924 UInt32 backCur = backMem; in Backward()
942 static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes) in GetOptimum()
944 UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; in GetOptimum()
945 UInt32 matchPrice, repMatchPrice, normalMatchPrice; in GetOptimum()
946 UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS]; in GetOptimum()
947 UInt32 *matches; in GetOptimum()
953 UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex; in GetOptimum()
971 *backRes = (UInt32)(-1); in GetOptimum()
981 UInt32 lenTest; in GetOptimum()
997 UInt32 lenRes; in GetOptimum()
1016 *backRes = (UInt32)-1; in GetOptimum()
1039 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); in GetOptimum()
1065 UInt32 repLen = repLens[i]; in GetOptimum()
1066 UInt32 price; in GetOptimum()
1072 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; in GetOptimum()
1090 UInt32 offs = 0; in GetOptimum()
1096 UInt32 distance = matches[offs + 1]; in GetOptimum()
1098UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; in GetOptimum()
1099 UInt32 lenToPosState = GetLenToPosState(len); in GetOptimum()
1104 UInt32 slot; in GetOptimum()
1139 UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; in GetOptimum()
1140 UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice; in GetOptimum()
1187 UInt32 pos; in GetOptimum()
1206 UInt32 i; in GetOptimum()
1215 UInt32 i; in GetOptimum()
1260 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); in GetOptimum()
1271 UInt32 temp = kNumOpts - 1 - cur; in GetOptimum()
1283 UInt32 temp; in GetOptimum()
1284 UInt32 lenTest2; in GetOptimum()
1286 UInt32 limit = p->numFastBytes + 1; in GetOptimum()
1294 UInt32 state2 = kLiteralNextStates[state]; in GetOptimum()
1295 UInt32 posStateNext = (position + 1) & p->pbMask; in GetOptimum()
1296 UInt32 nextRepMatchPrice = curAnd1Price + in GetOptimum()
1301 UInt32 curAndLenPrice; in GetOptimum()
1303 UInt32 offset = cur + 1 + lenTest2; in GetOptimum()
1322 UInt32 repIndex; in GetOptimum()
1325 UInt32 lenTest; in GetOptimum()
1326 UInt32 lenTestTemp; in GetOptimum()
1327 UInt32 price; in GetOptimum()
1338 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; in GetOptimum()
1356 UInt32 lenTest2 = lenTest + 1; in GetOptimum()
1357 UInt32 limit = lenTest2 + p->numFastBytes; in GetOptimum()
1358 UInt32 nextRepMatchPrice; in GetOptimum()
1365 UInt32 state2 = kRepNextStates[state]; in GetOptimum()
1366 UInt32 posStateNext = (position + lenTest) & p->pbMask; in GetOptimum()
1367 UInt32 curAndLenCharPrice = in GetOptimum()
1380 UInt32 curAndLenPrice; in GetOptimum()
1382 UInt32 offset = cur + lenTest + 1 + lenTest2; in GetOptimum()
1412 UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); in GetOptimum()
1413 UInt32 offs, curBack, posSlot; in GetOptimum()
1414 UInt32 lenTest; in GetOptimum()
1425UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN… in GetOptimum()
1426 UInt32 lenToPosState = GetLenToPosState(lenTest); in GetOptimum()
1446 UInt32 lenTest2 = lenTest + 1; in GetOptimum()
1447 UInt32 limit = lenTest2 + p->numFastBytes; in GetOptimum()
1448 UInt32 nextRepMatchPrice; in GetOptimum()
1455 UInt32 state2 = kMatchNextStates[state]; in GetOptimum()
1456 UInt32 posStateNext = (position + lenTest) & p->pbMask; in GetOptimum()
1457 UInt32 curAndLenCharPrice = curAndLenPrice + in GetOptimum()
1469 UInt32 offset = cur + lenTest + 1 + lenTest2; in GetOptimum()
1470 UInt32 curAndLenPrice; in GetOptimum()
1502 static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes) in GetOptimumFast()
1504 UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i; in GetOptimumFast()
1506 const UInt32 *matches; in GetOptimumFast()
1517 *backRes = (UInt32)-1; in GetOptimumFast()
1527 UInt32 len; in GetOptimumFast()
1585 UInt32 newDistance = matches[p->numPairs - 1]; in GetOptimumFast()
1596 UInt32 len, limit; in GetOptimumFast()
1610 static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) in WriteEndMarker()
1612 UInt32 len; in WriteEndMarker()
1619 RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits); in WriteEndMarker()
1636 static SRes Flush(CLzmaEnc *p, UInt32 nowPos) in Flush()
1649 UInt32 i; in FillAlignPrices()
1657 UInt32 tempPrices[kNumFullDistances]; in FillDistancesPrices()
1658 UInt32 i, lenToPosState; in FillDistancesPrices()
1661 UInt32 posSlot = GetPosSlot1(i); in FillDistancesPrices()
1662 UInt32 footerBits = ((posSlot >> 1) - 1); in FillDistancesPrices()
1663 UInt32 base = ((2 | (posSlot & 1)) << footerBits); in FillDistancesPrices()
1669 UInt32 posSlot; in FillDistancesPrices()
1671 UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState]; in FillDistancesPrices()
1678 UInt32 *distancesPrices = p->distancesPrices[lenToPosState]; in FillDistancesPrices()
1679 UInt32 i; in FillDistancesPrices()
1746 static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackS… in LzmaEnc_CodeOneBlock()
1748 UInt32 nowPos32, startPos32; in LzmaEnc_CodeOneBlock()
1759 nowPos32 = (UInt32)p->nowPos64; in LzmaEnc_CodeOneBlock()
1764 UInt32 numPairs; in LzmaEnc_CodeOneBlock()
1780 UInt32 pos, len, posState; in LzmaEnc_CodeOneBlock()
1792 if (len == 1 && pos == (UInt32)-1) in LzmaEnc_CodeOneBlock()
1821 UInt32 distance = p->reps[pos]; in LzmaEnc_CodeOneBlock()
1846 UInt32 posSlot; in LzmaEnc_CodeOneBlock()
1856 UInt32 footerBits = ((posSlot >> 1) - 1); in LzmaEnc_CodeOneBlock()
1857 UInt32 base = ((2 | (posSlot & 1)) << footerBits); in LzmaEnc_CodeOneBlock()
1858 UInt32 posReduced = pos - base; in LzmaEnc_CodeOneBlock()
1880 UInt32 processed; in LzmaEnc_CodeOneBlock()
1908 #define kBigHashDicLimit ((UInt32)1 << 24)
1910 static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) in LzmaEnc_Alloc()
1912 UInt32 beforeSize = kNumOpts; in LzmaEnc_Alloc()
1960 UInt32 i; in LzmaEnc_Init()
1970 UInt32 j; in LzmaEnc_Init()
1983 UInt32 num = 0x300 << (p->lp + p->lc); in LzmaEnc_Init()
1992 UInt32 j; in LzmaEnc_Init()
2031 static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *all… in LzmaEnc_AllocAndInit()
2033 UInt32 i; in LzmaEnc_AllocAndInit()
2034 for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++) in LzmaEnc_AllocAndInit()
2035 if (p->dictSize <= ((UInt32)1 << i)) in LzmaEnc_AllocAndInit()
2059 ISeqInStream *inStream, UInt32 keepWindowSize, in LzmaEnc_PrepareForLzma2()
2076 UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) in LzmaEnc_MemPrepare()
2119 UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) in LzmaEnc_GetNumAvailableBytes()
2132 Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) in LzmaEnc_CodeOneMemBlock()
2157 *unpackSize = (UInt32)(p->nowPos64 - nowPos64); in LzmaEnc_CodeOneMemBlock()
2205 UInt32 dictSize = p->dictSize; in LzmaEnc_WriteProperties()
2213 if (dictSize <= ((UInt32)2 << i)) in LzmaEnc_WriteProperties()
2218 if (dictSize <= ((UInt32)3 << i)) in LzmaEnc_WriteProperties()