diff --git a/lib_com/ivas_transient_det.c b/lib_com/ivas_transient_det.c index 538ce01fa6d6a8cb4dfc40d61082c7db3f459ff1..1729865c436bbb21475ced61025711c20542882b 100644 --- a/lib_com/ivas_transient_det.c +++ b/lib_com/ivas_transient_det.c @@ -453,7 +453,7 @@ void ivas_td_decorr_get_ducking_gains_fx( const Word16 frame_len, const Word16 tdet_flag ) { - Word16 i, q = Q15; + Word16 i, q = Q14; float e_fast[L_FRAME48k], e_slow[L_FRAME48k]; Word32 e_fast_fx[L_FRAME48k], e_slow_fx[L_FRAME48k]; Word32 in_duck_gain = hTranDet->in_duck_gain; diff --git a/lib_dec/ivas_agc_dec_fx.c b/lib_dec/ivas_agc_dec_fx.c index 6c292af646d6bec6faf4a16cf578e177568fb69d..00786054f57501ecb8822a556ca0d5dccff58da3 100644 --- a/lib_dec/ivas_agc_dec_fx.c +++ b/lib_dec/ivas_agc_dec_fx.c @@ -217,7 +217,7 @@ void ivas_agc_dec_process_fx( } } pState->gain_state[i].lastGain_fx = tmp_2; - gainLast = div_l( ONE_IN_Q30, pState->gain_state[i].lastGain_fx ); // Q14 + gainLast = div_l( ONE_IN_Q29, pState->gain_state[i].lastGain_fx ); // Q13 IF( NE_16( pState->gain_state[i].gainExpVal, 0 ) ) { @@ -254,14 +254,14 @@ void ivas_agc_dec_process_fx( } tmp_2 = shr( tmp_2, 1 ); // Q14 } - gain = mult( tmp_2, gainLast ); + gain = mult( tmp_2, gainLast ); // Q12 } ELSE { - gain = shr( gainLast, 1 ); // Q13 + gain = shr( gainLast, 1 ); // Q12 } - pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain ); + pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain ); // Q_pcm_out = Q_pcm_in - 3 } // pState->gain_state[i].lastGain *= powf( pState->agc_com.winFunc[offset - 1], (float) pState->gain_state[i].gainExpVal ); @@ -288,10 +288,10 @@ void ivas_agc_dec_process_fx( } ELSE { - gain = shr( gainLast, 1 ); // Q13 + gain = shr( gainLast, 1 ); // Q12 FOR( idx = 0; idx < output_frame; idx++ ) { - pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain ); + pcm_out[i][idx] = Mpy_32_16_1( pcm_in[i][idx], gain ); // Q_pcm_out = Q_pcm_in - 3 } } pState->gain_data[i].absGainExp = pState->gain_data[i].absGainExpCurr; diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 6daf07b1f75aac8a5bf66c612fdc5a8932326a97..224cf8548eede97eca18a15c7c820fcf93a94d79 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -288,7 +288,7 @@ ivas_error ivas_jbm_dec_tc( { FOR( Word16 j = 0; j < output_frame; j++ ) { - p_output[i][j] = (float) output_fx[i][j] / ONE_IN_Q12; + p_output[i][j] = (float) output_fx[i][j] / ONE_IN_Q11; } } @@ -507,7 +507,7 @@ ivas_error ivas_jbm_dec_tc( { FOR( Word16 j = 0; j < output_frame; j++ ) { - p_output[i + sba_ch_idx][j] = (float) output_fx[i][j] / ONE_IN_Q12; + p_output[i + sba_ch_idx][j] = (float) output_fx[i][j] / ONE_IN_Q11; } } diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 3a0ee44f48c516a75126a0dafccd511fd7481187..adac0593307414eccb7388e9101583ff212d0006 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -592,7 +592,7 @@ static void ivas_param_upmix_dec_decorr_subframes( { pPcm_tmp_fx[i] = tmp_fx[i]; p_tc_fx[i] = tc_fx[i]; - q_format[i] = Q15; + q_format[i] = Q14; FOR( j = 0; j < nSamplesToDecorr; j++ ) { pPcm_tmp_fx[i][j] = (Word32) ( pPcm_tmp[i][j] * ( 1 << q_format[i] ) ); diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 8f427bf85d2a96d89c5f72d1325ca4cca46f321f..9d528e6b7b8a910499740430429af85a2fccd7fe 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -754,7 +754,7 @@ void ivas_sba_dec_digest_tc( Word32 arr_decorr_signal_fx[BINAURAL_CHANNELS][L_FRAME48k]; Word32 arr_tc_fx[2 * BINAURAL_CHANNELS][L_FRAME48k]; Word32 i, j; - Word16 q_format = Q15; + Word16 q_format = Q14; FOR( i = 0; i < BINAURAL_CHANNELS; i++ ) { diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 1b6747d04a0d3c4901c0c116a998c029fb3ddcf1..fc36e499124cc278ed2ef94972dad446017cafcc 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -516,7 +516,7 @@ void ivas_sba_mix_matrix_determiner( { FOR( Word16 j = 0; j < output_frame; j++ ) { - output[c][j] = (float) output_fx[c][j] / ONE_IN_Q12; + output[c][j] = (float) output_fx[c][j] / ONE_IN_Q11; } } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 4abd44bbb77245d048288fe2d4badf68d6c769d9..c4230ff79b6dcbde3fd057a7eada1f7a9e0e911a 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1315,7 +1315,7 @@ void ivas_spar_dec_agc_pca( { FOR( Word16 j = 0; j < output_frame; j++ ) { - output[i][j] = (float) output_fx[i][j] / ONE_IN_Q12; + output[i][j] = (float) output_fx[i][j] / ONE_IN_Q11; } } @@ -1463,7 +1463,7 @@ void ivas_spar_dec_digest_tc( Word32 pcm_tmp_fx[MAX_SPAR_INTERNAL_CHANNELS][L_FRAME48k]; Word32 tc_fx[MAX_SPAR_INTERNAL_CHANNELS][L_FRAME48k]; Word32 i, j; - Word16 q_format = Q15; + Word16 q_format = Q14; FOR( i = 0; i < nchan_internal; i++ ) { @@ -1591,7 +1591,7 @@ void ivas_spar_dec_upmixer( Word32 arr_output_f_local_fx[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Word32 pcm_tmp_fx[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Word32 j; - Word16 q_format = Q15; + Word16 q_format = Q14; FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { diff --git a/lib_enc/ivas_mc_paramupmix_enc.c b/lib_enc/ivas_mc_paramupmix_enc.c index c72b22e310ec4849152fd13362ab2a6d49953637..5acfbeced371800b35f8a692c550ebde08c73c3d 100644 --- a/lib_enc/ivas_mc_paramupmix_enc.c +++ b/lib_enc/ivas_mc_paramupmix_enc.c @@ -709,7 +709,7 @@ static void ivas_mc_paramupmix_param_est_enc( pcm_in_fx[j] = arr_pcm_in[j]; FOR( k = 0; k < input_frame; k++ ) { - pcm_in_fx[j][k] = (Word32) ( pcm_in[j][k] * ( 1 << Q15 ) ); + pcm_in_fx[j][k] = (Word32) ( pcm_in[j][k] * ( 1 << Q14 ) ); } } #endif diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 8053520e4f3448c98b15ee99d9f0665ea586a19b..614761736249c828fbed47a0ec8a74ea67bce12d 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -618,7 +618,7 @@ static ivas_error ivas_spar_enc_process( Word32 data_fix[L_FRAME48k]; FOR( i = 0; i < input_frame; i++ ) { - data_fix[i] = (Word32) ( data_f[0][i] * ( 1 << Q15 ) ); + data_fix[i] = (Word32) ( data_f[0][i] * ( 1 << Q14 ) ); } ivas_transient_det_process_fx( hSpar->hTranDet, data_fix, input_frame, transient_det ); }