Commit b765fb4b authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1760_fix' into 'main'

Fix for 3GPP issue 1760: Decoder crash for OSBA ISM4SBA3 in apa_corrEnergy2dB_fx() [allow regression]

See merge request !1822
parents 64dd3474 1b260941
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1031,18 +1031,19 @@ ivas_error ivas_jbm_dec_tc_fx(
        {
            num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate );
            SPAR_DEC_HANDLE hSpar = st_ivas->hSpar;
            Word16 Q_p_output = 14;
            move16();
            Word16 nchan_transport;
            // num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands;
            nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport;
            move16();
            nchan_out = nchan_transport;
            move16();
            Word16 Q_p_output = s_max( 3, sub( L_norm_arr( p_output_fx[sba_ch_idx], imult1616( output_frame, nchan_transport ) ), 1 ) );
            Q_p_output = s_min( Q_p_output, 19 ); // to restrict Q-factor of p_ouptut to Q30
            FOR( ch = 0; ch < nchan_transport; ch++ )
            {
                Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, sub( Q_p_output, Q11 ) ); // Q_p_output
                Scale_sig32( p_output_fx[sba_ch_idx + ch], output_frame, Q_p_output ); // Q_p_output + Q11
            }
            Q_p_output = add( Q11, Q_p_output );
            hSpar->hMdDec->Q_mixer_mat = 31;
            move16();

+1 −1
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ void ivas_sba_mix_matrix_determiner_fx(
                temp_fx = MAX16B; /*Q0*/
                move32();
            }
            ELSE IF( LT_32( temp_fx, L_negate( PCM16_TO_FLT_FAC_FX ) ) )
            ELSE IF( LT_32( temp_fx, -( PCM16_TO_FLT_FAC_FX ) ) )
            {
                temp_fx = -( PCM16_TO_FLT_FAC_FX ); /*Q0*/
                move32();