Commit 9c4d45bb authored by Fabian Bauer's avatar Fabian Bauer
Browse files

Merge branch 'main' into 1072-complexity-high-complexity-overhead-for-osba-decoding_tmpbranch1

parents abc297aa 146b4f8e
Loading
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -3346,8 +3346,9 @@ void mctStereoIGF_enc_fx(
    Word32 *orig_spectrum_fx[MCT_MAX_CHANNELS][2],       /* i  : MDCT spectrum for ITF                      */
    Word16 q_origSpec,                                   /* i  : Q for MDCT spectrum                        */
    Word32 powerSpec_fx[MCT_MAX_CHANNELS][L_FRAME48k],   /* i/o: MDCT^2 + MDST^2 spectrum,or estimate       */
    Word32 *powerSpecMsInv_fx[MCT_MAX_CHANNELS][NB_DIV], /* i  : same as above but for inverse spect.*/
    Word16 q_powerSpec[MCT_MAX_CHANNELS],                /* i  : Q for powSpec_fx and powSpecMsInv_fx*/
    Word16 q_powerSpec[MCT_MAX_CHANNELS],                /* i  : Q for powSpec_fx                           */
    Word32 *powerSpecMsInv_fx[MCT_MAX_CHANNELS][NB_DIV], /* i  : same as powerSpec_fx but for inverse spect.*/
    Word16 q_powerSpecMsInv[MCT_MAX_CHANNELS],           /* i  : Q for powSpecMsInv_fx                      */
    Word32 *inv_spectrum_fx[MCT_MAX_CHANNELS][NB_DIV],   /* i  : inverse spectrum                           */
    const Word16 sp_aud_decision0[MCT_MAX_CHANNELS]      /* i  : speech audio decision                      */
);
+7 −0
Original line number Diff line number Diff line
@@ -1241,6 +1241,13 @@ void ivas_sba_dirac_stereo_dec_fx(
    CPE_DEC_HANDLE hCPE;
    STEREO_DFT_DEC_DATA_HANDLE hStereoDft;

#ifdef MSAN_FIX
    FOR( Word16 i = 0; i < CPE_CHANNELS; i++ )
    {
        set32_fx( DFT[i], 0, STEREO_DFT_BUF_MAX );
    }
#endif

    hSCE = st_ivas->hSCE[0];
    hCPE = st_ivas->hCPE[0];
    hStereoDft = hCPE->hStereoDft;
+4 −0
Original line number Diff line number Diff line
@@ -1717,6 +1717,10 @@ void EstimateStereoTCXNoiseLevel_fx(
    Word16 *fac_ns_q;
    Word32 total_brate;

#ifdef MSAN_FIX
    set32_fx( combined_q_spectrum, 0, N_MAX );
#endif

    FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
    {
        Encoder_State *st = sts[ch];
+2 −2
Original line number Diff line number Diff line
@@ -943,9 +943,9 @@ static void IGF_CalculateEnvelope_ivas_fx(
                move16();
                sfbEnergyR = add_sat( EPSILON_FX, BASOP_Util_Divide3216_Scale( sum2_32_fx( pMDCTSpectrum_fx + swb_offset[sfb], width, &tmp_e ) /*exp: tmp_e*/, width, &sfbEnergyR_e ) ); // sfbEnergyR_e
                sfbEnergyR_e = add( sfbEnergyR_e, add( tmp_e, -15 ) );
                gain = sfbEnergyR; // gain_e
                gain = L_shl( sfbEnergyR, 16 ); // gain_e
                move32();
                gain_e = add( sfbEnergyR_e, 16 );
                gain_e = sfbEnergyR_e;

                IF( element_mode > EVS_MONO )
                {
+4 −3
Original line number Diff line number Diff line
@@ -199,12 +199,13 @@ static void ivas_lfe_enc_quant_fx(
                q_lfe_abs_sum = sub( q_lfe_abs_sum, q_tmp );
            }

            tmp = BASOP_Util_Divide3232_Scale( max_value, W_extract_l( lfe_abs_sum ), &q_tmp );
            tmp = L_shl( tmp, sub( q_lfe_abs_sum, sub( 15, q_tmp ) ) ); /* Q0 (max_value / lfe_abs_sum) */
            tmp = L_deposit_h( BASOP_Util_Divide3232_Scale( max_value, W_extract_l( lfe_abs_sum ), &q_tmp ) );
            // tmp = L_shl( tmp, sub( q_lfe_abs_sum, sub( 15, q_tmp ) ) ); /* Q0 (max_value / lfe_abs_sum) */
            q_tmp = sub( Q16, sub( q_lfe_abs_sum, sub( 15, q_tmp ) ) );

            /* log2_f(max_value / lfe_abs_sum) -> Q25 */
            tmp = BASOP_Util_Log2( tmp );
            tmp = L_add( tmp, 1040187392 ) /* (31<<25) -> 1040187392 */; /* Q25 */
            tmp = L_add( tmp, L_shl( sub( Q31, q_tmp ), Q25 ) ) /* (31<<25) -> 1040187392 */; /* Q25 */

            /* IVAS_LFE_SHIFTS_PER_DOUBLE * log2_f(max_value / lfe_abs_sum) */
            tmp = Mpy_32_16_1( tmp, IVAS_LFE_SHIFTS_PER_DOUBLE ); /* 25-15 -> Q10 */
Loading