Home
last modified time | relevance | path

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

/external/xz-java/src/org/tukaani/xz/lzma/
DLZMAEncoder.java233 int posState = (lz.getPos() - readAhead) & posMask; in encodeLZMA1EndMarker() local
234 rc.encodeBit(isMatch[state.get()], posState, 1); in encodeLZMA1EndMarker()
236 encodeMatch(-1, MATCH_LEN_MIN, posState); in encodeLZMA1EndMarker()
289 int posState = (lz.getPos() - readAhead) & posMask; in encodeSymbol() local
294 rc.encodeBit(isMatch[state.get()], posState, 0); in encodeSymbol()
298 rc.encodeBit(isMatch[state.get()], posState, 1); in encodeSymbol()
304 encodeRepMatch(back, len, posState); in encodeSymbol()
309 encodeMatch(back - REPS, len, posState); in encodeSymbol()
319 private void encodeMatch(int dist, int len, int posState) in encodeMatch() argument
322 matchLenEncoder.encode(len, posState); in encodeMatch()
[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.java176 int posState = pos & posMask; in getNextSymbol() local
186 int anyMatchPrice = getAnyMatchPrice(state, posState); in getNextSymbol()
193 state, posState); in getNextSymbol()
230 state, posState); in getNextSymbol()
233 posState); in getNextSymbol()
255 dist, len, posState); in getNextSymbol()
282 posState = pos & posMask; in getNextSymbol()
286 + getAnyMatchPrice(opts[optCur].state, posState); in getNextSymbol()
289 calc1BytePrices(pos, posState, avail, anyRepPrice); in getNextSymbol()
292 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.c249 #define GET_PRICE_LEN(p, posState, len) \ argument
250 ((p)->prices[posState][(size_t)(len) - LZMA_MATCH_LEN_MIN])
831 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posState) in LenEnc_Encode() argument
858 probs += (posState << (1 + kLenNumLowBits)); in LenEnc_Encode()
893 unsigned posState; in LenPriceEnc_UpdateTables() local
897 for (posState = 0; posState < numPosStates; posState++) in LenPriceEnc_UpdateTables()
899 UInt32 *prices = p->prices[posState]; in LenPriceEnc_UpdateTables()
900 const CLzmaProb *probs = enc->low + (posState << (1 + kLenNumLowBits)); in LenPriceEnc_UpdateTables()
961 unsigned posState; in LenPriceEnc_UpdateTables() local
963 for (posState = 1; posState < numPosStates; posState++) in LenPriceEnc_UpdateTables()
[all …]
DLzmaDec.c162 #define COMBINED_PS_STATE (posState + state)
163 #define GET_LEN_STATE (posState)
244 unsigned posState = CALC_POS_STATE(processedPos, pbMask); in LZMA_DECODE_REAL() local
673 unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1); in LzmaDec_TryDummy() local
/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 …]
/external/lzma/Asm/x86/
DLzmaDecOpt.asm582 ; prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;