Commit b77818d5 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1044_fixed_point_changes' into 'main'

Fix for 3GPP issue 1044: ivas_merge_sba_transports() misses 1/2 normalization - Fixed point changes

See merge request !847
parents f7d1e1f8 c2b9353d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -80,4 +80,5 @@
#define CR_2109_to_2112_cd0_ce0  /* This is related to the CRs include in the 26.444 package of 21-12. Concerns lead_deindexing and  */
#define FIX_QMETADATA_PENALTY /* Nokia: transform penalty calculation in qmetadata into integer operations */
#define FIX_1013_CRASH_HQ_CORE_DEC /* Ittiam: Saturation added on the lines of EVS */
#define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/
#endif
+9 −0
Original line number Diff line number Diff line
@@ -79,7 +79,11 @@ static void ivas_merge_sba_transports_fx(
    {
        FOR( j = 0; j < input_frame; j++ )
        {
#ifdef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS
            data_out_f[i][j] = L_shr( L_add( L_shr( data_in_f1[i][j], 1 ), L_shr( data_in_f2[i][j], sub( Q_f2, sub( Q_f1, 1 ) ) ) ), Q1 );
#else
            data_out_f[i][j] = L_add( L_shr( data_in_f1[i][j], 1 ), L_shr( data_in_f2[i][j], sub( Q_f2, sub( Q_f1, 1 ) ) ) );
#endif
            move32();
        }
    }
@@ -477,7 +481,9 @@ static void ivas_osba_render_ism_to_sba_fx(
    Word16 azimuth_fx, elevation_fx;
    Word32 gains_fx[MAX_INPUT_CHANNELS];
    Word32 g1_fx, g2_fx;
#ifndef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS
    Word32 output_gain_fx;
#endif
    Word16 nchan_sba;
    nchan_sba = imult1616( add( sba_analysis_order, 1 ), add( sba_analysis_order, 1 ) );

@@ -518,6 +524,8 @@ static void ivas_osba_render_ism_to_sba_fx(
        }
    }
    *Q_data = sub( *Q_data, 2 );

#ifndef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS
    /* Gain with loudness-matching gains */
    // output_gain = 0.7499f;
    output_gain_fx = 1610397988; // 0.7499f in Q31
@@ -531,6 +539,7 @@ static void ivas_osba_render_ism_to_sba_fx(
            move32();
        }
    }
#endif

    return;
}