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.c743 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) in LenEnc_Encode() argument
748 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); in LenEnc_Encode()
756 …RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbol… in LenEnc_Encode()
766 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32… in LenEnc_SetPrices() argument
777 …prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPri… in LenEnc_SetPrices()
783 …prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNu… in LenEnc_SetPrices()
789 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPric… in LenPriceEnc_UpdateTable() argument
791 LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); in LenPriceEnc_UpdateTable()
792 p->counters[posState] = p->tableSize; in LenPriceEnc_UpdateTable()
797 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()
248 prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; in LzmaDec_DecodeReal()
299 probLen = prob + LenLow + (posState << kLenNumLowBits); in LzmaDec_DecodeReal()
310 probLen = prob + LenMid + (posState << kLenNumMidBits); in LzmaDec_DecodeReal()
533 unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); in LzmaDec_TryDummy() local
535 prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; in LzmaDec_TryDummy()
593 prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; in LzmaDec_TryDummy()
636 probLen = prob + LenLow + (posState << kLenNumLowBits); in LzmaDec_TryDummy()
647 probLen = prob + LenMid + (posState << kLenNumMidBits); in LzmaDec_TryDummy()
/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()
481 unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1); in Decode() local
483 if (RangeDec.DecodeBit(&IsMatch[(state << kNumPosBitsMax) + posState]) == 0) in Decode()
503 if (RangeDec.DecodeBit(&IsRep0Long[(state << kNumPosBitsMax) + posState]) == 0) in Decode()
530 len = RepLenDecoder.Decode(&RangeDec, posState); in Decode()
538 len = LenDecoder.Decode(&RangeDec, posState); in Decode()
/external/lzma/DOC/
Dlzma-specification.txt654 0 xxx LowCoder[posState] xxx
655 1 0 yyy MidCoder[posState] yyy + 8
661 LowCoder[posState] to decode 3-bit zero-based match length (xxx).
667 MidCoder[posState] to decode 3-bit "yyy" value, and zero-based match
674 LZMA uses "posState" value as context to select the binary tree
677 unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
703 unsigned Decode(CRangeDecoder *rc, unsigned posState)
706 return LowCoder[posState].Decode(rc);
708 return 8 + MidCoder[posState].Decode(rc);
963 unsigned posState = OutWindow.TotalPos & ((1 << pb) - 1);
[all …]