From 1ba38d5894469cc54a520feb9e2567614ca7854f Mon Sep 17 00:00:00 2001 From: "Christian R. Helmrich" Date: Thu, 30 Nov 2023 10:00:50 +0100 Subject: [PATCH] finish MSE test code --- src/app/exhaleApp.cpp | 4 +++- src/lib/exhaleEnc.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/exhaleApp.cpp b/src/app/exhaleApp.cpp index 9be8d70..b02df83 100644 --- a/src/app/exhaleApp.cpp +++ b/src/app/exhaleApp.cpp @@ -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 diff --git a/src/lib/exhaleEnc.cpp b/src/lib/exhaleEnc.cpp index e097075..a57423a 100644 --- a/src/lib/exhaleEnc.cpp +++ b/src/lib/exhaleEnc.cpp @@ -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