From 81f1262fd3a0c9a5f97d972bad0dde1f450532de Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Wed, 6 Nov 2024 18:37:40 +0530 Subject: [PATCH] Fix for 3GPP issue 1002: Decoder crash for MC51 at 128 kbps with FER in RefineThresholdsUsingPitch() --- lib_dec/TonalComponentDetection_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/TonalComponentDetection_fx.c b/lib_dec/TonalComponentDetection_fx.c index 38e7b5cbc..dab3cd359 100644 --- a/lib_dec/TonalComponentDetection_fx.c +++ b/lib_dec/TonalComponentDetection_fx.c @@ -808,7 +808,7 @@ static void CorrectF0( IF( LE_16( iMult, 3 ) ) { /* Use iMostCommonDiff, because the lowest pHarmonicIndexes[i] (which is equal to iMult) may not correspond to the new F0, but to it's multiple */ - F0 = round_fx( L_shl( L_mult( iMostCommonDiff /*Q0*/, F0 /*Q10*/ ), 15 ) ); /*Q10*/ + F0 = round_fx_sat( L_shl_sat( L_mult( iMostCommonDiff /*Q0*/, F0 /*Q10*/ ), 15 ) ); /*Q10*/ } ELSE { -- GitLab