Commit 6fc185fa authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 1289: Encoder crash for Stereo at 24.4 kbps

Link #1289
parent 1056c027
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1030,6 +1030,13 @@ void stereo_icBWE_enc_ivas_fx(
        IF( ( EQ_16( st->extl, SWB_TBE ) || EQ_16( st->extl, WB_TBE ) || EQ_16( st->extl, FB_TBE ) ) && EQ_16( st->flag_ACELP16k, 1 ) )
        {
            /* IC BWE spectral mapping */
            Word32 max_abs_val;
            maximum_abs_32_fx( shb_synth_nonref_fx, L_FRAME16k, &max_abs_val );
            IF( max_abs_val > 0 )
            {
                scale_sig32( shb_synth_nonref_fx, L_FRAME16k, -1 );
                shb_synth_nonref_e = sub( shb_synth_nonref_e, -1 );
            }
            spIndx = ic_bwe_enc_specMapping_ivas_fx( shb_frame_nonref_fx, shb_frame_nonref_e, shb_synth_nonref_fx, shb_synth_nonref_e, &( hStereoICBWE->prevSpecMapping_fx ), &( hStereoICBWE->memShbSpecMapping_fx ), hStereoICBWE->memShbSpecXcorr_fx, &( hStereoICBWE->memShbSpecXcorr_e ) ); /* Q0 */
        }
        ELSE