Home
last modified time | relevance | path

Searched refs:posState (Results 1 – 11 of 11) sorted by relevance

/external/lzma/Java/Tukaani/src/org/tukaani/xz/lzma/
DLZMAEncoder.java252 int posState = (lz.getPos() - readAhead) & posMask; in encodeSymbol() local
257 rc.encodeBit(isMatch[state.get()], posState, 0); in encodeSymbol()
261 rc.encodeBit(isMatch[state.get()], posState, 1); in encodeSymbol()
267 encodeRepMatch(back, len, posState); in encodeSymbol()
272 encodeMatch(back - REPS, len, posState); in encodeSymbol()
282 private void encodeMatch(int dist, int len, int posState) { in encodeMatch() argument
284 matchLenEncoder.encode(len, posState); in encodeMatch()
314 private void encodeRepMatch(int rep, int len, int posState) { in encodeRepMatch() argument
317 rc.encodeBit(isRep0Long[state.get()], posState, len == 1 ? 0 : 1); in encodeRepMatch()
341 repLenEncoder.encode(len, posState); in encodeRepMatch()
[all …]
DLZMADecoder.java53 int posState = lz.getPos() & posMask; in decode() local
55 if (rc.decodeBit(isMatch[state.get()], posState) == 0) { in decode()
59 ? decodeMatch(posState) in decode()
60 : decodeRepMatch(posState); in decode()
72 private int decodeMatch(int posState) throws IOException { in decodeMatch() argument
79 int len = matchLenDecoder.decode(posState); in decodeMatch()
101 private int decodeRepMatch(int posState) throws IOException { in decodeRepMatch() argument
103 if (rc.decodeBit(isRep0Long[state.get()], posState) == 0) { in decodeRepMatch()
129 return repLenDecoder.decode(posState); in decodeRepMatch()
187 int decode(int posState) throws IOException { in decode() argument
[all …]
DLZMAEncoderNormal.java174 int posState = pos & posMask; in getNextSymbol() local
184 int anyMatchPrice = getAnyMatchPrice(state, posState); in getNextSymbol()
191 state, posState); in getNextSymbol()
228 state, posState); in getNextSymbol()
231 posState); in getNextSymbol()
253 dist, len, posState); in getNextSymbol()
280 posState = pos & posMask; in getNextSymbol()
284 + getAnyMatchPrice(opts[optCur].state, posState); in getNextSymbol()
287 calc1BytePrices(pos, posState, avail, anyRepPrice); in getNextSymbol()
290 int startLen = calcLongRepPrices(pos, posState, in getNextSymbol()
[all …]
/external/lzma/Java/SevenZip/Compression/LZMA/
DEncoder.java177 for (int posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++) in LenEncoder()
179 _lowCoder[posState] = new BitTreeEncoder(Base.kNumLowLenBits); in LenEncoder()
180 _midCoder[posState] = new BitTreeEncoder(Base.kNumMidLenBits); in LenEncoder()
188 for (int posState = 0; posState < numPosStates; posState++) in Init()
190 _lowCoder[posState].Init(); in Init()
191 _midCoder[posState].Init(); in Init()
196 …public void Encode(SevenZip.Compression.RangeCoder.Encoder rangeEncoder, int symbol, int posState)… in Encode() argument
201 _lowCoder[posState].Encode(rangeEncoder, symbol); in Encode()
210 _midCoder[posState].Encode(rangeEncoder, symbol); in Encode()
220 public void SetPrices(int posState, int numSymbols, int[] prices, int st) in SetPrices() argument
[all …]
DDecoder.java30 for (int posState = 0; posState < m_NumPosStates; posState++) in Init()
32 m_LowCoder[posState].Init(); in Init()
33 m_MidCoder[posState].Init(); in Init()
38 …public int Decode(SevenZip.Compression.RangeCoder.Decoder rangeDecoder, int posState) throws IOExc… in Decode() argument
41 return m_LowCoder[posState].Decode(rangeDecoder); in Decode()
44 symbol += m_MidCoder[posState].Decode(rangeDecoder); in Decode()
215 int posState = (int)nowPos64 & m_PosStateMask; in Code() local
216 …if (m_RangeDecoder.DecodeBit(m_IsMatchDecoders, (state << Base.kNumPosStatesBitsMax) + posState) =… in Code()
235 …RangeDecoder.DecodeBit(m_IsRep0LongDecoders, (state << Base.kNumPosStatesBitsMax) + posState) == 0) in Code()
262 len = m_RepLenDecoder.Decode(m_RangeDecoder, posState) + Base.kMatchMinLen; in Code()
[all …]
/external/lzma/CS/7zip/Compress/LZMA/
DLzmaEncoder.cs177 for (UInt32 posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++) in LenEncoder()
179 _lowCoder[posState] = new RangeCoder.BitTreeEncoder(Base.kNumLowLenBits); in LenEncoder()
180 _midCoder[posState] = new RangeCoder.BitTreeEncoder(Base.kNumMidLenBits); in LenEncoder()
188 for (UInt32 posState = 0; posState < numPosStates; posState++) in Init()
190 _lowCoder[posState].Init(); in Init()
191 _midCoder[posState].Init(); in Init()
196 public void Encode(RangeCoder.Encoder rangeEncoder, UInt32 symbol, UInt32 posState) in Encode() argument
201 _lowCoder[posState].Encode(rangeEncoder, symbol); in Encode()
210 _midCoder[posState].Encode(rangeEncoder, symbol); in Encode()
220 public void SetPrices(UInt32 posState, UInt32 numSymbols, UInt32[] prices, UInt32 st) in SetPrices() argument
[all …]
DLzmaDecoder.cs22 for (uint posState = m_NumPosStates; posState < numPosStates; posState++) in Create()
24 m_LowCoder[posState] = new BitTreeDecoder(Base.kNumLowLenBits); in Create()
25 m_MidCoder[posState] = new BitTreeDecoder(Base.kNumMidLenBits); in Create()
33 for (uint posState = 0; posState < m_NumPosStates; posState++) in Init()
35 m_LowCoder[posState].Init(); in Init()
36 m_MidCoder[posState].Init(); in Init()
42 public uint Decode(RangeCoder.Decoder rangeDecoder, uint posState) in Decode() argument
45 return m_LowCoder[posState].Decode(rangeDecoder); in Decode()
50 symbol += m_MidCoder[posState].Decode(rangeDecoder); in Decode()
255 uint posState = (uint)nowPos64 & m_PosStateMask; in Code()
[all …]
/external/lzma/C/
DLzmaEnc.c783 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) in LenEnc_Encode() argument
788 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); in LenEnc_Encode()
796 …RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbol… in LenEnc_Encode()
806 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, const … in LenEnc_SetPrices() argument
817 …prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPri… in LenEnc_SetPrices()
823 …prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNu… in LenEnc_SetPrices()
829 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, const UInt32 *Pr… in LenPriceEnc_UpdateTable() argument
831 LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); in LenPriceEnc_UpdateTable()
832 p->counters[posState] = p->tableSize; in LenPriceEnc_UpdateTable()
837 UInt32 posState; in LenPriceEnc_UpdateTables() local
[all …]
DLzmaDec.c167 unsigned posState = processedPos & pbMask; in LzmaDec_DecodeReal() local
169 prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; in LzmaDec_DecodeReal()
249 prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; in LzmaDec_DecodeReal()
302 probLen = prob + LenLow + (posState << kLenNumLowBits); in LzmaDec_DecodeReal()
313 probLen = prob + LenMid + (posState << kLenNumMidBits); in LzmaDec_DecodeReal()
334 probLen = prob + LenLow + (posState << kLenNumLowBits); in LzmaDec_DecodeReal()
348 probLen = prob + LenMid + (posState << kLenNumMidBits); in LzmaDec_DecodeReal()
591 unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); in LzmaDec_TryDummy() local
593 prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; in LzmaDec_TryDummy()
651 prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; in LzmaDec_TryDummy()
[all …]
/external/lzma/CPP/7zip/Bundles/LzmaSpec/
DLzmaSpec.cpp295 unsigned Decode(CRangeDecoder *rc, unsigned posState) in Decode() argument
298 return LowCoder[posState].Decode(rc); in Decode()
300 return 8 + MidCoder[posState].Decode(rc); in Decode()
483 unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1); in Decode() local
485 if (RangeDec.DecodeBit(&IsMatch[(state << kNumPosBitsMax) + posState]) == 0) in Decode()
505 if (RangeDec.DecodeBit(&IsRep0Long[(state << kNumPosBitsMax) + posState]) == 0) in Decode()
532 len = RepLenDecoder.Decode(&RangeDec, posState); in Decode()
540 len = LenDecoder.Decode(&RangeDec, posState); in Decode()
/external/lzma/DOC/
Dlzma-specification.txt655 0 xxx LowCoder[posState] xxx
656 1 0 yyy MidCoder[posState] yyy + 8
662 LowCoder[posState] to decode 3-bit zero-based match length (xxx).
668 MidCoder[posState] to decode 3-bit "yyy" value, and zero-based match
675 LZMA uses "posState" value as context to select the binary tree
678 unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
704 unsigned Decode(CRangeDecoder *rc, unsigned posState)
707 return LowCoder[posState].Decode(rc);
709 return 8 + MidCoder[posState].Decode(rc);
964 unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
[all …]