Commit 7730c95e authored by multrus's avatar multrus
Browse files

Merge branch...

Merge branch 'basop-2555-ivas_mdct_core_tns_ns_fx-calculation-of-subframe-length-overly-complex' into 'main'

Resolve "ivas_mdct_core_tns_ns_fx(): Calculation of subframe-length overly complex"

Closes #2555

See merge request !2978
parents 525fb9bc c514e4f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@
#define HARMONIZE_2537_SetTCXModeInfo                 /* FhG: Harmonize SetTCXModeInfo  - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS - pipes not green */
#define HARMONIZE_2537_GetTCXMaxenergyChange            /* FhG: Harmonize GetTCXMaxenergyChange */
#define HARMONIZE_2508_InitTransientDetection          /* FhG: harmonize GetAttackForTCXDecision derivates for evs/ivas  */
#define FIX_BASOP_2555_FRAMELEN_CALC                     /* FhG: BASOP issue 2555: Simplify (sub-)framelength calculation in ivas_mdct_core_tns_ns_fx() */

/* #################### End BE switches ################################## */

+33 −0
Original line number Diff line number Diff line
@@ -1510,7 +1510,11 @@ void ivas_mdct_core_tns_ns_fx(
    Word16 left_rect[CPE_CHANNELS];
    Word16 L_spec[CPE_CHANNELS];
    Word32 sns_int_scf_fx[FDNS_NPTS];
#ifdef FIX_BASOP_2555_FRAMELEN_CALC
    Word16 length;
#else
    Word16 exp, length;
#endif

    /* Initializations */
    sts = hCPE->hCoreCoder;
@@ -1525,6 +1529,34 @@ void ivas_mdct_core_tns_ns_fx(
    FOR( ch = 0; ch < CPE_CHANNELS; ch++ )
    {
        st = sts[ch];
#ifdef FIX_BASOP_2555_FRAMELEN_CALC
        IF( EQ_16( st->core, TCX_20_CORE ) )
        {
            nSubframes[ch] = 1;
            move16();

            L_frame_global[ch] = st->L_frame;
            L_frameTCX_glob[ch] = st->hTcxDec->L_frameTCX;
            L_spec[ch] = st->hTcxCfg->tcx_coded_lines;
            move16();
            move16();
            move16();
        }
        ELSE
        {
            nSubframes[ch] = NB_DIV;
            move16();

            assert( nSubframes[ch] == 2 && "Unexpected value for nSubframes[ch], NB_DIV (expected to be 2)." );

            L_frame_global[ch] = shr( st->L_frame, 1 );
            L_frameTCX_glob[ch] = shr( st->hTcxDec->L_frameTCX, 1 );
            L_spec[ch] = shr( st->hTcxCfg->tcx_coded_lines, 1 );
            move16();
            move16();
            move16();
        }
#else
        IF( EQ_16( st->core, TCX_20_CORE ) )
        {
            nSubframes[ch] = 1;
@@ -1549,6 +1581,7 @@ void ivas_mdct_core_tns_ns_fx(
        move16();
        L_spec[ch] = shl( L_spec[ch], add( exp, 1 ) );
        move16();
#endif

        test();
        test();