Commit e2de8b58 authored by vaclav's avatar vaclav
Browse files

accept NON_BE_FIX_1048_THRESHOLD_COH_BASOP

parent 0ee92f6b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1197,10 +1197,8 @@ enum
#define MASA_RATIO_TOLERANCE                    0.1f
#define MASA_RATIO_THRESHOLD                    0.015f
#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
+0 −1
Original line number Diff line number Diff line
@@ -165,7 +165,6 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#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_1063_DIV_BY_ZERO_SUMNRG               /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */
#define NONBE_FIX_1045_ISM_BITRATE_SWITCHING            /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */
+2 −4
Original line number Diff line number Diff line
@@ -4070,9 +4070,7 @@ 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;
@@ -4096,10 +4094,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;
+3 −4
Original line number Diff line number Diff line
@@ -4926,9 +4926,8 @@ static int16_t encode_surround_coherence_hr(
    int16_t max_val = 0, nbits_max;
    int16_t no_cv_shift[MASA_MAXIMUM_CODING_SUBBANDS], min_idx;
    int16_t idx16;
#ifdef NON_BE_FIX_1048_THRESHOLD_COH_BASOP
    int32_t int_error_ratio_surr;
#endif

    coding_subbands = hQMetaData->q_direction[0].cfg.nbands;
    all_coherence_zero = hQMetaData->all_coherence_zero;
    q_direction = &( hQMetaData->q_direction[0] );
@@ -4957,10 +4956,10 @@ static int16_t encode_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;