CUETools 2.1.1

* Local Database for verification results and metadata
* FlaCuda replaced with FLACCL
This commit is contained in:
chudov
2011-03-08 15:37:43 +00:00
parent 51639e3c7b
commit 052cb096c4
65 changed files with 2839 additions and 1037 deletions

View File

@@ -85,16 +85,16 @@ int CNNFilter::Decompress(int nInput)
int nDotProduct;
if (m_bMMXAvailable)
{
nDotProduct = CalculateDotProduct(&m_rbInput[-m_nOrder], &m_paryM[0], m_nOrder);
else
nDotProduct = CalculateDotProductNoMMX(&m_rbInput[-m_nOrder], &m_paryM[0], m_nOrder);
// adapt
if (m_bMMXAvailable)
Adapt(&m_paryM[0], &m_rbDeltaM[-m_nOrder], -nInput, m_nOrder);
}
else
{
nDotProduct = CalculateDotProductNoMMX(&m_rbInput[-m_nOrder], &m_paryM[0], m_nOrder);
AdaptNoMMX(&m_paryM[0], &m_rbDeltaM[-m_nOrder], nInput, m_nOrder);
}
// store the output value
int nOutput = nInput + ((nDotProduct + (1 << (m_nShift - 1))) >> m_nShift);

View File

@@ -253,6 +253,15 @@ void CUnBitArray::FlushState(UNBIT_ARRAY_STATE & BitArrayState)
void CUnBitArray::FlushBitArray()
{
// G.S.C.: Fixing a bug here. There was no check here for the buffer boundary.
// nMod is how much we will skip in AdvanceToByteBoundary + ignoring the first byte.
int nMod = m_nCurrentBitIndex % 8;
if (nMod != 0) { nMod = 8 - nMod; }
nMod += 8;
if ((m_nCurrentBitIndex + nMod) >= m_nBits)
FillBitArray();
// G.S.C.: end
AdvanceToByteBoundary();
m_nCurrentBitIndex += 8; // ignore the first byte... (slows compression too much to not output this dummy byte)
m_RangeCoderInfo.buffer = GetC();