From 70534ca7b4e14a7176bae6c929059007955b1b62 Mon Sep 17 00:00:00 2001 From: "Christian R. Helmrich" Date: Tue, 28 Apr 2020 16:00:00 +0200 Subject: [PATCH] fix >48-kHz coding --- src/lib/quantization.cpp | 2 +- src/lib/stereoProcessing.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/quantization.cpp b/src/lib/quantization.cpp index ddd731f..2c669a6 100644 --- a/src/lib/quantization.cpp +++ b/src/lib/quantization.cpp @@ -542,7 +542,7 @@ unsigned SfbQuantizer::initQuantMemory (const unsigned maxTransfLength, if ((m_coeffMagn = (unsigned*) malloc (maxTransfLength * sizeof (unsigned))) == nullptr || #if EC_TRELLIS_OPT_CODING - (m_coeffTemp = (uint8_t* ) malloc (maxTransfLength + quantRateLength )) == nullptr || + (m_coeffTemp = (uint8_t* ) malloc (maxTransfLength + quantRateLength*2)) == nullptr || #endif (m_lut2ExpX4 = (double* ) malloc (numScaleFactors * sizeof (double ))) == nullptr || (m_lutSfNorm = (double* ) malloc (numScaleFactors * sizeof (double ))) == nullptr || diff --git a/src/lib/stereoProcessing.h b/src/lib/stereoProcessing.h index 85d1fe9..7b2215b 100644 --- a/src/lib/stereoProcessing.h +++ b/src/lib/stereoProcessing.h @@ -28,10 +28,10 @@ private: // member variables #if SP_SFB_WISE_STEREO - int32_t m_originBandMdct1[200]; // i.e. 40 * 5 - NOTE: increase this when maximum grpLength > 5 - int32_t m_originBandMdct2[200]; - int32_t m_originBandMdst1[200]; - int32_t m_originBandMdst2[200]; + int32_t m_originBandMdct1[320]; // i.e. 64 * 5 - NOTE: increase this when maximum grpLength > 5 + int32_t m_originBandMdct2[320]; + int32_t m_originBandMdst1[320]; + int32_t m_originBandMdst2[320]; #endif uint8_t m_stereoCorrValue[1024 >> SA_BW_SHIFT]; // one value for every 32 spectral coefficients