diff --git a/lib_dec/fd_cng_dec.c b/lib_dec/fd_cng_dec.c index 812356c565d177c648975ffd1a699ecb54b45590..fe0e21b3555778d967c6c75351c6fee2e4046f38 100644 --- a/lib_dec/fd_cng_dec.c +++ b/lib_dec/fd_cng_dec.c @@ -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 ); diff --git a/lib_dec/ivas_decision_matrix_dec.c b/lib_dec/ivas_decision_matrix_dec.c index 1a309f9b807fbd70d9165ce85eb8cbb8d66dd4c7..c90f6c1a3900c61c5efd7c0e3eba0604d7339de6 100644 --- a/lib_dec/ivas_decision_matrix_dec.c +++ b/lib_dec/ivas_decision_matrix_dec.c @@ -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 );