Loading lib_com/bitstream_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -240,11 +240,11 @@ Word16 rate2EVSmode( } /*-------------------------------------------------------------------* * push_indice_fx( ) * push_indice( ) * * Push a new indice into the buffer *-------------------------------------------------------------------*/ #if 0 void push_indice_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder state structure */ Word16 id, /* i : ID of the indice */ Loading Loading @@ -288,7 +288,7 @@ void push_indice_fx( return; } #endif /*-------------------------------------------------------------------* * push_next_indice_fx() * * Push a new indice into the buffer at the next position Loading lib_com/gs_gains_fx.c +14 −14 Original line number Diff line number Diff line Loading @@ -1028,7 +1028,7 @@ Word16 gsc_gainQ_fx( /*Q12*/ mean_4g[0] = round_fx( L_tmp ); move16(); idx_g = vquant_fx( mean_4g, Gain_meanNB_fx, mean_4g, Gain_mean_dicNB_fx, 1, 64 ); push_indice_fx( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); push_indice( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); FOR( i = 0; i < Mbands_gn; i++ ) { Loading @@ -1040,21 +1040,21 @@ Word16 gsc_gainQ_fx( /*Q12*/ move16(); set16_fx( y_gain_tmp + 10, 0, MBANDS_GN - 10 ); idx_g = vquant_fx( y_gain_tmp, Mean_dic_NB_fx, y_gain_tmp, Gain_dic1_NB_fx, 3, 64 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); IF( LT_32( core_brate, ACELP_9k60 ) ) { idx_g = vquant_fx( y_gain_tmp + 3, Mean_dic_NB_fx + 3, y_gain_tmp + 3, Gain_dic2_NB_fx, 3, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp + 6, Mean_dic_NB_fx + 6, y_gain_tmp + 6, Gain_dic3_NB_fx, 4, 16 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); } ELSE { idx_g = vquant_fx( y_gain_tmp + 3, Mean_dic_NB_fx + 3, y_gain_tmp + 3, Gain_dic2_NBHR_fx, 3, 64 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); idx_g = vquant_fx( y_gain_tmp + 6, Mean_dic_NB_fx + 6, y_gain_tmp + 6, Gain_dic3_NBHR_fx, 4, 128 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 7 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 7 ); } /*add end */ test(); Loading Loading @@ -1122,7 +1122,7 @@ Word16 gsc_gainQ_fx( /*Q12*/ move16(); idx_g = vquant_fx( mean_4g, mean_m_fx, mean_4g, mean_gain_dic_fx, 1, 64 ); push_indice_fx( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); push_indice( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); FOR( i = 0; i < Mbands_gn; i++ ) { Loading @@ -1148,11 +1148,11 @@ Word16 gsc_gainQ_fx( /*Q12*/ move16(); idx_g = vquant_fx( y_gain_tmp2, YGain_mean_LR_fx, y_gain_tmp2, YGain_dic1_LR_fx, 3, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp2 + 3, YGain_mean_LR_fx + 3, y_gain_tmp2 + 3, YGain_dic2_LR_fx, 4, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp2 + 7, YGain_mean_LR_fx + 7, y_gain_tmp2 + 7, YGain_dic3_LR_fx, 5, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); set16_fx( y_gain_tmp2 + 12, 0, MBANDS_GN - 12 ); /* Update to quantized vector */ Loading Loading @@ -1185,13 +1185,13 @@ Word16 gsc_gainQ_fx( /*Q12*/ ELSE { idx_g = vquant_fx( y_gain_tmp, YG_mean16_fx, y_gain_tmp, YG_dicMR_1_fx, 4, 64 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); idx_g = vquant_fx( y_gain_tmp + 4, YG_mean16_fx + 4, y_gain_tmp + 4, YG_dicMR_2_fx, 4, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp + 8, YG_mean16_fx + 8, y_gain_tmp + 8, YG_dicMR_3_fx, 4, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp + 12, YG_mean16_fx + 12, y_gain_tmp + 12, YG_dicMR_4_fx, 4, 16 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); } } Loading lib_com/hq_tools_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -2036,7 +2036,7 @@ Word16 calc_nor_delta_hf_fx( /* updating norm & storing delta norm */ add_bits_denv = 2; move16(); push_indice_fx( hBstr, IND_DELTA_ENV_HQ, sub( bitsforDelta, 2 ), 2 ); push_indice( hBstr, IND_DELTA_ENV_HQ, sub( bitsforDelta, 2 ), 2 ); FOR( i = num_env_bands; i < nb_sfm; ++i ) { IF( Rsubband[i] != 0 ) Loading @@ -2052,7 +2052,7 @@ Word16 calc_nor_delta_hf_fx( delta = min_delta; /*Q0*/ move16(); } push_indice_fx( hBstr, IND_DELTA_ENV_HQ, delta - min_delta, bitsforDelta ); push_indice( hBstr, IND_DELTA_ENV_HQ, delta - min_delta, bitsforDelta ); ynrm[i] = add( ynrm[i], delta ); /*Q0*/ move16(); add_bits_denv = add( add_bits_denv, bitsforDelta ); Loading lib_com/pvq_com_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -622,7 +622,7 @@ void fine_gain_quant_fx( gain_db = round_fx_sat( L_shl_o( L_tmp, 17, &Overflow ) ); idx = squant_fx( gain_db, &gain_dbq, finegain_fx[gbits - 1], gain_cb_size[gbits - 1] ); push_indice_fx( hBstr, IND_PVQ_FINE_GAIN, idx, gbits ); push_indice( hBstr, IND_PVQ_FINE_GAIN, idx, gbits ); L_tmp = L_mult0( gain_dbq, 21771 ); /* 21771=0.05*log2(10) */ /* 14+17=31 */ L_tmp = L_shr( L_tmp, 15 ); /* Q16 */ Loading lib_enc/FEC_enc_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ void FEC_encode_fx( index = 3; move16(); } push_indice_fx( hBstr, IND_FEC_CLAS, index, FEC_BITS_CLS ); push_indice( hBstr, IND_FEC_CLAS, index, FEC_BITS_CLS ); } /*-----------------------------------------------------------------* Loading @@ -117,7 +117,7 @@ void FEC_encode_fx( tmpS = s_min( tmpS, 31 ); tmpS = s_max( tmpS, 0 ); push_indice_fx( hBstr, IND_FEC_ENR, tmpS, FEC_BITS_ENR ); push_indice( hBstr, IND_FEC_ENR, tmpS, FEC_BITS_ENR ); } /*-----------------------------------------------------------------* * Encode last glottal pulse position (8 bits) Loading Loading @@ -157,7 +157,7 @@ void FEC_encode_fx( maxi = add( maxi, 128 ); /* use 8 bits (MSB represent the sign of the pulse) Q0*/ } push_indice_fx( hBstr, IND_FEC_POS, maxi, FEC_BITS_POS ); push_indice( hBstr, IND_FEC_POS, maxi, FEC_BITS_POS ); } maxi = 0; move16(); Loading Loading
lib_com/bitstream_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -240,11 +240,11 @@ Word16 rate2EVSmode( } /*-------------------------------------------------------------------* * push_indice_fx( ) * push_indice( ) * * Push a new indice into the buffer *-------------------------------------------------------------------*/ #if 0 void push_indice_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder state structure */ Word16 id, /* i : ID of the indice */ Loading Loading @@ -288,7 +288,7 @@ void push_indice_fx( return; } #endif /*-------------------------------------------------------------------* * push_next_indice_fx() * * Push a new indice into the buffer at the next position Loading
lib_com/gs_gains_fx.c +14 −14 Original line number Diff line number Diff line Loading @@ -1028,7 +1028,7 @@ Word16 gsc_gainQ_fx( /*Q12*/ mean_4g[0] = round_fx( L_tmp ); move16(); idx_g = vquant_fx( mean_4g, Gain_meanNB_fx, mean_4g, Gain_mean_dicNB_fx, 1, 64 ); push_indice_fx( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); push_indice( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); FOR( i = 0; i < Mbands_gn; i++ ) { Loading @@ -1040,21 +1040,21 @@ Word16 gsc_gainQ_fx( /*Q12*/ move16(); set16_fx( y_gain_tmp + 10, 0, MBANDS_GN - 10 ); idx_g = vquant_fx( y_gain_tmp, Mean_dic_NB_fx, y_gain_tmp, Gain_dic1_NB_fx, 3, 64 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); IF( LT_32( core_brate, ACELP_9k60 ) ) { idx_g = vquant_fx( y_gain_tmp + 3, Mean_dic_NB_fx + 3, y_gain_tmp + 3, Gain_dic2_NB_fx, 3, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp + 6, Mean_dic_NB_fx + 6, y_gain_tmp + 6, Gain_dic3_NB_fx, 4, 16 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); } ELSE { idx_g = vquant_fx( y_gain_tmp + 3, Mean_dic_NB_fx + 3, y_gain_tmp + 3, Gain_dic2_NBHR_fx, 3, 64 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); idx_g = vquant_fx( y_gain_tmp + 6, Mean_dic_NB_fx + 6, y_gain_tmp + 6, Gain_dic3_NBHR_fx, 4, 128 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 7 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 7 ); } /*add end */ test(); Loading Loading @@ -1122,7 +1122,7 @@ Word16 gsc_gainQ_fx( /*Q12*/ move16(); idx_g = vquant_fx( mean_4g, mean_m_fx, mean_4g, mean_gain_dic_fx, 1, 64 ); push_indice_fx( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); push_indice( hBstr, IND_MEAN_GAIN2, idx_g, 6 ); FOR( i = 0; i < Mbands_gn; i++ ) { Loading @@ -1148,11 +1148,11 @@ Word16 gsc_gainQ_fx( /*Q12*/ move16(); idx_g = vquant_fx( y_gain_tmp2, YGain_mean_LR_fx, y_gain_tmp2, YGain_dic1_LR_fx, 3, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp2 + 3, YGain_mean_LR_fx + 3, y_gain_tmp2 + 3, YGain_dic2_LR_fx, 4, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp2 + 7, YGain_mean_LR_fx + 7, y_gain_tmp2 + 7, YGain_dic3_LR_fx, 5, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); set16_fx( y_gain_tmp2 + 12, 0, MBANDS_GN - 12 ); /* Update to quantized vector */ Loading Loading @@ -1185,13 +1185,13 @@ Word16 gsc_gainQ_fx( /*Q12*/ ELSE { idx_g = vquant_fx( y_gain_tmp, YG_mean16_fx, y_gain_tmp, YG_dicMR_1_fx, 4, 64 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 6 ); idx_g = vquant_fx( y_gain_tmp + 4, YG_mean16_fx + 4, y_gain_tmp + 4, YG_dicMR_2_fx, 4, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp + 8, YG_mean16_fx + 8, y_gain_tmp + 8, YG_dicMR_3_fx, 4, 32 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 5 ); idx_g = vquant_fx( y_gain_tmp + 12, YG_mean16_fx + 12, y_gain_tmp + 12, YG_dicMR_4_fx, 4, 16 ); push_indice_fx( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); push_indice( hBstr, IND_Y_GAIN_TMP, idx_g, 4 ); } } Loading
lib_com/hq_tools_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -2036,7 +2036,7 @@ Word16 calc_nor_delta_hf_fx( /* updating norm & storing delta norm */ add_bits_denv = 2; move16(); push_indice_fx( hBstr, IND_DELTA_ENV_HQ, sub( bitsforDelta, 2 ), 2 ); push_indice( hBstr, IND_DELTA_ENV_HQ, sub( bitsforDelta, 2 ), 2 ); FOR( i = num_env_bands; i < nb_sfm; ++i ) { IF( Rsubband[i] != 0 ) Loading @@ -2052,7 +2052,7 @@ Word16 calc_nor_delta_hf_fx( delta = min_delta; /*Q0*/ move16(); } push_indice_fx( hBstr, IND_DELTA_ENV_HQ, delta - min_delta, bitsforDelta ); push_indice( hBstr, IND_DELTA_ENV_HQ, delta - min_delta, bitsforDelta ); ynrm[i] = add( ynrm[i], delta ); /*Q0*/ move16(); add_bits_denv = add( add_bits_denv, bitsforDelta ); Loading
lib_com/pvq_com_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -622,7 +622,7 @@ void fine_gain_quant_fx( gain_db = round_fx_sat( L_shl_o( L_tmp, 17, &Overflow ) ); idx = squant_fx( gain_db, &gain_dbq, finegain_fx[gbits - 1], gain_cb_size[gbits - 1] ); push_indice_fx( hBstr, IND_PVQ_FINE_GAIN, idx, gbits ); push_indice( hBstr, IND_PVQ_FINE_GAIN, idx, gbits ); L_tmp = L_mult0( gain_dbq, 21771 ); /* 21771=0.05*log2(10) */ /* 14+17=31 */ L_tmp = L_shr( L_tmp, 15 ); /* Q16 */ Loading
lib_enc/FEC_enc_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ void FEC_encode_fx( index = 3; move16(); } push_indice_fx( hBstr, IND_FEC_CLAS, index, FEC_BITS_CLS ); push_indice( hBstr, IND_FEC_CLAS, index, FEC_BITS_CLS ); } /*-----------------------------------------------------------------* Loading @@ -117,7 +117,7 @@ void FEC_encode_fx( tmpS = s_min( tmpS, 31 ); tmpS = s_max( tmpS, 0 ); push_indice_fx( hBstr, IND_FEC_ENR, tmpS, FEC_BITS_ENR ); push_indice( hBstr, IND_FEC_ENR, tmpS, FEC_BITS_ENR ); } /*-----------------------------------------------------------------* * Encode last glottal pulse position (8 bits) Loading Loading @@ -157,7 +157,7 @@ void FEC_encode_fx( maxi = add( maxi, 128 ); /* use 8 bits (MSB represent the sign of the pulse) Q0*/ } push_indice_fx( hBstr, IND_FEC_POS, maxi, FEC_BITS_POS ); push_indice( hBstr, IND_FEC_POS, maxi, FEC_BITS_POS ); } maxi = 0; move16(); Loading