Commit debe2188 authored by norvell's avatar norvell
Browse files

Synchronize with ivas-float-update in BASOP 2024-06-03

parent ccfb71e3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1193,6 +1193,10 @@ enum
#define MASA_RATIO_TOLERANCE                    0.1f
#define MASA_RATIO_THRESHOLD                    0.1f
#define MASA_ANGLE_TOLERANCE                    0.5f
#ifdef  NON_BE_FIX_1048_THRESHOLD_COH_BASOP
#define MASA_SUR_COH_THRESHOLD                  1e-7f
#define MASA_SUR_COH_PRECISION                  1e7f
#endif
#define MASA_LIMIT_NO_BANDS_SUR_COH             8
#define MINIMUM_BIT_BUDGET_NORMAL_META          100
#define DIFF_DFRATIO_2BIT_LIMIT_IDX_HODIRAC     4
+4 −0
Original line number Diff line number Diff line
@@ -828,7 +828,11 @@ void deindex_lvq_SHB(

        /* find idx_leader */
        i = 1;
#ifdef NONBE_FIX_1054_NEGATIVE_LVQ_INDEX
        while ( index > table_no_cv[i] )
#else
        while ( index >= table_no_cv[i] )
#endif
        {
            i++;
        }
+9 −0
Original line number Diff line number Diff line
@@ -139,6 +139,15 @@

/* #################### End DEBUGGING switches ############################ */

/* ################### Start FIXES switches ########################### */

#define NON_BE_FIX_1048_THRESHOLD_COH_BASOP             /* Nokia: Fix 1048 replace comparison with 0 with comparison to threshold, to align with BASOP*/
#define NONBE_FIX_1054_NEGATIVE_LVQ_INDEX               /* Nokia: issue 1054: Input to decode_comb in deindex_lvq_SHB should be positive */
#define NONBE_FIX_738_QUATERNION_SLERP_PRECISION        /* Philips: issue 738: Quaternion spherical linear interpolation precision handling issues */
#define NONBE_FIX_1069_SVD_TUNING                       /* FhG: issue 1069: tune SVD constants */
#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO           /* Eri: Issue 1010: Division by zero in Stereo CNG */
/* #################### End FIXES switches ############################ */


/* keep as part of options.h */
#define BASOP_NOGLOB                                    /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */
+7 −1
Original line number Diff line number Diff line
@@ -4070,6 +4070,9 @@ static int16_t read_surround_coherence_hr(
    IVAS_QDIRECTION *q_direction;
    int16_t min_index;
    int16_t d, idx;
#ifdef NON_BE_FIX_1048_THRESHOLD_COH_BASOP
    int32_t int_error_ratio_surr;
#endif
    coding_subbands = hQMetaData->q_direction[0].cfg.nbands;
    q_direction = hQMetaData->q_direction;

@@ -4092,7 +4095,10 @@ static int16_t read_surround_coherence_hr(
            {
                error_ratio_surr = 1.0f - q_direction[0].band_data[j].energy_ratio[sf];
            }

#ifdef NON_BE_FIX_1048_THRESHOLD_COH_BASOP
            int_error_ratio_surr = (int32_t) ( MASA_SUR_COH_PRECISION * error_ratio_surr );
            error_ratio_surr = (float) ( int_error_ratio_surr * MASA_SUR_COH_THRESHOLD );
#endif
            if ( error_ratio_surr <= 0 )
            {
                error_ratio_surr = 0;
+8 −0
Original line number Diff line number Diff line
@@ -2955,7 +2955,11 @@ void stereo_dft_dec_smooth_parameters(
        if ( hStereoDft->frame_sid_nodata )
        {
            /* set new xfade target if new itd received */
#ifdef NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO
            if ( hStereoDft->ipd_xfade_counter < STEREO_DFT_ITD_CNG_XFADE )
#else
            if ( hStereoDft->gipd[k + k_offset] != hStereoDft->ipd_xfade_target )
#endif
            {
                if ( ( hStereoDft->gipd[k + k_offset] - hStereoDft->ipd_xfade_prev ) > EVS_PI )
                {
@@ -3001,7 +3005,11 @@ void stereo_dft_dec_smooth_parameters(
        if ( hStereoDft->frame_sid_nodata )
        {
            /* set new xfade target if new itd received */
#ifdef NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO
            if ( hStereoDft->itd_xfade_counter < STEREO_DFT_ITD_CNG_XFADE )
#else
            if ( hStereoDft->itd[k + k_offset] != hStereoDft->itd_xfade_target )
#endif
            {
                hStereoDft->itd_xfade_target = hStereoDft->itd[k + k_offset];
                hStereoDft->itd_xfade_step = ( hStereoDft->itd_xfade_target - hStereoDft->itd_xfade_prev ) / ( STEREO_DFT_ITD_CNG_XFADE - hStereoDft->itd_xfade_counter );
Loading