finish MSE test code

This commit is contained in:
Christian R. Helmrich 2023-11-30 10:00:50 +01:00
parent 0b683be9c7
commit 1ba38d5894
2 changed files with 6 additions and 1 deletions

View File

@ -1024,7 +1024,9 @@ int main (const int argc, char* argv[])
goto mainFinish; // writeout error
}
}
#if EE_MORE_MSE
std::cout << "\n" << "headerSizeBytes " << (headerRes - 34) << "\n";
#endif
i = 1; // for progress bar
// resample initial frame if necessary

View File

@ -965,6 +965,9 @@ unsigned ExhaleEncoder::psychBitAllocation () // perceptual bit-allocation via s
if (grpOff[maxSfbCh] > grpOff[0])
{
s = unsigned ((s * (eightShorts ? (24u + (grpData.windowGroupLength[gr] >> 2)) / grpData.windowGroupLength[gr] : 3u) + 4096u) >> 13);
#ifndef NO_PREROLL_DATA
if (((m_frameCount - 1u) % (m_indepPeriod << 1)) == 1 && nrChannels == 1 && !eightShorts) s = (4u + 9u * s) >> 3;
#endif
}
s = __max (1u + ((UINT32_MAX / (eightShorts ? 3u : 8u)) >> ((2 + m_bitRateMode / 9) * m_bitRateMode)), s * s);
#endif