Commit 5312cd15 authored by emerit's avatar emerit
Browse files

Merge branch 'main' of forge.3gpp.org:ivas-codec-pc/ivas-codec

parents 297e5a66 ff5b6f37
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -885,6 +885,9 @@ enum fea_names
#define MDCT_ST_PLC_FADEOUT_MIN_NOISE_NRG       0.001f
#define MDCT_ST_PLC_FADEOUT_MAX_CONC_FRAME      2 * FRAMES_PER_SEC
#define MDCT_ST_PLC_FADEOUT_TO_ZERO_LEN         20
#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY
#define MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE    3
#endif

typedef enum {
    EQUAL_CORES,
+12 −0
Original line number Diff line number Diff line
@@ -1322,6 +1322,10 @@ void stereo_dft_dec(
    const int16_t cross_fade_start_offset,                      /* i  : SPAR mixer delay compensation       */
    const int32_t output_Fs,                                    /* i  : Fs for delay calculation            */
    const int16_t nchan_transport                               /* i  : number of transpor channels         */
#ifdef FIX_STEREO_474
    ,
    const int16_t num_md_sub_frames                             /* i:  number of MD subframes              */
#endif
);

void stereo_dft_res_ecu(
@@ -1555,6 +1559,10 @@ int16_t read_BS_adapt_GR_sg(
void stereo_dft_hybrid_ITD_flag(
    STEREO_DFT_CONFIG_DATA_HANDLE hConfig,                      /* o  : DFT stereo configuration                */
    const int32_t input_Fs                                      /* i  : CPE element sampling rate               */
#ifdef HYBRID_ITD_MAX
    ,
    const int16_t hybrid_itd_max                                /* i  : flag for hybrid ITD for very large ITDs */
#endif
);

void stereo_dft_enc_compute_itd(
@@ -3561,6 +3569,10 @@ void ivas_sba_dirac_stereo_smooth_parameters(
    ivas_spar_md_dec_state_t *hMdDec,                           /* i/o: SPAR MD handle for upmixing             */
    const int16_t cross_fade_start_offset,                      /* i  : SPAR mixer delay compensation           */
    const int32_t output_Fs                                     /* i  : Fs for delay calculation                */
#ifdef FIX_STEREO_474
    ,
    const int16_t num_md_sub_frames                             /* i : number of subframes in mixing matrix  */
#endif
);

void ivas_sba2mc_cldfb(
+12 −0
Original line number Diff line number Diff line
@@ -196,19 +196,31 @@
#define FIX_441_SBA_PARAMBIN_GAINS                      /* Nokia: Fix issue 441 by changing gains in SBA path of parametric binauralizer */

#define MC_PARAMUPMIX_MODE                              /* Dlb: Contribution 39: Multichannel Parametric Upmix */
#define FIX_469_BRSWITCH_PUPMIX                         /* Dlb: Fix issue 469 for Param Upmix bitrate switching */

#define HODIRAC                                         /* FhG: Contribution 32: Sector-based HO-DirAC method for SBA at high bitrates */
#define DIRAC_ALLOC_HARM                                /* VA: harmonize DirAC parameters allocation/deallocation */


#define COMPLEXITY_LEVEL_INDICATION
#define FIX_463_TD_RENDERER_DIRECTIVITY_RESET           /* Eri: Remove unintentional reset of directivity pattern */

#define FIX_642											/* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/

#define FIX_443_FD_CNG_INIT                             /* FhG: correct bitrate value for FD-CNG init */
#define VARIABLE_SPEED_DECODING                         /* FhG: variable speed decoding employing the JBM functioniality */
#define JBM_TSM_ON_TCS                                  /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */

#define FIX_DTX_428                                     /* FhG: fix for issue 428, crash with DTX and bitrate switching */

#define FIX_STEREO_474                                  /* FhG fix for issue 574, crash with SBA to stereo output at 512 kbps */
#define FIX_MDCT_ST_PLC_FADEOUT_DELAY

#define FIX_DIRAC_LS_SYNTHESIS_CONFIG_479               /* FhG: fix for issue 479, broken LS output with DirAC at high BRs */

#define HYBRID_ITD_MAX                                 /* FhG: Improvement for DFT-stereo for cases with large ITDs */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+20 −1
Original line number Diff line number Diff line
@@ -551,20 +551,39 @@ void con_tcx(
    mvr2r( synth - M, buf, M );
    mvr2r( buf, mem_syn, M );


    if ( A_cng != NULL )
    {
#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY
        float alpha_delayed;

        alpha_delayed = 1.0f;
        if ( st->nbLostCmpt > MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE )
        {
            alpha_delayed = Damping_fact( st->core_ext_mode, st->nbLostCmpt - MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE, st->last_good, st->stab_fac, &( st->lp_gainp ), ACELP_CORE );
        }

        if ( st->plcBackgroundNoiseUpdated && alpha_delayed != 1.0f )
#else
        if ( st->plcBackgroundNoiseUpdated && alpha != 1.0f )
#endif
        {
            float lsp_local[M], lsp_fade[M], alpha_inv;

#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY
            alpha_inv = 1.0f - alpha_delayed;
#else
            alpha_inv = 1.0f - alpha;
#endif

            a2lsp_stab( A_local, lsp_local, lsp_local );

            for ( i = 0; i < M; i++ )
            {
#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY
                lsp_fade[i] = alpha_delayed * lsp_local[i] + alpha_inv * st->lspold_cng[i];
#else
                lsp_fade[i] = alpha * lsp_local[i] + alpha_inv * st->lspold_cng[i];
#endif
            }

            lsp2a_stab( lsp_fade, A_local, M );
+6 −1
Original line number Diff line number Diff line
@@ -405,7 +405,12 @@ ivas_error ivas_cpe_dec(
        }
        else
        {
            stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0, 0, 0, 0, 0, 0 );
            stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0, 0, 0, 0, 0, 0
#ifdef FIX_STEREO_474
                            ,
                            MAX_PARAM_SPATIAL_SUBFRAMES
#endif
            );
        }

        /* synthesis iFFT */
Loading