Loading lib_com/ivas_prot_fx.h +2 −1 Original line number Diff line number Diff line Loading @@ -5840,7 +5840,8 @@ ivas_error ivas_compute_core_buffers_fx( Word16 lsp_mid_fx[M], /* i/o: LSPs in the middle of the frame */ Word16 Q_old_inp_16k, Word16 Q_r[2], Word16 *Q_new ); Word16 *Q_new, Word16 downscale_buf_speech_enc_pe); ivas_error ivas_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading lib_enc/ivas_core_pre_proc.c +15 −6 Original line number Diff line number Diff line Loading @@ -573,16 +573,17 @@ ivas_error pre_proc_ivas( move16(); IF( !flag_16k_smc ) { Word16 Q_old_inp_128k = *Q_new; error = ivas_compute_core_buffers_fx( st, &inp_16k_fx, old_inp_16k_fx, new_inp_resamp16k_fx, input_frame, last_element_mode, sr_core_tmp, ener_fx, A_fx, Aw_fx, epsP_fx, lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new ); lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new, 0 ); IF( NE_32( error, IVAS_ERR_OK ) ) { return error; } *epsP_fx_q = add( Q_r[0], 1 ); Scale_sig(old_inp_12k8_fx, L_INP_12k8, *Q_new); // Q_new-1 Scale_sig(old_inp_12k8_fx, L_INP_12k8, sub(*Q_new, Q_old_inp_128k)); // Q_new-1 } test(); IF( !( EQ_16( st->L_frame, L_FRAME16k ) && NE_16( element_mode, IVAS_CPE_MDCT ) ) ) Loading Loading @@ -687,7 +688,8 @@ ivas_error ivas_compute_core_buffers_fx( Word16 lsp_mid_fx[M], /* i/o: LSPs in the middle of the frame */ Word16 Q_old_inp_16k, Word16 Q_r[2], Word16 *Q_new ) Word16 *Q_new, Word16 downscale_buf_speech_enc_pe) { Word16 *inp_16k_fx, *new_inp_16k_fx; Word16 delay, element_mode; Loading Loading @@ -1176,18 +1178,25 @@ ivas_error ivas_compute_core_buffers_fx( IF( EQ_16( st->L_frame, L_FRAME16k ) && NE_16( element_mode, IVAS_CPE_MDCT ) ) { /* update signal buffers */ Word16 shift; if (downscale_buf_speech_enc_pe) { shift = negate(*Q_new); } else { shift = 0; } IF( EQ_16( element_mode, IVAS_CPE_DFT ) ) { Copy_Scale_sig(new_inp_16k_fx - STEREO_DFT_OVL_16k, st->buf_speech_enc_pe + L_FRAME16k - STEREO_DFT_OVL_16k, L_FRAME16k + STEREO_DFT_OVL_16k, negate(*Q_new)); //Q-1 Copy_Scale_sig(new_inp_16k_fx - STEREO_DFT_OVL_16k, st->buf_speech_enc_pe + L_FRAME16k - STEREO_DFT_OVL_16k, L_FRAME16k + STEREO_DFT_OVL_16k, shift); //Q-1 } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) ) { Copy_Scale_sig(new_inp_16k_fx - lMemRecalc_16k, st->buf_speech_enc_pe + L_FRAME16k - lMemRecalc_16k - L_FILT16k, L_FRAME16k + lMemRecalc_16k + L_FILT16k, negate(*Q_new)); //Q-1 Copy_Scale_sig(new_inp_16k_fx - lMemRecalc_16k, st->buf_speech_enc_pe + L_FRAME16k - lMemRecalc_16k - L_FILT16k, L_FRAME16k + lMemRecalc_16k + L_FILT16k, shift); //Q-1 } ELSE { Copy( new_inp_resamp16k_fx, st->buf_speech_enc + L_FRAME16k, L_FRAME16k ); Copy_Scale_sig(new_inp_16k_fx, st->buf_speech_enc_pe + L_FRAME16k, L_FRAME16k, negate(*Q_new)); //Q-1 Copy_Scale_sig(new_inp_16k_fx, st->buf_speech_enc_pe + L_FRAME16k, L_FRAME16k, shift); //Q-1 } /*--------------------------------------------------------------* Loading lib_enc/ivas_core_pre_proc_front.c +1 −1 Original line number Diff line number Diff line Loading @@ -1734,7 +1734,7 @@ ivas_error pre_proc_front_ivas_fx( error = ivas_compute_core_buffers_fx( st, NULL, old_inp_16k_fx, NULL, input_frame, IVAS_SCE /*last_element_mode*/, INT_FS_16k /*sr_core_tmp*/, ener_fx, A_fx, Aw_fx, epsP_fx, lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new ); lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new, 1 ); IF( error != IVAS_ERR_OK ) { return error; Loading Loading
lib_com/ivas_prot_fx.h +2 −1 Original line number Diff line number Diff line Loading @@ -5840,7 +5840,8 @@ ivas_error ivas_compute_core_buffers_fx( Word16 lsp_mid_fx[M], /* i/o: LSPs in the middle of the frame */ Word16 Q_old_inp_16k, Word16 Q_r[2], Word16 *Q_new ); Word16 *Q_new, Word16 downscale_buf_speech_enc_pe); ivas_error ivas_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading
lib_enc/ivas_core_pre_proc.c +15 −6 Original line number Diff line number Diff line Loading @@ -573,16 +573,17 @@ ivas_error pre_proc_ivas( move16(); IF( !flag_16k_smc ) { Word16 Q_old_inp_128k = *Q_new; error = ivas_compute_core_buffers_fx( st, &inp_16k_fx, old_inp_16k_fx, new_inp_resamp16k_fx, input_frame, last_element_mode, sr_core_tmp, ener_fx, A_fx, Aw_fx, epsP_fx, lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new ); lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new, 0 ); IF( NE_32( error, IVAS_ERR_OK ) ) { return error; } *epsP_fx_q = add( Q_r[0], 1 ); Scale_sig(old_inp_12k8_fx, L_INP_12k8, *Q_new); // Q_new-1 Scale_sig(old_inp_12k8_fx, L_INP_12k8, sub(*Q_new, Q_old_inp_128k)); // Q_new-1 } test(); IF( !( EQ_16( st->L_frame, L_FRAME16k ) && NE_16( element_mode, IVAS_CPE_MDCT ) ) ) Loading Loading @@ -687,7 +688,8 @@ ivas_error ivas_compute_core_buffers_fx( Word16 lsp_mid_fx[M], /* i/o: LSPs in the middle of the frame */ Word16 Q_old_inp_16k, Word16 Q_r[2], Word16 *Q_new ) Word16 *Q_new, Word16 downscale_buf_speech_enc_pe) { Word16 *inp_16k_fx, *new_inp_16k_fx; Word16 delay, element_mode; Loading Loading @@ -1176,18 +1178,25 @@ ivas_error ivas_compute_core_buffers_fx( IF( EQ_16( st->L_frame, L_FRAME16k ) && NE_16( element_mode, IVAS_CPE_MDCT ) ) { /* update signal buffers */ Word16 shift; if (downscale_buf_speech_enc_pe) { shift = negate(*Q_new); } else { shift = 0; } IF( EQ_16( element_mode, IVAS_CPE_DFT ) ) { Copy_Scale_sig(new_inp_16k_fx - STEREO_DFT_OVL_16k, st->buf_speech_enc_pe + L_FRAME16k - STEREO_DFT_OVL_16k, L_FRAME16k + STEREO_DFT_OVL_16k, negate(*Q_new)); //Q-1 Copy_Scale_sig(new_inp_16k_fx - STEREO_DFT_OVL_16k, st->buf_speech_enc_pe + L_FRAME16k - STEREO_DFT_OVL_16k, L_FRAME16k + STEREO_DFT_OVL_16k, shift); //Q-1 } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) ) { Copy_Scale_sig(new_inp_16k_fx - lMemRecalc_16k, st->buf_speech_enc_pe + L_FRAME16k - lMemRecalc_16k - L_FILT16k, L_FRAME16k + lMemRecalc_16k + L_FILT16k, negate(*Q_new)); //Q-1 Copy_Scale_sig(new_inp_16k_fx - lMemRecalc_16k, st->buf_speech_enc_pe + L_FRAME16k - lMemRecalc_16k - L_FILT16k, L_FRAME16k + lMemRecalc_16k + L_FILT16k, shift); //Q-1 } ELSE { Copy( new_inp_resamp16k_fx, st->buf_speech_enc + L_FRAME16k, L_FRAME16k ); Copy_Scale_sig(new_inp_16k_fx, st->buf_speech_enc_pe + L_FRAME16k, L_FRAME16k, negate(*Q_new)); //Q-1 Copy_Scale_sig(new_inp_16k_fx, st->buf_speech_enc_pe + L_FRAME16k, L_FRAME16k, shift); //Q-1 } /*--------------------------------------------------------------* Loading
lib_enc/ivas_core_pre_proc_front.c +1 −1 Original line number Diff line number Diff line Loading @@ -1734,7 +1734,7 @@ ivas_error pre_proc_front_ivas_fx( error = ivas_compute_core_buffers_fx( st, NULL, old_inp_16k_fx, NULL, input_frame, IVAS_SCE /*last_element_mode*/, INT_FS_16k /*sr_core_tmp*/, ener_fx, A_fx, Aw_fx, epsP_fx, lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new ); lsp_new_fx, lsp_mid_fx, Q_old_inp_16k, Q_r, Q_new, 1 ); IF( error != IVAS_ERR_OK ) { return error; Loading