Loading lib_enc/acelp_core_enc.c +5 −7 Original line number Diff line number Diff line Loading @@ -210,15 +210,14 @@ ivas_error acelp_core_enc( Word16 *inp_fx; inp_fx = &inp_buff[M + 1]; Word16 q_comm_Bin, Q_new /* Q_new will be later passed from parent function as arg */; q_comm_Bin = s_min( Q_factor_arrL( st->Bin_E_old, 128 ), Q_factor_arrL( st->Bin_E, 256 ) ); Q_new = min(Q_factor_arr( &inp[-M - 1], L_FRAME16k + M + 1 ), Q_factor_arr(&st->hLPDmem->old_exc_flt[-M - 1], L_EXC_MEM + M + 1)); Q_new = s_min( Q_new, q_comm_Bin - ( QSCALE - 2 ) ); q_comm_Bin = min( Q_factor_arrL( st->Bin_E_old, 128 ), Q_factor_arrL( st->Bin_E, 256 ) ); Q_new = Q_factor_arr( &inp[-M - 1], L_FRAME16k + M + 1 ); Q_new = min( Q_new, q_comm_Bin - ( QSCALE - 2 ) ); Q_new = min(Q_new, 5); IF(st->hLPDmem) { Q_new = min(Q_new, Q_factor_arr(&st->hLPDmem->old_exc_flt[-M - 1], L_EXC_MEM + M + 1)); st->hLPDmem->e_old_exc = 15 - Q_new; floatToFixed_arr(&st->hLPDmem->old_exc_flt[-M - 1], &st->hLPDmem->old_exc[-M - 1], Q_new, L_EXC_MEM + M + 1); } IF(st->hLPDmem) { Word16 Q_temp = s_min(Q_factor_arr(st->hLPDmem->mem_syn_flt, 16), s_min(Q_factor_arr(st->hLPDmem->mem_syn1_flt, 16), s_min(Q_factor_arr(st->hLPDmem->mem_syn2_flt, 16), Loading @@ -232,7 +231,6 @@ ivas_error acelp_core_enc( floatToFixed_arr(st->hLPDmem->mem_syn_r_flt, st->hLPDmem->mem_syn_r, Q_new, 60); } //Q_new = Q_new - 3; //guard bits Q_new = s_min( Q_new, 5 ); floatToFixed_arr( &inp[-M - 1], &inp_fx[-M - 1], Q_new, L_FRAME16k + M + 1 ); floatToFixed_arrL( st->Bin_E_old, st->Bin_E_old_fx, Q_new + Q_SCALE - 2, 128 ); floatToFixed_arrL( st->Bin_E, st->Bin_E_fx, Q_new + Q_SCALE - 2, 256 ); Loading Loading
lib_enc/acelp_core_enc.c +5 −7 Original line number Diff line number Diff line Loading @@ -210,15 +210,14 @@ ivas_error acelp_core_enc( Word16 *inp_fx; inp_fx = &inp_buff[M + 1]; Word16 q_comm_Bin, Q_new /* Q_new will be later passed from parent function as arg */; q_comm_Bin = s_min( Q_factor_arrL( st->Bin_E_old, 128 ), Q_factor_arrL( st->Bin_E, 256 ) ); Q_new = min(Q_factor_arr( &inp[-M - 1], L_FRAME16k + M + 1 ), Q_factor_arr(&st->hLPDmem->old_exc_flt[-M - 1], L_EXC_MEM + M + 1)); Q_new = s_min( Q_new, q_comm_Bin - ( QSCALE - 2 ) ); q_comm_Bin = min( Q_factor_arrL( st->Bin_E_old, 128 ), Q_factor_arrL( st->Bin_E, 256 ) ); Q_new = Q_factor_arr( &inp[-M - 1], L_FRAME16k + M + 1 ); Q_new = min( Q_new, q_comm_Bin - ( QSCALE - 2 ) ); Q_new = min(Q_new, 5); IF(st->hLPDmem) { Q_new = min(Q_new, Q_factor_arr(&st->hLPDmem->old_exc_flt[-M - 1], L_EXC_MEM + M + 1)); st->hLPDmem->e_old_exc = 15 - Q_new; floatToFixed_arr(&st->hLPDmem->old_exc_flt[-M - 1], &st->hLPDmem->old_exc[-M - 1], Q_new, L_EXC_MEM + M + 1); } IF(st->hLPDmem) { Word16 Q_temp = s_min(Q_factor_arr(st->hLPDmem->mem_syn_flt, 16), s_min(Q_factor_arr(st->hLPDmem->mem_syn1_flt, 16), s_min(Q_factor_arr(st->hLPDmem->mem_syn2_flt, 16), Loading @@ -232,7 +231,6 @@ ivas_error acelp_core_enc( floatToFixed_arr(st->hLPDmem->mem_syn_r_flt, st->hLPDmem->mem_syn_r, Q_new, 60); } //Q_new = Q_new - 3; //guard bits Q_new = s_min( Q_new, 5 ); floatToFixed_arr( &inp[-M - 1], &inp_fx[-M - 1], Q_new, L_FRAME16k + M + 1 ); floatToFixed_arrL( st->Bin_E_old, st->Bin_E_old_fx, Q_new + Q_SCALE - 2, 128 ); floatToFixed_arrL( st->Bin_E, st->Bin_E_fx, Q_new + Q_SCALE - 2, 256 ); Loading