From 0abb04a3dc574775f4018d80fcc7a5ce554d82ec Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 3 Dec 2024 17:05:24 +0530 Subject: [PATCH] Fix for 3GPP issue 1045: High MLD for ISM + FER + bitrate switching in WB --- lib_dec/TonalComponentDetection_fx.c | 12 ++++++------ lib_dec/tonalMDCTconcealment_fx.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib_dec/TonalComponentDetection_fx.c b/lib_dec/TonalComponentDetection_fx.c index dab3cd359..21d0442a5 100644 --- a/lib_dec/TonalComponentDetection_fx.c +++ b/lib_dec/TonalComponentDetection_fx.c @@ -105,13 +105,13 @@ void ivas_DetectTonalComponents_fx( // till nSamplesCore different Q and nSamples - nSamplesCore in different Q Scale_sig32( pScaledMdctSpectrum + nSamplesCore, sub( nSamples, nSamplesCore ), sub( lastMDCTSpectrum_exp, tmp_e ) ); /*q_pScaledMdctSpectrum+lastMDCTSpectrum_exp-tmp_e*/ lastMDCTSpect_exp = sub( 31, q_pScaledMdctSpectrum ); - } - FOR( Word16 i = nSamplesCore; i < nSamples; ++i ) - { - Word64 tmp = W_mult_32_32( pScaledMdctSpectrum[i], sns_int_scf_fx[nBands - 1] ); /*q_pScaledMdctSpectrum+16+1*/ - pScaledMdctSpectrum[i] = W_extract_h( W_shl( tmp, Q15 ) ); /*q_pScaledMdctSpectrum*/ - move32(); + FOR( Word16 i = nSamplesCore; i < nSamples; ++i ) + { + Word64 tmp = W_mult_32_32( pScaledMdctSpectrum[i], sns_int_scf_fx[nBands - 1] ); /*q_pScaledMdctSpectrum+16+1*/ + pScaledMdctSpectrum[i] = W_extract_h( W_shl( tmp, Q15 ) ); /*q_pScaledMdctSpectrum*/ + move32(); + } } /* Guard bit */ diff --git a/lib_dec/tonalMDCTconcealment_fx.c b/lib_dec/tonalMDCTconcealment_fx.c index a94f65309..0d967abe8 100644 --- a/lib_dec/tonalMDCTconcealment_fx.c +++ b/lib_dec/tonalMDCTconcealment_fx.c @@ -811,7 +811,7 @@ static void ivas_CalcPowerSpecAndDetectTonalComponents_fx( hTonalMDCTConc->lastPitchLag, pitchLag, hTonalMDCTConc->lastBlockData.spectralData, - add( hTonalMDCTConc->lastBlockData.spectralData_exp, hTonalMDCTConc->lastBlockData.gain_tcx_exp ), + hTonalMDCTConc->lastBlockData.spectralData_exp, hTonalMDCTConc->lastBlockData.scaleFactors, hTonalMDCTConc->lastBlockData.scaleFactors_exp, hTonalMDCTConc->lastBlockData.scaleFactors_max_e, -- GitLab