Commit 30f29540 authored by multrus's avatar multrus
Browse files

merge from main

parents 01a8a663 24e3ea7b
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -105,7 +105,9 @@
#define FIX_2148_OBJ_EDIT_ISSUE_WITH_OSBA                    /* Nokia: Add missing code to solve issue */
#define FIX_2200_ISAR_PLC_CRASH                              /* Dolby: Fix for ISAR PLC crash observed with newly added BASOP tests */
#define FIX_2210_ASSERT_IN_BW_DETEC_FX_FOR_OMASA             /* FhG: Resolve overflow by swapping the order of addition and multiplication */
#define FIX_2217_ASSERT_IN_IVAS_CORE_DECODER_WITH_MC         /* FhG: Adjust Q_real to prevent overflow in st->cldfbSyn->cldfb_state_fx scaling */
#define FIX_2211_ASSERT_IN_REND_CREND_CONVOLER               /* FhG: Add headroom to p_output_fx to prevent overflow in ivas_rend_crendProcessSubframe_fx() */

/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
+14 −0
Original line number Diff line number Diff line
@@ -124,7 +124,11 @@ ivas_error acelp_core_dec_fx(
    ivas_error error;
    Word32 bpf_error_signal_fx[L_FRAME16k];
    Word16 bpf_error_signal_16fx[L_FRAME16k];
#ifdef FIX_2217_ASSERT_IN_IVAS_CORE_DECODER_WITH_MC
    Word16 Q_real, scf;
#else
    Word16 Q_real;
#endif
    Word32 max_real, max_imag, max_val;

    set32_fx( bpf_error_signal_fx, 0, L_FRAME16k );
@@ -2083,12 +2087,22 @@ ivas_error acelp_core_dec_fx(
                }
                max_val = L_max( max_real, max_imag );
                Q_real = sub( norm_l( max_val ), 3 ) /* Guard bits */;
#ifdef FIX_2217_ASSERT_IN_IVAS_CORE_DECODER_WITH_MC
                scf = L_norm_arr( st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length );
                scf = s_min( scf, sub( Q_real, Q11 ) );
                Q_real = add( scf, Q11 );
#endif
                FOR( i = 0; i < CLDFB_NO_COL_MAX; i++ )
                {
                    scale_sig32( realBuffer_fx[i], CLDFB_NO_CHANNELS_MAX, Q_real ); // Q_real
                    scale_sig32( imagBuffer_fx[i], CLDFB_NO_CHANNELS_MAX, Q_real ); // Q_real
                }

#ifdef FIX_2217_ASSERT_IN_IVAS_CORE_DECODER_WITH_MC
                scale_sig32( st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, scf ); // Q10 - > (Q_real-1)
#else
                scale_sig32( st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, sub( Q_real, Q11 ) ); // Q10 - > (Q_real-1)
#endif
                st->cldfbSyn->Q_cldfb_state = sub( Q_real, 1 );
                move16();