revert some changes

This commit is contained in:
Christian R. Helmrich 2020-03-10 00:00:53 +01:00
parent 0cbfa8c995
commit c497a38a5f

View File

@ -808,6 +808,7 @@ unsigned SfbQuantizer::quantizeSpecRDOC (EntropyCoder& entropyCoder, uint8_t* co
uint8_t* const tempQuant = &m_coeffTemp[sfbStart - grpStart];
bool maxSnrReached = false;
if (refQuantDist < 0.0) memset (tempQuant, 0, sfbWidth * sizeof (uint8_t));
#if EC_TRAIN
else refGrpDist += refQuantDist;
#endif
@ -853,7 +854,7 @@ unsigned SfbQuantizer::quantizeSpecRDOC (EntropyCoder& entropyCoder, uint8_t* co
currDist = getQuantDist (coeffMagn, sfBest, tempQuant, sfbWidth) * refQuantNorm;
}
}
// if (currDist < 0.0) memset (tempQuant, 0, sfbWidth * sizeof (uint8_t));
if (currDist < 0.0) memset (tempQuant, 0, sfbWidth * sizeof (uint8_t));
m_quantInSf[sfb][is] = sfCurr; // store initial scale fac
}
else // is == 1, quant. & dist. computed with quantizeSfb()
@ -861,8 +862,6 @@ unsigned SfbQuantizer::quantizeSpecRDOC (EntropyCoder& entropyCoder, uint8_t* co
numQCurr = refNumQ;
}
if ((currDist < 0.0) || (numQCurr == 0)) mag = nullptr; // to accelerate getBitCount()
if (sfb == 0) // first SFB, having sfbStart - grpStart == 0
{
entropyCoder.arithSetCodState (codStart); // group start