Commit d429012e authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO

parent ea5a47e5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@

/* #################### Start BASOP porting switches ############################ */

#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 */
#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR            /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS              /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */
#define NONBE_FIX_1130_DIV_ZERO_LEV_DUR                 /* VA: issue 1130: avoid div by zero in L-D by thresholding R[0] to a min value of 100.0 */
+0 −9
Original line number Diff line number Diff line
@@ -622,10 +622,8 @@ static void map_params_dirac_to_stereo(
                    move32();
                }
            }
#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. */
            /* In Q31, this clamping happens implicitly */
#endif
            q_sqrt = 0;
            move16();
            side_gain[b] = Mpy_32_32( side_gain[b], Sqrt32( L_sub( MAX_32, diffuseness[b] ), &q_sqrt ) ); /*Q31 - q_sqrt*/
@@ -644,18 +642,11 @@ static void map_params_dirac_to_stereo(
                q_sqrt = 0;
                move16();
            }
#ifdef NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO
            /* for residual prediction gain, allowed range is [0, 1]*/
            res_pred_gain[b] = L_max( Mpy_32_16_1( diffuseness[b], sub( MAX_16, surrCoh[b] ) ), 0 ); /*Q31*/
            move32();
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = L_max( Mpy_32_16_1( diffuseness[b], sub( MAX_16, surrCoh[b] ) ), 0 ); /*Q31*/
            move32();
#else
            res_pred_gain[b] = Mpy_32_16_1( diffuseness[b], sub( MAX_16, surrCoh[b] ) ); /*Q31*/
            move32();
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = Mpy_32_16_1( diffuseness[b], sub( MAX_16, surrCoh[b] ) ); /*Q31*/
            move32();
#endif
        }
    }