Commit 544346eb authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fix bug and modify comment for the define.

parent 029abf5e
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@
#define FIX_1559                                        /* Eri/FhG: fix for Issue 1559 in FD CNG with bitrate/bw switching */
#define FIX_BASOP_2571_MASA_EXT_RENDER_FIXES            /* Nokia: BASOP issue 2571: Fix MASA EXT DirAC renderer by unifying it with decoder */
#define NONBE_FIX_2575                                  /* Fhg: Fix issue 2575, precision loss in FD CNG */
#define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI         /* Nokia: BASOP issue 2442: Aligns float with identical diffuse gain limitation to minimize diff */
#define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI         /* Nokia: BASOP issue 2442: Increase accuracy of computations and add additional gain clamp for low energy decorrelated signal rendering. */

/* ##################### End NON-BE switches ########################### */

+10 −8
Original line number Diff line number Diff line
@@ -2380,14 +2380,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
                                                     Mpy_32_32( g2, ( *( p_cy_auto_diff_smooth_prev ) ) ) ); // (Q31, q_cy_auto_diff_smooth_prev) -> q_cy_auto_diff_smooth_prev
            move32();

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
            IF( LT_32( *( p_power_diff_smooth_prev ), power_diff_small_lim ) )
            {
                cmp2 = diff_gain_limit;
                move32();
            }
#endif

            exp = 0;
            move16();
            L_tmp = BASOP_Util_Divide3232_Scale_newton( *( p_cy_auto_diff_smooth_prev++ ), ( *( p_power_diff_smooth_prev++ ) ), &exp ); // (Q31 - exp) + (q_a - q_b)
@@ -2408,6 +2400,16 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
                *( p_gains_diff ) = cmp2; /*h_dirac_output_synthesis_state->gains_diff_prev_q*/
                move32();
            }
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI

            test();
            IF( LT_32( *( p_power_diff_smooth_prev - 1 ), power_diff_small_lim ) && GT_32( *( p_gains_diff ), diff_gain_limit ) ) /* proto_power_diff_smooth_q and gains_diff_prev_q */
            {
                *( p_gains_diff ) = diff_gain_limit; /*h_dirac_output_synthesis_state->gains_diff_prev_q*/
                move32();
            }

#endif
            p_gains_diff++;
        }