mirror of
https://gitlab.com/ecodis/exhale.git
synced 2025-06-05 21:59:32 +02:00
fix Mac compiling
This commit is contained in:
@@ -280,9 +280,10 @@ uint32_t SfbQuantizer::quantizeMagnRDOC (EntropyCoder& entropyCoder, const uint8
|
|||||||
double quantDist[32][4]; // TODO: dynamic memory allocation
|
double quantDist[32][4]; // TODO: dynamic memory allocation
|
||||||
uint8_t* const optimalIs = (uint8_t* const) (quantDist[32-1]);
|
uint8_t* const optimalIs = (uint8_t* const) (quantDist[32-1]);
|
||||||
uint8_t tempQuant[4], numQ; // for tuple/SFB sign bit counting
|
uint8_t tempQuant[4], numQ; // for tuple/SFB sign bit counting
|
||||||
unsigned tempBitCount, tuple, is;
|
unsigned tuple, is;
|
||||||
int ds;
|
int ds;
|
||||||
#if EC_TRAIN
|
#if EC_TRAIN
|
||||||
|
unsigned tempBitCount;
|
||||||
double refSfbDist = 0.0, tempSfbDist = 0.0;
|
double refSfbDist = 0.0, tempSfbDist = 0.0;
|
||||||
#else
|
#else
|
||||||
const double lambda = getLagrangeValue (m_rateIndex);
|
const double lambda = getLagrangeValue (m_rateIndex);
|
||||||
@@ -427,8 +428,10 @@ uint32_t SfbQuantizer::quantizeMagnRDOC (EntropyCoder& entropyCoder, const uint8
|
|||||||
|
|
||||||
memcpy (prevCost, currCost, numStates * sizeof (double)); // TODO: avoid memcpy, use pointer swapping instead for speed
|
memcpy (prevCost, currCost, numStates * sizeof (double)); // TODO: avoid memcpy, use pointer swapping instead for speed
|
||||||
} // for tuple
|
} // for tuple
|
||||||
|
#if EC_TRAIN
|
||||||
for (tempBitCount = is = 0; is < numStates; is++) // minimum
|
tempBitCount = 0;
|
||||||
|
#endif
|
||||||
|
for (is = 0; is < numStates; is++) // search for minimum path
|
||||||
{
|
{
|
||||||
if (costMinIs > prevCost[is])
|
if (costMinIs > prevCost[is])
|
||||||
{
|
{
|
||||||
@@ -443,15 +446,15 @@ uint32_t SfbQuantizer::quantizeMagnRDOC (EntropyCoder& entropyCoder, const uint8
|
|||||||
const uint8_t pathMinDs = currPath[pathMinIs];
|
const uint8_t pathMinDs = currPath[pathMinIs];
|
||||||
|
|
||||||
optimalIs[tuple] = (uint8_t) pathMinIs;
|
optimalIs[tuple] = (uint8_t) pathMinIs;
|
||||||
tempBitCount += quantRate[pathMinDs + (pathMinIs + tuple * numStates) * numStates];
|
|
||||||
#if EC_TRAIN
|
#if EC_TRAIN
|
||||||
|
tempBitCount += quantRate[pathMinDs + (pathMinIs + tuple * numStates) * numStates];
|
||||||
tempSfbDist += quantDist[tuple][pathMinIs];
|
tempSfbDist += quantDist[tuple][pathMinIs];
|
||||||
#endif
|
#endif
|
||||||
pathMinIs = pathMinDs;
|
pathMinIs = pathMinDs;
|
||||||
}
|
}
|
||||||
optimalIs[0] = (uint8_t) pathMinIs;
|
optimalIs[0] = (uint8_t) pathMinIs;
|
||||||
tempBitCount += quantRate[pathMinIs * numStates];
|
|
||||||
#if EC_TRAIN
|
#if EC_TRAIN
|
||||||
|
tempBitCount += quantRate[pathMinIs * numStates];
|
||||||
tempSfbDist += quantDist[0][pathMinIs];
|
tempSfbDist += quantDist[0][pathMinIs];
|
||||||
#endif
|
#endif
|
||||||
} // Viterbi search
|
} // Viterbi search
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#else
|
#else
|
||||||
#define SFB_QUANT_OFFSET 0.405396 // 1 - 0.5^(3/4)
|
#define SFB_QUANT_OFFSET 0.405396 // 1 - 0.5^(3/4)
|
||||||
#endif
|
#endif
|
||||||
#define SFB_QUANT_SSE (0 && defined (_MSC_VER))
|
#define SFB_QUANT_SSE 0
|
||||||
|
|
||||||
// class for BL USAC quantization
|
// class for BL USAC quantization
|
||||||
class SfbQuantizer
|
class SfbQuantizer
|
||||||
|
Reference in New Issue
Block a user