Commit 9f721602 authored by multrus's avatar multrus
Browse files

Merge branch 'main' into 1010-complexity-high-complexity-overhead-for-parammc-decoding

parents 60c32c69 bbfbe899
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
# Basic Info

<!--- Remember to add issue and MR links to the status page in wiki here https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/wikis/IVAS-PC-MR-conversion-status -->
- Original merge request in float repo:
- Branch for float ref update:
- Branch for BASOP update:

/label ~Type:FloatUpdatePorting ~Status::ToDo
+6 −0
Original line number Diff line number Diff line

- Link to issue in BASOP repo:
- Link to original issue in float repo:
- Requested reviewers:

/label Type:FloatUpdatePorting
+1 −0
Original line number Diff line number Diff line
@@ -127,4 +127,5 @@
#define FIX_ISSUE_1185                          /* Ittiam: Fix for issue 1185: Assertion in ivas_dirac_dec_binaural_internal_fx() for crash in decoder in fft30_with_cmplx_data()*/
#define FIX_ISSUE_1209                          /* Ittiam: Fix for issue 1209: Assertion exit in BASOP encoder (stereo_dmx_evs)*/
#define IVAS_ISSUE_1188_EVS_CRASH               /* Ittiam: Fix for issue 1188: Issue due to ASAN */
#define FIX_ISSUE_1155                          /* Ittiam: Fix for issue 1155: Encoder crash for Stereo at 32kbps in PostShortTerm_ivas_enc_fx()*/
#endif
+4 −0
Original line number Diff line number Diff line
@@ -982,7 +982,11 @@ static void filt_mu_fx(
    FOR( n = 0; n < SubFrameLength; n++ )
    {
        temp = mult_r( mu, ( *ptrs++ ) );
#ifdef FIX_ISSUE_1155
        temp = add_sat( temp, *ptrs ); /*Q12 */
#else
        temp = add( temp, *ptrs ); /*Q12 */
#endif
        sig_out[n] = shl_o( mult_r( ga, temp ), 1, &Overflow );
        move16(); /*Q12 */
    }
+10 −8
Original line number Diff line number Diff line
@@ -987,7 +987,7 @@ static void run_min_stats_fx(
{
    Word16 ch, will_estimate_noise_on_channel[CPE_CHANNELS], save_VAD[CPE_CHANNELS];
    Word32 power_spec[L_FRAME16k];
    Word16 power_spec_e = 0;
    Word16 power_spec_q = 0;
    move16();
    Word32 *spec_in;
    Word16 spec_e;
@@ -1043,25 +1043,27 @@ static void run_min_stats_fx(
            IF( ( EQ_16( will_estimate_noise_on_channel[0], will_estimate_noise_on_channel[1] ) ) || EQ_16( ch, 0 ) )
            {
                Word16 tmp16 = getScaleFactor32( spec_in, L_FRAME16k );

                Word64 spec_power;
                Word32 power_spec_scale_fac;

                /* calculate power spectrum from MDCT coefficients and estimated MDST coeffs */
                power_spec_scale_fac = 20792; // 1.f / ( L_FRAME16k * L_FRAME16k ) in Q31
                move32();
                power_spec[0] = Mpy_32_32( W_extract_h( W_shl( W_mult_32_32( spec_in[0], spec_in[0] ), sub( tmp16, 4 ) ) ), power_spec_scale_fac ); /* 2 * (Q31 - x_e) + tmp16 - Q4 - Q31 */
                spec_power = W_shl( W_mult_32_32( spec_in[0], spec_in[0] ), shl( tmp16, 1 ) );
                power_spec[0] = W_extract_l( W_shr( W_mult_32_32( W_extract_h( spec_power ), power_spec_scale_fac ), 16 ) ); /* 2 * (Q31 - x_e + tmp16) + 1 - Q16 */
                move32();
                power_spec[L_FRAME16k - 1] = Mpy_32_32( W_extract_h( W_shl( W_mult_32_32( spec_in[L_FRAME16k - 1], spec_in[L_FRAME16k - 1] ), sub( tmp16, 4 ) ) ), power_spec_scale_fac ); /* 2 * (Q31 - x_e) + tmp16 - Q4 - Q31 */
                spec_power = W_shl( W_mult_32_32( spec_in[L_FRAME16k - 1], spec_in[L_FRAME16k - 1] ), shl( tmp16, 1 ) );
                power_spec[L_FRAME16k - 1] = W_extract_l( W_shr( W_mult_32_32( W_extract_h( spec_power ), power_spec_scale_fac ), 16 ) ); /* 2 * (Q31 - x_e + tmp16) + 1 - Q16 */
                move32();
                FOR( Word16 i = 1; i < L_FRAME16k - 1; i++ )
                {
                    Word32 mdst;
                    mdst = L_sub( spec_in[i + 1], spec_in[i - 1] ); /* Q31 - x_e */

                    power_spec[i] = Mpy_32_32( L_add( W_extract_h( W_shl( W_mult_32_32( spec_in[i], spec_in[i] ), sub( tmp16, 4 ) ) ), W_extract_h( W_shl( W_mult_32_32( mdst, mdst ), sub( tmp16, 4 ) ) ) ), power_spec_scale_fac ); /* 2 * (Q31 - x_e) + tmp16 - Q4 - Q31*/
                    spec_power = W_shl( W_add( W_mult_32_32( spec_in[i], spec_in[i] ), W_mult_32_32( mdst, mdst ) ), shl( tmp16, 1 ) );
                    power_spec[i] = W_extract_l( W_shr( W_mult_32_32( W_extract_h( spec_power ), power_spec_scale_fac ), 16 ) ); /* 2 * (Q31 - x_e + tmp16) + 1 - Q16 */
                    move32();
                }
                power_spec_e = sub( add( 4, shl( spec_e, 1 ) ), tmp16 );
                power_spec_q = add( shl( add( sub( 31, spec_e ), tmp16 ), 1 ), 1 - 16 );
            }
        }

@@ -1091,7 +1093,7 @@ static void run_min_stats_fx(
            {
                arr_tmp = power_spec;
            }
            ApplyFdCng_ivas_fx( NULL, 0, arr_tmp, sub( 31, power_spec_e ), NULL, NULL, NULL, st, st->bfi, 0 );
            ApplyFdCng_ivas_fx( NULL, 0, arr_tmp, power_spec_q, NULL, NULL, NULL, st, st->bfi, 0 );
            /*=================================================*/
        }

Loading