Commit d4efa24d authored by norvell's avatar norvell
Browse files

Merge branch 'main' into 2079_basop_PortMR2056_TD_renderer_OOB

parents 5b5eda6d ccd69faf
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@
#define FIX_1962_FORMAT_CONV_SPECTRAL_DIFF                   /* FhG: Improved precision of targetEnergy in ivas_ls_setup_conversion_process_mdct_fx() */
#define FIX_2003_CON_TCX_OVERFLOW                            /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */
#define OPT_TCXLTP_FILTER_LOOP                               /* FhG: optimize loop in tcx_ltp_synth_filter */

#define FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE                  /* Dolby/FhG: fix for issue 2026: Saturation in SWB TBE re-scaling function preventing StereoDownmix complexity job to complete */

/* #################### Start BASOP porting switches ############################ */

@@ -137,6 +137,8 @@
#define FIX_1053_REVERB_RECONFIGURATION
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1113_EXTREND_ISAR                           /* FhG: issue 1113: fix external renderer asserts for FOA/HOA2 and CLDFB config */
#define FIX_1166_TDREND_DIV0                            /* FhG,Eri: issue 1166: potential divide by zero in TD Renderer */
#define NONBE_1203_MDCT2DFT_SWITCHING                   /* VA: issue 1203: fix severe artifacts during MDCT to DFT stereo switching when MDCT ITD is not used */
#define NONBE_1122_JBM_FIX_PLAYOUT_DELAY_IN_DTX         /* FhG: Avoid JBM ignoring safety margin and setting playout delay to 0 during DTX */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_938_COMPILER_WARNING                        /* FhG: Fix compiler warning in ivas_mdct_core_reconstruct() */
+1 −0
Original line number Diff line number Diff line
@@ -2837,6 +2837,7 @@ static ivas_error copyRendererConfigStruct(
    Copy32( hRCin->roomAcoustics.pAcoustic_rt60_fx, hRCout->roomAcoustics.pAcoustic_rt60_fx, CLDFB_NO_CHANNELS_MAX ); // Q26
    Copy32( hRCin->roomAcoustics.pAcoustic_dsr_fx, hRCout->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX );   // Q30
    Copy( hRCin->directivity_fx, hRCout->directivity_fx, 3 * MAX_NUM_OBJECTS );
    Copy32( hRCin->distAtt_fx, hRCout->distAtt_fx, 3 );

    hRCout->split_rend_config = hRCin->split_rend_config;

+16 −4
Original line number Diff line number Diff line
@@ -2706,7 +2706,11 @@ void swb_tbe_dec_fx(
    FOR( i = 0; i < L_SHB_LAHEAD; i++ )
    {
        L_tmp = Mult_32_16( Lscale, shaped_shb_excitation[i] ); /* Q_bwe_exc + (31-exp) - 15 */
#ifdef FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE
        shaped_shb_excitation[i] = round_fx_sat( L_shl_sat( L_tmp, exp ) ); /* Q_bwe_exc */
#else
        shaped_shb_excitation[i] = round_fx( L_shl( L_tmp, exp ) );     /* Q_bwe_exc */
#endif
        move16();
    }
    IF( exp < 0 )
@@ -2728,7 +2732,11 @@ void swb_tbe_dec_fx(
            temp = sub( 32767 /*1.0f Q15*/, temp );
            Lscale = L_add( Mult_32_16( Lscale, temp ), L_tmp1 );
            L_tmp = Mult_32_16( Lscale, shaped_shb_excitation[i] ); /* Q_bwe_exc + (31-exp) - 15 */
#ifdef FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE
            shaped_shb_excitation[i] = round_fx_sat( L_shl_sat( L_tmp, exp ) ); /* Q_bwe_exc */
#else
            shaped_shb_excitation[i] = round_fx( L_shl( L_tmp, exp ) ); /* Q_bwe_exc */
#endif
            move16();
        }
    }
@@ -2741,7 +2749,11 @@ void swb_tbe_dec_fx(
            temp = sub( 32767 /*1.0f Q15*/, temp );
            Lscale = L_add( Mult_32_16( Lscale, temp ), L_tmp1 );
            L_tmp = Mult_32_16( Lscale, shaped_shb_excitation[i] ); /* Q_bwe_exc + (31-exp) - 15 */
#ifdef FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE
            shaped_shb_excitation[i] = round_fx_sat( L_shl_sat( L_tmp, exp ) ); /* Q_bwe_exc */
#else
            shaped_shb_excitation[i] = round_fx( L_shl( L_tmp, exp ) ); /* Q_bwe_exc */
#endif
            move16();
        }
    }
+19 −0
Original line number Diff line number Diff line
@@ -573,6 +573,10 @@ void stereo_td_itd_mdct_stereo_fx(
    Word16 DFT_e[CPE_CHANNELS];
    Word16 DFT_tmp_e[CPE_CHANNELS][STEREO_DFT_N_MAX_ENC];
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct;
#ifdef NONBE_1203_MDCT2DFT_SWITCHING
    Word16 dft_ovl;
    Word16 sf;
#endif

    test();
    IF( hCPE->hStereoMdct != NULL && hCPE->hStereoMdct->hItd != NULL )
@@ -611,6 +615,21 @@ void stereo_td_itd_mdct_stereo_fx(
        /* Time Domain ITD compensation using extrapolation */
        stereo_td_itd_fx( hStereoMdct->hItd, NULL, NULL, 1, hStereoMdct->hDft_ana->dft_ovl, hCPE->hCoreCoder, input_frame, hCPE->input_mem_fx, hCPE->q_input_mem );
    }
#ifdef NONBE_1203_MDCT2DFT_SWITCHING
    ELSE IF( hCPE->input_mem_fx[0] != NULL )
    {
        dft_ovl = extract_l( Mpy_32_32( imult3216( input_frame, STEREO_DFT_OVL_MAX ), 2236963 ) ); // 1/L_FRAME48k = 2236963 (Q31)

        FOR( i = 0; i < CPE_CHANNELS; i++ )
        {
            sf = L_norm_arr( hCPE->hCoreCoder[i]->input32_fx + input_frame - dft_ovl, dft_ovl );
            Copy_Scale_sig32_16( hCPE->hCoreCoder[i]->input32_fx + input_frame - dft_ovl, hCPE->input_mem_fx[i], dft_ovl, sf );
            hCPE->q_input_mem[i] = sub( add( hCPE->hCoreCoder[i]->q_inp32, sf ), 16 );
            move16();
        }
    }
#endif


    return;
}
+11 −1
Original line number Diff line number Diff line
@@ -649,15 +649,25 @@ void stereo_switching_enc_fx(
    dft_ovl = extract_l( Mpy_32_32( imult3216( input_frame, STEREO_DFT_OVL_MAX ), 2236963 ) ); // 1/L_FRAME48k = 2236963 (Q31)

    /* update DFT analysis overlap memory */
#ifdef NONBE_1203_MDCT2DFT_SWITCHING
    /* note: in MDCT stereo, the update is done in stereo_td_itd_mdct_stereo() */
#endif
    test();
    test();
    IF( GT_16( hCPE->element_mode, IVAS_CPE_DFT ) && hCPE->input_mem_fx[0] != NULL && NE_16( hCPE->element_mode, IVAS_CPE_MDCT ) )
    {
        FOR( n = 0; n < CPE_CHANNELS; n++ )
        {
#ifdef NONBE_1203_MDCT2DFT_SWITCHING
            Word16 sf = L_norm_arr( sts[n]->input32_fx + input_frame - dft_ovl, dft_ovl );
            Copy_Scale_sig32_16( sts[n]->input32_fx + input_frame - dft_ovl, hCPE->input_mem_fx[n], dft_ovl, sf ); /* sts[n]->q_inp32 - 16 */
            hCPE->q_input_mem[n] = sub( add( sts[n]->q_inp32, sf ), 16 );
            move16();
#else
            Copy_Scale_sig32_16( sts[n]->input32_fx + input_frame - dft_ovl, hCPE->input_mem_fx[n], dft_ovl, 0 ); /* sts[n]->q_inp32 - 16 */
            hCPE->q_input_mem[n] = sub( sts[n]->q_inp32, 16 );
            move16();
#endif
        }
    }

Loading