Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ #define FIX_1984_SAT_IN_PSYCHAD /* VA: Issue 1984: proposal to fix an assert */ #define NONBE_FIX_1376_MDCT_CONCEALMENT /* FhG: fix concealment artifact in MDCT Stereo with DTX, in case transition frame gets lost */ #define NONBE_1377_REND_DIRATT_CONF /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */ #define FIX_ISSUE_2004_LPC_SHB_SAT /* Dolby: Issue 2004: prevent saturation of the LPC SHB filter */ /* #################### End BASOP porting switches ############################ */ Loading lib_enc/swb_tbe_enc_fx.c +20 −1 Original line number Diff line number Diff line Loading @@ -3114,7 +3114,25 @@ void swb_tbe_enc_ivas_fx( enerG = Enr_1_Az_fx( lpc_shb1, 2 * L_SUBFR ); /* Q3 */ /* if the LP gain is greater than a threshold, avoid saturation */ #ifdef FIX_ISSUE_2004_LPC_SHB_SAT Word16 flag_sat = 0; Word16 lpc_shb_fx0_req_shift = sub( norm_s( lpc_shb_fx[0] ), 2); IF( GT_16( lpc_shb_fx0_req_shift, 0 ) ) { FOR( i = 1; i <= LPC_SHB_ORDER; i++ ) { IF( LT_16( norm_s( lpc_shb_fx[i] ), lpc_shb_fx0_req_shift ) ) { flag_sat = 1; break; } } } IF( GT_16( enerG, 256 /* 32.0 in Q3 */ ) || flag_sat ) #else IF( GT_16( enerG, 256 /*32 Q3*/ ) ) #endif { set16_fx( lpc_shb_fx, 0, LPC_SHB_ORDER + 1 ); E_LPC_lev_dur( R_h, R_l, lpc_shb_fx, LepsP, 2, NULL ); /* LPC in Q14 */ Loading @@ -3122,7 +3140,8 @@ void swb_tbe_enc_ivas_fx( } /* this is needed as the E_LPC_lev_dur function outputs lpc in Q14 */ scale_sig( lpc_shb_fx, LPC_SHB_ORDER + 1, sub( norm_s( lpc_shb_fx[0] ), 2 ) ); Word16 tmp_shift = sub( norm_s( lpc_shb_fx[0] ), 2 ); scale_sig( lpc_shb_fx, LPC_SHB_ORDER + 1, tmp_shift ); /* Expand bandwidth of the LP coeffs */ test(); Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ #define FIX_1984_SAT_IN_PSYCHAD /* VA: Issue 1984: proposal to fix an assert */ #define NONBE_FIX_1376_MDCT_CONCEALMENT /* FhG: fix concealment artifact in MDCT Stereo with DTX, in case transition frame gets lost */ #define NONBE_1377_REND_DIRATT_CONF /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */ #define FIX_ISSUE_2004_LPC_SHB_SAT /* Dolby: Issue 2004: prevent saturation of the LPC SHB filter */ /* #################### End BASOP porting switches ############################ */ Loading
lib_enc/swb_tbe_enc_fx.c +20 −1 Original line number Diff line number Diff line Loading @@ -3114,7 +3114,25 @@ void swb_tbe_enc_ivas_fx( enerG = Enr_1_Az_fx( lpc_shb1, 2 * L_SUBFR ); /* Q3 */ /* if the LP gain is greater than a threshold, avoid saturation */ #ifdef FIX_ISSUE_2004_LPC_SHB_SAT Word16 flag_sat = 0; Word16 lpc_shb_fx0_req_shift = sub( norm_s( lpc_shb_fx[0] ), 2); IF( GT_16( lpc_shb_fx0_req_shift, 0 ) ) { FOR( i = 1; i <= LPC_SHB_ORDER; i++ ) { IF( LT_16( norm_s( lpc_shb_fx[i] ), lpc_shb_fx0_req_shift ) ) { flag_sat = 1; break; } } } IF( GT_16( enerG, 256 /* 32.0 in Q3 */ ) || flag_sat ) #else IF( GT_16( enerG, 256 /*32 Q3*/ ) ) #endif { set16_fx( lpc_shb_fx, 0, LPC_SHB_ORDER + 1 ); E_LPC_lev_dur( R_h, R_l, lpc_shb_fx, LepsP, 2, NULL ); /* LPC in Q14 */ Loading @@ -3122,7 +3140,8 @@ void swb_tbe_enc_ivas_fx( } /* this is needed as the E_LPC_lev_dur function outputs lpc in Q14 */ scale_sig( lpc_shb_fx, LPC_SHB_ORDER + 1, sub( norm_s( lpc_shb_fx[0] ), 2 ) ); Word16 tmp_shift = sub( norm_s( lpc_shb_fx[0] ), 2 ); scale_sig( lpc_shb_fx, LPC_SHB_ORDER + 1, tmp_shift ); /* Expand bandwidth of the LP coeffs */ test(); Loading