Loading apps/decoder.c +17 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,11 @@ int main( if ( arg.hrtfReaderEnabled ) { /* sanity check */ #ifdef NONBE_1293_SR_HRTF if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) #else if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { arg.hrtfReaderEnabled = false; fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" ); Loading Loading @@ -476,7 +480,19 @@ int main( } } #ifdef FIX_VOIP_FUNCTIONS /*-----------------------------------------------------------------* * Print config information *-----------------------------------------------------------------*/ if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif /*-------------------------------------------------------------------* * Load renderer configuration from file Loading Loading @@ -558,7 +574,7 @@ int main( if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading lib_com/fft_fx_evs.c +247 −247 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_com/frame_ener_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8 /* len = (0.5f * (pitch[2]/64.0 + pitch[3]/64.0) + 0.5f) */ #ifdef ISSUE_1836_replace_overflow_libcom len = mult_r( add_sat( pitch[2], pitch[3] ), 256 ); //??sat len = mult_r( add_sat( pitch[2], pitch[3] ), 256 ); #else len = mult_r( add_o( pitch[2], pitch[3], &Overflow ), 256 ); #endif Loading Loading @@ -285,13 +285,13 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8 /*add ld(2^exp1)=exp1 but check format, first*/ tmp16 = sub( sub( 15, norm_s( exp1 ) ), 5 ); /*factor to shift Ltmp and exp1 with (shr) to avoid overflows when adding*/ #ifdef ISSUE_1836_replace_overflow_libcom Ltmp = L_shr_sat( Ltmp, tmp16 ); /*Q25, tmp16*/ //??sat Ltmp = L_shr_sat( Ltmp, tmp16 ); /*Q25, tmp16*/ #else Ltmp = L_shr_o( Ltmp, tmp16, &Overflow ); /*Q25, tmp16*/ #endif exp2 = shr( exp1, tmp16 ); /*Q0 , tmp16*/ #ifdef ISSUE_1836_replace_overflow_libcom Ltmp = L_add_sat( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ) ); /*Q25, tmp16, normalized*/ //??sat Ltmp = L_add_sat( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ) ); /*Q25, tmp16, normalized*/ #else Ltmp = L_add_o( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ), &Overflow ); /*Q25, tmp16, normalized*/ #endif Loading @@ -299,9 +299,9 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8 /*make 10*log10 out of log2*/ Ltmp = Mpy_32_16_1( Ltmp, LG10 ); /*Q25,tmp16 * Q13 = Q23, tmp16*/ #ifdef ISSUE_1836_replace_overflow_libcom *frame_ener = extract_h( L_shl_sat( Ltmp, add( tmp16, 1 ) ) ); /*Q8*/ //??sat *frame_ener = extract_h( L_shl_sat( Ltmp, add( tmp16, 1 ) ) ); /*Q8*/ move16(); enern = sub_sat( *frame_ener, lp_speech ); /*Q8*/ //??sat enern = sub_sat( *frame_ener, lp_speech ); /*Q8*/ #else *frame_ener = extract_h( L_shl_o( Ltmp, add( tmp16, 1 ), &Overflow ) ); /*Q8*/ move16(); Loading lib_com/get_gain_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ Word32 get_gain( /* output: codebook gain (adaptive or fixed) tener = Dot_productSq16HQ( 0, y, n, &exp_e ); #ifdef ISSUE_1836_replace_overflow_libcom BASOP_Util_Divide_MantExp( round_fx_sat( tcorr ), exp_c, s_max( round_fx_sat( tener ), 1 ), exp_e, &tmp, &exp ); //??sat BASOP_Util_Divide_MantExp( round_fx_sat( tcorr ), exp_c, s_max( round_fx_sat( tener ), 1 ), exp_e, &tmp, &exp ); Lgain = L_shl_sat( L_deposit_l( tmp ) /*Q15*/, add( 1, exp ) ) /*Q16*/; //?sat #else BASOP_Util_Divide_MantExp( round_fx_o( tcorr, &Overflow ), exp_c, s_max( round_fx_o( tener, &Overflow ), 1 ), exp_e, &tmp, &exp ); Loading Loading @@ -140,7 +140,7 @@ Word32 get_gain2( /* output: codebook gain (adaptive or fixed) Q_corr = sub( Q_corr, Q_ener ); #ifdef ISSUE_1836_replace_overflow_libcom Lgain = L_shl_sat( L_deposit_l( m_corr ), add( Q_corr, 1 ) ); /* Lgain in Q16 */ //??sat Lgain = L_shl_sat( L_deposit_l( m_corr ), add( Q_corr, 1 ) ); /* Lgain in Q16 */ #else Lgain = L_shl_o( L_deposit_l( m_corr ), add( Q_corr, 1 ), &Overflow ); /* Lgain in Q16 */ #endif Loading lib_com/gs_bitallocation_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ void bands_and_bit_alloc_fx( /* To adapt current energy band to PVQ freq band for sorting*/ #ifdef ISSUE_1836_replace_overflow_libcom ener_vec[0] = add_sat( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1] ); /*Q12 */ //??sat ener_vec[0] = add_sat( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1] ); /*Q12 */ #else ener_vec[0] = add_o( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1], &Overflow ); /*Q12 */ #endif Loading Loading
apps/decoder.c +17 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,11 @@ int main( if ( arg.hrtfReaderEnabled ) { /* sanity check */ #ifdef NONBE_1293_SR_HRTF if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) #else if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) #endif { arg.hrtfReaderEnabled = false; fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" ); Loading Loading @@ -476,7 +480,19 @@ int main( } } #ifdef FIX_VOIP_FUNCTIONS /*-----------------------------------------------------------------* * Print config information *-----------------------------------------------------------------*/ if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #else IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif /*-------------------------------------------------------------------* * Load renderer configuration from file Loading Loading @@ -558,7 +574,7 @@ int main( if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); fprintf( stderr, "\nIVAS_DEC_SetRenderFramesize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } Loading
lib_com/fft_fx_evs.c +247 −247 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_com/frame_ener_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8 /* len = (0.5f * (pitch[2]/64.0 + pitch[3]/64.0) + 0.5f) */ #ifdef ISSUE_1836_replace_overflow_libcom len = mult_r( add_sat( pitch[2], pitch[3] ), 256 ); //??sat len = mult_r( add_sat( pitch[2], pitch[3] ), 256 ); #else len = mult_r( add_o( pitch[2], pitch[3], &Overflow ), 256 ); #endif Loading Loading @@ -285,13 +285,13 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8 /*add ld(2^exp1)=exp1 but check format, first*/ tmp16 = sub( sub( 15, norm_s( exp1 ) ), 5 ); /*factor to shift Ltmp and exp1 with (shr) to avoid overflows when adding*/ #ifdef ISSUE_1836_replace_overflow_libcom Ltmp = L_shr_sat( Ltmp, tmp16 ); /*Q25, tmp16*/ //??sat Ltmp = L_shr_sat( Ltmp, tmp16 ); /*Q25, tmp16*/ #else Ltmp = L_shr_o( Ltmp, tmp16, &Overflow ); /*Q25, tmp16*/ #endif exp2 = shr( exp1, tmp16 ); /*Q0 , tmp16*/ #ifdef ISSUE_1836_replace_overflow_libcom Ltmp = L_add_sat( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ) ); /*Q25, tmp16, normalized*/ //??sat Ltmp = L_add_sat( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ) ); /*Q25, tmp16, normalized*/ #else Ltmp = L_add_o( Ltmp, L_shl( L_deposit_l( exp2 ), 25 ), &Overflow ); /*Q25, tmp16, normalized*/ #endif Loading @@ -299,9 +299,9 @@ Word16 frame_energy_fx( /* o : Frame energy in Q8 /*make 10*log10 out of log2*/ Ltmp = Mpy_32_16_1( Ltmp, LG10 ); /*Q25,tmp16 * Q13 = Q23, tmp16*/ #ifdef ISSUE_1836_replace_overflow_libcom *frame_ener = extract_h( L_shl_sat( Ltmp, add( tmp16, 1 ) ) ); /*Q8*/ //??sat *frame_ener = extract_h( L_shl_sat( Ltmp, add( tmp16, 1 ) ) ); /*Q8*/ move16(); enern = sub_sat( *frame_ener, lp_speech ); /*Q8*/ //??sat enern = sub_sat( *frame_ener, lp_speech ); /*Q8*/ #else *frame_ener = extract_h( L_shl_o( Ltmp, add( tmp16, 1 ), &Overflow ) ); /*Q8*/ move16(); Loading
lib_com/get_gain_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ Word32 get_gain( /* output: codebook gain (adaptive or fixed) tener = Dot_productSq16HQ( 0, y, n, &exp_e ); #ifdef ISSUE_1836_replace_overflow_libcom BASOP_Util_Divide_MantExp( round_fx_sat( tcorr ), exp_c, s_max( round_fx_sat( tener ), 1 ), exp_e, &tmp, &exp ); //??sat BASOP_Util_Divide_MantExp( round_fx_sat( tcorr ), exp_c, s_max( round_fx_sat( tener ), 1 ), exp_e, &tmp, &exp ); Lgain = L_shl_sat( L_deposit_l( tmp ) /*Q15*/, add( 1, exp ) ) /*Q16*/; //?sat #else BASOP_Util_Divide_MantExp( round_fx_o( tcorr, &Overflow ), exp_c, s_max( round_fx_o( tener, &Overflow ), 1 ), exp_e, &tmp, &exp ); Loading Loading @@ -140,7 +140,7 @@ Word32 get_gain2( /* output: codebook gain (adaptive or fixed) Q_corr = sub( Q_corr, Q_ener ); #ifdef ISSUE_1836_replace_overflow_libcom Lgain = L_shl_sat( L_deposit_l( m_corr ), add( Q_corr, 1 ) ); /* Lgain in Q16 */ //??sat Lgain = L_shl_sat( L_deposit_l( m_corr ), add( Q_corr, 1 ) ); /* Lgain in Q16 */ #else Lgain = L_shl_o( L_deposit_l( m_corr ), add( Q_corr, 1 ), &Overflow ); /* Lgain in Q16 */ #endif Loading
lib_com/gs_bitallocation_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ void bands_and_bit_alloc_fx( /* To adapt current energy band to PVQ freq band for sorting*/ #ifdef ISSUE_1836_replace_overflow_libcom ener_vec[0] = add_sat( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1] ); /*Q12 */ //??sat ener_vec[0] = add_sat( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1] ); /*Q12 */ #else ener_vec[0] = add_o( Ener_per_bd_iQ[0], Ener_per_bd_iQ[1], &Overflow ); /*Q12 */ #endif Loading