1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../cloop/gcc34.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
16 diff -ur cloop-2.01/advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h cloop-2.01-fixed/advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h
17 --- cloop-2.01/advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h 2003-02-10 20:25:06.000000000 +0100
18 +++ cloop-2.01-fixed/advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h 2004-10-15 23:07:37.565529344 +0200
21 void Encode(CRangeEncoder *aRangeEncoder, UINT32 aSymbol)
23 - aRangeEncoder->EncodeBit(m_Probability, kNumBitModelTotalBits, aSymbol);
24 + aRangeEncoder->EncodeBit(this->m_Probability, kNumBitModelTotalBits, aSymbol);
27 UINT32 GetPrice(UINT32 aSymbol) const
29 return g_PriceTables.m_StatePrices[
30 - (((m_Probability - aSymbol) ^ ((-(int)aSymbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
31 + (((this->m_Probability - aSymbol) ^ ((-(int)aSymbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
37 UINT32 Decode(CRangeDecoder *aRangeDecoder)
39 - UINT32 aNewBound = (aRangeDecoder->m_Range >> kNumBitModelTotalBits) * m_Probability;
40 + UINT32 aNewBound = (aRangeDecoder->m_Range >> kNumBitModelTotalBits) * this->m_Probability;
41 if (aRangeDecoder->m_Code < aNewBound)
43 aRangeDecoder->m_Range = aNewBound;
44 - m_Probability += (kBitModelTotal - m_Probability) >> aNumMoveBits;
45 + this->m_Probability += (kBitModelTotal - this->m_Probability) >> aNumMoveBits;
46 if (aRangeDecoder->m_Range < kTopValue)
48 aRangeDecoder->m_Code = (aRangeDecoder->m_Code << 8) | aRangeDecoder->m_Stream.ReadByte();
51 aRangeDecoder->m_Range -= aNewBound;
52 aRangeDecoder->m_Code -= aNewBound;
53 - m_Probability -= (m_Probability) >> aNumMoveBits;
54 + this->m_Probability -= (this->m_Probability) >> aNumMoveBits;
55 if (aRangeDecoder->m_Range < kTopValue)
57 aRangeDecoder->m_Code = (aRangeDecoder->m_Code << 8) | aRangeDecoder->m_Stream.ReadByte();