Loading lib_com/edct.c +24 −0 Original line number Diff line number Diff line Loading @@ -275,8 +275,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ); const float wIm = sinf( angle_tmp ); #else const float wRe = cosf( scale * k ); const float wIm = sinf( scale * k ); #endif y[k] /*pt 1*/ = wRe * re[k] + wIm * im[k]; y[length - k] = wIm * re[k] - wRe * im[k]; Loading @@ -287,8 +293,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ); const float wIm = sinf( angle_tmp ); #else const float wRe = cosf( scale * k ); const float wIm = sinf( scale * k ); #endif y[Nm1 - k] = wRe * re[k] + wIm * im[k]; y[k - 1] = wIm * re[k] - wRe * im[k]; Loading @@ -304,8 +316,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ) * 0.5f; const float wIm = sinf( angle_tmp ) * 0.5f; #else const float wRe = cosf( scale * k ) * 0.5f; const float wIm = sinf( scale * k ) * 0.5f; #endif re[k] = wRe * x[k] + wIm * x[length - k]; im[k] = wRe * x[length - k] - wIm * x[k]; Loading @@ -316,8 +334,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ) * 0.5f; const float wIm = sinf( angle_tmp ) * 0.5f; #else const float wRe = cosf( scale * k ) * 0.5f; const float wIm = sinf( scale * k ) * 0.5f; #endif re[k] = wRe * x[Nm1 - k] + wIm * x[k - 1]; im[k] = wRe * x[k - 1] - wIm * x[Nm1 - k]; Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ #define NONBE_1412_AVOID_ROUNDING_AZ_ELEV /* FhG: Avoid rounding when passing azimuth and elevation to efap_determine_gains() */ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* FhG: fix non-BE in DFT stereo encoder between optimization levels */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 /* FhG: fix even more non-BEnesses */ /* ##################### End NON-BE switches ########################### */ Loading lib_dec/ivas_stereo_dft_dec.c +16 −0 Original line number Diff line number Diff line Loading @@ -1384,8 +1384,16 @@ void stereo_dft_dec( if ( pgIpd[0] != 0.f ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c0 = cosf( pgIpd_tmp ); s0 = sinf( pgIpd_tmp ); #else c0 = cosf( pgIpd[0] ); s0 = sinf( pgIpd[0] ); #endif for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) { /*rotate L*/ Loading Loading @@ -1566,8 +1574,16 @@ void stereo_dft_dec( /* Active Upmix */ if ( pgIpd[0] != 0.f ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c0 = cosf( pgIpd_tmp ); s0 = sinf( pgIpd_tmp ); #else c0 = cosf( pgIpd[0] ); s0 = sinf( pgIpd[0] ); #endif for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) { /*rotate L*/ Loading lib_dec/ivas_stereo_dft_plc.c +9 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,9 @@ void stereo_dft_res_subst_spec( /* Apply phase adjustment of identified peaks, including Np=1 peak neighbors on each side */ for ( i = *num_plocs - 1; i >= 0; i-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float corr_phase_tmp; #endif if ( k == 0 ) { /* For 1st subframe, apply reversed time ECU to get correct analysis window */ Loading @@ -268,8 +271,14 @@ void stereo_dft_res_subst_spec( conj_sign = 1.0f; } #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 corr_phase_tmp = corr_phase; cos_F = cosf( corr_phase_tmp ); sin_F = sinf( corr_phase_tmp ); #else cos_F = cosf( corr_phase ); sin_F = sinf( corr_phase ); #endif idx = max( 0, plocs[i] - Np ); /* Iterate over plocs[i]-1:plocs[i]+1, considering the edges of the spectrum */ while ( ( idx < plocs[i] + Np + 1 ) && ( idx < L_res ) ) Loading lib_enc/ivas_stereo_dft_enc.c +9 −1 Original line number Diff line number Diff line Loading @@ -1453,8 +1453,16 @@ void stereo_dft_enc_process( if ( pgIpd[0] != 0.f ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c = cosf( pgIpd_tmp ); s = sinf( pgIpd_tmp ); #else c = cosf( pgIpd[0] ); s = sinf( pgIpd[0] ); #endif for ( i = hStereoDft->band_limits_dmx[b]; i < hStereoDft->band_limits_dmx[b + 1]; i++ ) { /*rotate L*/ Loading Loading
lib_com/edct.c +24 −0 Original line number Diff line number Diff line Loading @@ -275,8 +275,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ); const float wIm = sinf( angle_tmp ); #else const float wRe = cosf( scale * k ); const float wIm = sinf( scale * k ); #endif y[k] /*pt 1*/ = wRe * re[k] + wIm * im[k]; y[length - k] = wIm * re[k] - wRe * im[k]; Loading @@ -287,8 +293,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ); const float wIm = sinf( angle_tmp ); #else const float wRe = cosf( scale * k ); const float wIm = sinf( scale * k ); #endif y[Nm1 - k] = wRe * re[k] + wIm * im[k]; y[k - 1] = wIm * re[k] - wRe * im[k]; Loading @@ -304,8 +316,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ) * 0.5f; const float wIm = sinf( angle_tmp ) * 0.5f; #else const float wRe = cosf( scale * k ) * 0.5f; const float wIm = sinf( scale * k ) * 0.5f; #endif re[k] = wRe * x[k] + wIm * x[length - k]; im[k] = wRe * x[length - k] - wIm * x[k]; Loading @@ -316,8 +334,14 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ) * 0.5f; const float wIm = sinf( angle_tmp ) * 0.5f; #else const float wRe = cosf( scale * k ) * 0.5f; const float wIm = sinf( scale * k ) * 0.5f; #endif re[k] = wRe * x[Nm1 - k] + wIm * x[k - 1]; im[k] = wRe * x[k - 1] - wIm * x[Nm1 - k]; Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ #define NONBE_1412_AVOID_ROUNDING_AZ_ELEV /* FhG: Avoid rounding when passing azimuth and elevation to efap_determine_gains() */ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* FhG: fix non-BE in DFT stereo encoder between optimization levels */ #define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 /* FhG: fix even more non-BEnesses */ /* ##################### End NON-BE switches ########################### */ Loading
lib_dec/ivas_stereo_dft_dec.c +16 −0 Original line number Diff line number Diff line Loading @@ -1384,8 +1384,16 @@ void stereo_dft_dec( if ( pgIpd[0] != 0.f ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c0 = cosf( pgIpd_tmp ); s0 = sinf( pgIpd_tmp ); #else c0 = cosf( pgIpd[0] ); s0 = sinf( pgIpd[0] ); #endif for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) { /*rotate L*/ Loading Loading @@ -1566,8 +1574,16 @@ void stereo_dft_dec( /* Active Upmix */ if ( pgIpd[0] != 0.f ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c0 = cosf( pgIpd_tmp ); s0 = sinf( pgIpd_tmp ); #else c0 = cosf( pgIpd[0] ); s0 = sinf( pgIpd[0] ); #endif for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) { /*rotate L*/ Loading
lib_dec/ivas_stereo_dft_plc.c +9 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,9 @@ void stereo_dft_res_subst_spec( /* Apply phase adjustment of identified peaks, including Np=1 peak neighbors on each side */ for ( i = *num_plocs - 1; i >= 0; i-- ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float corr_phase_tmp; #endif if ( k == 0 ) { /* For 1st subframe, apply reversed time ECU to get correct analysis window */ Loading @@ -268,8 +271,14 @@ void stereo_dft_res_subst_spec( conj_sign = 1.0f; } #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 corr_phase_tmp = corr_phase; cos_F = cosf( corr_phase_tmp ); sin_F = sinf( corr_phase_tmp ); #else cos_F = cosf( corr_phase ); sin_F = sinf( corr_phase ); #endif idx = max( 0, plocs[i] - Np ); /* Iterate over plocs[i]-1:plocs[i]+1, considering the edges of the spectrum */ while ( ( idx < plocs[i] + Np + 1 ) && ( idx < L_res ) ) Loading
lib_enc/ivas_stereo_dft_enc.c +9 −1 Original line number Diff line number Diff line Loading @@ -1453,8 +1453,16 @@ void stereo_dft_enc_process( if ( pgIpd[0] != 0.f ) { #ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c = cosf( pgIpd_tmp ); s = sinf( pgIpd_tmp ); #else c = cosf( pgIpd[0] ); s = sinf( pgIpd[0] ); #endif for ( i = hStereoDft->band_limits_dmx[b]; i < hStereoDft->band_limits_dmx[b + 1]; i++ ) { /*rotate L*/ Loading