From 0f31ad0043212c7a71bf86dbfefc59bdc56ad63c Mon Sep 17 00:00:00 2001 From: "Christian R. Helmrich" Date: Wed, 30 Dec 2020 23:00:03 +0100 Subject: [PATCH] update the readme# --- README.md | 3 ++- src/lib/exhaleEnc.cpp | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 989932a..7a70924 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,8 @@ the window content changed, on `Add New`. Then select `Custom` under - *Encoder file:* exhale.exe (including path to the executable) - *Extension:* m4a -- *Parameters:* # %d (where # is the bit-rate mode, i.e. 0...9) +- *Parameters:* # %d (where # is the bit-rate mode, i.e., 0...9 when + SBR is disabled, or a...g when SBR is enabled) - *Format is:* lossy - *Highest BPS mode supported:* 24 (or 32, doesn't matter much) - *Encoder name:* xHE-AAC (exhale) diff --git a/src/lib/exhaleEnc.cpp b/src/lib/exhaleEnc.cpp index 35959a4..0251645 100644 --- a/src/lib/exhaleEnc.cpp +++ b/src/lib/exhaleEnc.cpp @@ -1789,9 +1789,9 @@ unsigned ExhaleEncoder::temporalProcessing () // determine time-domain aspects o ((winSeq1 == EIGHT_SHORT) == (coreConfig.icsInfoPrev[1].windowSequence == EIGHT_SHORT)) && (coreConfig.stereoMode > 0)) { const unsigned lastGrpOffset = (coreConfig.icsInfoPrev[0].windowSequence == EIGHT_SHORT ? m_numSwbShort * (NUM_WINDOW_GROUPS - 1) : 0); - const unsigned maxSfbStePrev = __max (coreConfig.icsInfoPrev[0].maxSfb, coreConfig.icsInfoPrev[1].maxSfb); + const unsigned maxSfbStePrev = __max (coreConfig.icsInfoPrev[0].maxSfb, coreConfig.icsInfoPrev[1].maxSfb) + 1u; // for safety - memcpy (coreConfig.stereoDataPrev, &coreConfig.stereoDataCurr[lastGrpOffset], (maxSfbStePrev + 1) * sizeof (uint8_t)); + memcpy (coreConfig.stereoDataPrev, &coreConfig.stereoDataCurr[lastGrpOffset], __min (60 - lastGrpOffset, maxSfbStePrev) * sizeof (uint8_t)); } } // if nrChannels > 1 } @@ -1837,11 +1837,7 @@ ExhaleEncoder::ExhaleEncoder (int32_t* const inputPcmData, unsigned ch m_channelConf = CCI_2_CHM; // passing numChannels = 0 to ExhaleEncoder is interpreted as 2-ch dual-mono } m_numElements = elementCountConfig[m_channelConf % USAC_MAX_NUM_ELCONFIGS]; // used in UsacDecoderConfig -#if 1 m_shiftValSBR = (frameLength >= 1536 ? 1 : 0); -#else - m_shiftValSBR = 0; -#endif m_frameCount = 0; m_frameLength = USAC_CCFL (frameLength >> m_shiftValSBR); // ccfl signaled using coreSbrFrameLengthIndex m_frequencyIdx = toSamplingFrequencyIndex (sampleRate >> m_shiftValSBR); // as usacSamplingFrequencyIndex