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

Fix for issue 684

[x] Increasing Synthesis_STFT_fx guard bits for crash issue
[x] get_next_index_4_by_15 table value supports Word16. Last entry
changed from 32768 to 32767.
[x] coherence_flt value updation logic changed.
parent cc30281b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1244,7 +1244,7 @@ void generate_comfort_noise_dec_flt(
    SynthesisSTFT_flt( fftBuffer, timeDomainOutput, hFdCngCom->olapBufferSynth_flt, hFdCngCom->olapWinSyn_flt, tcx_transition, hFdCngCom, st->element_mode, nchan_out );
#else
    Word32 fftBuffer_fx[FFTLEN], timeDomainBuffer_fx[L_FRAME16k];
    Word16 exp = Q15;
    Word16 exp = Q14;
    for ( i = 0; i < hFdCngCom->fftlen; i++ )
    {
        fftBuffer_fx[i] = float_to_fix( fftBuffer[i], exp );
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
#ifdef IVAS_FLOAT_FIXED
static Word16 get_next_index_4_by_15[16] =
{
    0, 2184, 4369, 6553, 8738, 10922, 13107, 15291, 17476, 19660, 21845, 24029, 26214, 28398, 30583, 32768
    0, 2184, 4369, 6553, 8738, 10922, 13107, 15291, 17476, 19660, 21845, 24029, 26214, 28398, 30583, 32767
};
#endif

@@ -547,7 +547,7 @@ void ivas_decision_matrix_dec_fx(
            st->hFdCngDec->hFdCngCom->coherence_fx = get_next_index_4_by_15[index];

            /* TODO: remove floating point dependency */
            st->hFdCngDec->hFdCngCom->coherence_flt = get_next_index_4_by_15[index] / ( 1 << 15 );
            st->hFdCngDec->hFdCngCom->coherence_flt = ( (float) get_next_index_4_by_15[index] ) / ( ( 1 << 15 ) - 1 );

            /* read flag for no side noise shape */
            st->hFdCngDec->hFdCngCom->no_side_flag = get_next_indice( st, 1 );