Commit 5f80c06d authored by multrus's avatar multrus
Browse files

Merge branch '1644_basop_port_fl1563' into 'main'

[Non-BE] Port MR 1563 into main-pc

See merge request !1718
parents 8b752cc0 5014ccac
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@


#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */
#define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS            /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */

#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ 

+20 −1
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
*******************************************************************************************************/


#include "basop_util.h"
#include "enh32.h"
#include <stdint.h>
#include <string.h>
#include <stdio.h>
@@ -50,6 +52,13 @@
#include "rom_dec.h"
#include "ivas_prot_fx.h"

#ifdef NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS
/*-----------------------------------------------------------------------*
 * Local constants
 *-----------------------------------------------------------------------*/

#define SQRT_EPSILON_FX 68 /* Q31 square root of EPSILON */
#endif

/*-------------------------------------------------------------------*
 * ivas_dirac_dec_output_synthesis_cov_open()
@@ -878,8 +887,18 @@ Word16 computeMixingMatrices_fx(
    }

    limit_e = add( limit_e, reg_Sx_e );

#ifdef NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS
    limit_fx = Mpy_32_32( limit_fx, reg_Sx_fx );
    IF( BASOP_Util_Cmp_Mant32Exp( limit_fx, limit_e, SQRT_EPSILON_FX /* Q31 */, 0 ) < 0 )
    {
        limit_fx = SQRT_EPSILON_FX;
        move32();
        limit_e = 0;
        move16();
    }
#else /* NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS */
    limit_fx = Madd_32_32( EPSILON_FX, limit_fx, reg_Sx_fx );
#endif

    FOR( i = 0; i < lengthCx; ++i )
    {