From 660cffb257c06105443d1ab681a3075a4a5e2795 Mon Sep 17 00:00:00 2001 From: "Christian R. Helmrich" Date: Wed, 22 Apr 2020 00:00:24 +0200 Subject: [PATCH] minor band M/S fix --- include/version.h | 2 +- src/app/exhaleApp.rc | 2 +- src/lib/stereoProcessing.cpp | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/version.h b/include/version.h index b7a5a3d..59ebc7f 100644 --- a/include/version.h +++ b/include/version.h @@ -15,5 +15,5 @@ # define EXHALELIB_VERSION_MINOR "0" #endif #ifndef EXHALELIB_VERSION_BUGFIX -# define EXHALELIB_VERSION_BUGFIX ".2" // "RC" or ".0", ".1", ... +# define EXHALELIB_VERSION_BUGFIX ".3" // "RC" or ".0", ".1", ... #endif diff --git a/src/app/exhaleApp.rc b/src/app/exhaleApp.rc index bf92746..1973164 100644 --- a/src/app/exhaleApp.rc +++ b/src/app/exhaleApp.rc @@ -13,7 +13,7 @@ 0 ICON "exhaleApp.ico" VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,2 +FILEVERSION 1,0,3 BEGIN BLOCK "StringFileInfo" BEGIN diff --git a/src/lib/stereoProcessing.cpp b/src/lib/stereoProcessing.cpp index 87bd494..25d851e 100644 --- a/src/lib/stereoProcessing.cpp +++ b/src/lib/stereoProcessing.cpp @@ -451,7 +451,16 @@ unsigned StereoProcessor::applyPredJointStereo (int32_t* const mdctSpectrum1, in int32_t* sfbMdctR = (alterPredDir ? &mdctSpectrum1[sfbStart] : &mdctSpectrum2[sfbStart]); uint64_t sumAbsValR = 0; - if (alphaRe == 0) continue; // nothing to do, no pred. + if (alphaRe == 0) + { + if (realOnlyCalc) // update previous magnitude value + { + sfbMdctR += sfbWidth - 1; + prevResi = (grpSData[sfbEv] > 0 ? *sfbMdctR : int32_t (((int64_t) sfbMdctD[sfbWidth - 1] + + (alterPredDir ? 1 : -1) * (int64_t) *sfbMdctR + 1) >> 1)); + } + continue; // nothing more to do, i.e., no prediction + } if (realOnlyCalc) // real data, only MDCT is available {