Commit 9162017f authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO

parent a7d3687d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -180,7 +180,6 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ 
#define NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO    /* FhG: avoid sidegain DFT-Stereo param to be larger than 1 when converting from Dirac parameters */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+0 −7
Original line number Diff line number Diff line
@@ -395,7 +395,6 @@ static void map_params_dirac_to_stereo(
                }
            }

#ifdef NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO
            /* Clamp values here. [-1, 1] is the allowed range, but due to precision issues they can be slightly off which can cause problems later. */
            side_gain[b] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b] = max( min( side_gain[b], 1 ), -1 );
@@ -406,12 +405,6 @@ static void map_params_dirac_to_stereo(
            res_pred_gain[b] = max( min( res_pred_gain[b], 1 ), 0 );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = max( min( res_pred_gain[b + STEREO_DFT_BAND_MAX], 1 ), 0 );
#else
            side_gain[b] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] );
            res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] );
#endif
        }
    }