mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-08-10 18:11:14 +10:00
Implement Qualcomm Sahara VIP and fix a few bugs
* Qualcomm Sahara VIP * Project Cleanup * Allow unlocking an already unlocked phone
This commit is contained in:
@@ -4,7 +4,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
{
|
||||
internal class Encoder
|
||||
{
|
||||
public const uint kTopValue = (1 << 24);
|
||||
public const uint kTopValue = 1 << 24;
|
||||
|
||||
private System.IO.Stream Stream;
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
|
||||
internal class Decoder
|
||||
{
|
||||
public const uint kTopValue = (1 << 24);
|
||||
public const uint kTopValue = 1 << 24;
|
||||
public uint Range;
|
||||
public uint Code;
|
||||
// public Buffer.InBuffer Stream = new Buffer.InBuffer(1 << 16);
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
internal struct BitEncoder
|
||||
{
|
||||
public const int kNumBitModelTotalBits = 11;
|
||||
public const uint kBitModelTotal = (1 << kNumBitModelTotalBits);
|
||||
public const uint kBitModelTotal = 1 << kNumBitModelTotalBits;
|
||||
private const int kNumMoveBits = 5;
|
||||
private const int kNumMoveReducingBits = 2;
|
||||
public const int kNumBitPriceShiftBits = 6;
|
||||
@@ -53,7 +53,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
|
||||
static BitEncoder()
|
||||
{
|
||||
const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits);
|
||||
const int kNumBits = kNumBitModelTotalBits - kNumMoveReducingBits;
|
||||
for (int i = kNumBits - 1; i >= 0; i--)
|
||||
{
|
||||
UInt32 start = (UInt32)1 << (kNumBits - i - 1);
|
||||
@@ -77,7 +77,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
internal struct BitDecoder
|
||||
{
|
||||
public const int kNumBitModelTotalBits = 11;
|
||||
public const uint kBitModelTotal = (1 << kNumBitModelTotalBits);
|
||||
public const uint kBitModelTotal = 1 << kNumBitModelTotalBits;
|
||||
private const int kNumMoveBits = 5;
|
||||
|
||||
private uint Prob;
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
uint bit = Models[m].Decode(rangeDecoder);
|
||||
m <<= 1;
|
||||
m += bit;
|
||||
symbol |= (bit << bitIndex);
|
||||
symbol |= bit << bitIndex;
|
||||
}
|
||||
return symbol;
|
||||
}
|
||||
@@ -156,7 +156,7 @@ namespace SevenZip.Compression.RangeCoder
|
||||
uint bit = Models[startIndex + m].Decode(rangeDecoder);
|
||||
m <<= 1;
|
||||
m += bit;
|
||||
symbol |= (bit << bitIndex);
|
||||
symbol |= bit << bitIndex;
|
||||
}
|
||||
return symbol;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user