Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ #define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ #define FIX_2261_REMOVE_LP_RESCALING /* VA: Remove of unnecessary lpc coefficient rescaling */ /* ##################### End NON-BE switches ########################### */ Loading lib_enc/acelp_core_enc_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -1099,11 +1099,13 @@ ivas_error acelp_core_enc_ivas_fx( move16(); st->hLPDmem->q_mem_syn = st->Q_syn; move16(); #ifndef FIX_2261_REMOVE_LP_RESCALING // Scaling Aq to Q12 FOR( Word16 k = 0; k < NB_SUBFR16k; k++ ) { Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) ); } #endif /* synthesis at 12.8kHz sampling rate */ syn_12k8_fx( st->L_frame, Aq, exc3_fx, syn1_fx, hLPDmem->mem_syn3, 1, sub( Q_new, 1 ), st->Q_syn ); Loading Loading @@ -1244,11 +1246,13 @@ ivas_error acelp_core_enc_ivas_fx( st->stab_fac_fx = lsf_stab_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); // Q15 move16(); } #ifndef FIX_2261_REMOVE_LP_RESCALING // Scaling Aq to Q12 FOR( Word16 k = 0; k < NB_SUBFR16k; k++ ) { Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) ); } #endif test(); IF( EQ_16( st->last_core, HQ_CORE ) && st->element_mode > EVS_MONO ) { Loading Loading @@ -1455,6 +1459,10 @@ ivas_error acelp_core_enc_ivas_fx( { Copy( Aq + 3 * ( M + 1 ), st->hBWE_TD->cur_sub_Aq_fx, ( M + 1 ) ); // Q12 } #ifdef FIX_2261_REMOVE_LP_RESCALING // Scaling Aq to Q12 Scale_sig( st->hBWE_TD->cur_sub_Aq_fx, M + 1, sub( norm_s( st->hBWE_TD->cur_sub_Aq_fx[0] ), 2 ) ); #endif } Loading lib_enc/ivas_core_enc_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -224,11 +224,13 @@ ivas_error ivas_core_enc_fx( Scale_sig( fft_buff_fx[n], ( 2 * L_FFT ), -1 ); // To create 1 headroom for addition of magnitude square spectrum // fft_buff_fx_exp = add(fft_buff_fx_exp,1); #ifndef FIX_2261_REMOVE_LP_RESCALING FOR( i = 0; i < st->nb_subfr; i++ ) { Scale_sig( &A_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 } #endif IF( EQ_32( ivas_format, SBA_FORMAT ) ) { IF( NE_32( ( error = pre_proc_ivas_fx( st, last_element_mode, element_brate, last_element_brate, input_frame, old_inp_12k8_fx[n] /* i: -1, o: Q_new - 1 */, old_inp_16k_fx[n] /* i: -1, o: Q_new - 1 */, Loading Loading @@ -334,10 +336,12 @@ ivas_error ivas_core_enc_fx( test(); IF( ( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { #ifndef FIX_2261_REMOVE_LP_RESCALING FOR( i = 0; i < st->nb_subfr; i++ ) { Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 } #endif TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc; Word16 Q_spec_old, L_spec; Loading lib_enc/ivas_front_vad_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -636,8 +636,9 @@ ivas_error front_vad_spar_fx( } relE_fx = sub( Etot_fx[0], extract_h( st->lp_speech_32fx ) ); #ifndef FIX_2261_REMOVE_LP_RESCALING Scale_sig( A_fx, ( L_FRAME / L_SUBFR ) * ( M + 1 ), -2 ); // Q12 #endif st->mem_wsp_fx = (Word16) shl_sat( st->mem_wsp_fx, Q_inp_12k8 - st->mem_wsp_q ); /* Q_inp_12k8 */ st->mem_wsp_q = Q_inp_12k8; move16(); Loading lib_enc/ivas_ism_enc_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -238,11 +238,12 @@ ivas_error ivas_ism_enc_fx( /*----------------------------------------------------------------* * Front Pre-processing *----------------------------------------------------------------*/ #ifndef FIX_2261_REMOVE_LP_RESCALING FOR( i = 0; i < hSCE->hCoreCoder[0]->nb_subfr; i++ ) { Scale_sig( &A_fx[sce_id][0][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[sce_id][0][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 } #endif set16_fx( old_wsp_fx[sce_id][0], 0, L_WSP ); q_old_wsp = Q15; move16(); Loading Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ #define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ #define FIX_2261_REMOVE_LP_RESCALING /* VA: Remove of unnecessary lpc coefficient rescaling */ /* ##################### End NON-BE switches ########################### */ Loading
lib_enc/acelp_core_enc_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -1099,11 +1099,13 @@ ivas_error acelp_core_enc_ivas_fx( move16(); st->hLPDmem->q_mem_syn = st->Q_syn; move16(); #ifndef FIX_2261_REMOVE_LP_RESCALING // Scaling Aq to Q12 FOR( Word16 k = 0; k < NB_SUBFR16k; k++ ) { Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) ); } #endif /* synthesis at 12.8kHz sampling rate */ syn_12k8_fx( st->L_frame, Aq, exc3_fx, syn1_fx, hLPDmem->mem_syn3, 1, sub( Q_new, 1 ), st->Q_syn ); Loading Loading @@ -1244,11 +1246,13 @@ ivas_error acelp_core_enc_ivas_fx( st->stab_fac_fx = lsf_stab_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); // Q15 move16(); } #ifndef FIX_2261_REMOVE_LP_RESCALING // Scaling Aq to Q12 FOR( Word16 k = 0; k < NB_SUBFR16k; k++ ) { Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) ); } #endif test(); IF( EQ_16( st->last_core, HQ_CORE ) && st->element_mode > EVS_MONO ) { Loading Loading @@ -1455,6 +1459,10 @@ ivas_error acelp_core_enc_ivas_fx( { Copy( Aq + 3 * ( M + 1 ), st->hBWE_TD->cur_sub_Aq_fx, ( M + 1 ) ); // Q12 } #ifdef FIX_2261_REMOVE_LP_RESCALING // Scaling Aq to Q12 Scale_sig( st->hBWE_TD->cur_sub_Aq_fx, M + 1, sub( norm_s( st->hBWE_TD->cur_sub_Aq_fx[0] ), 2 ) ); #endif } Loading
lib_enc/ivas_core_enc_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -224,11 +224,13 @@ ivas_error ivas_core_enc_fx( Scale_sig( fft_buff_fx[n], ( 2 * L_FFT ), -1 ); // To create 1 headroom for addition of magnitude square spectrum // fft_buff_fx_exp = add(fft_buff_fx_exp,1); #ifndef FIX_2261_REMOVE_LP_RESCALING FOR( i = 0; i < st->nb_subfr; i++ ) { Scale_sig( &A_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 } #endif IF( EQ_32( ivas_format, SBA_FORMAT ) ) { IF( NE_32( ( error = pre_proc_ivas_fx( st, last_element_mode, element_brate, last_element_brate, input_frame, old_inp_12k8_fx[n] /* i: -1, o: Q_new - 1 */, old_inp_16k_fx[n] /* i: -1, o: Q_new - 1 */, Loading Loading @@ -334,10 +336,12 @@ ivas_error ivas_core_enc_fx( test(); IF( ( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { #ifndef FIX_2261_REMOVE_LP_RESCALING FOR( i = 0; i < st->nb_subfr; i++ ) { Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 } #endif TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc; Word16 Q_spec_old, L_spec; Loading
lib_enc/ivas_front_vad_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -636,8 +636,9 @@ ivas_error front_vad_spar_fx( } relE_fx = sub( Etot_fx[0], extract_h( st->lp_speech_32fx ) ); #ifndef FIX_2261_REMOVE_LP_RESCALING Scale_sig( A_fx, ( L_FRAME / L_SUBFR ) * ( M + 1 ), -2 ); // Q12 #endif st->mem_wsp_fx = (Word16) shl_sat( st->mem_wsp_fx, Q_inp_12k8 - st->mem_wsp_q ); /* Q_inp_12k8 */ st->mem_wsp_q = Q_inp_12k8; move16(); Loading
lib_enc/ivas_ism_enc_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -238,11 +238,12 @@ ivas_error ivas_ism_enc_fx( /*----------------------------------------------------------------* * Front Pre-processing *----------------------------------------------------------------*/ #ifndef FIX_2261_REMOVE_LP_RESCALING FOR( i = 0; i < hSCE->hCoreCoder[0]->nb_subfr; i++ ) { Scale_sig( &A_fx[sce_id][0][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[sce_id][0][i * ( M + 1 )] ), 2 ) ); // scaling to Q12 } #endif set16_fx( old_wsp_fx[sce_id][0], 0, L_WSP ); q_old_wsp = Q15; move16(); Loading