Commit 969c8de4 authored by sagnowski's avatar sagnowski
Browse files

Merge branch 'main' into 261-jbm-trace-file-writer

parents 82cf570d 15fa87b6
Loading
Loading
Loading
Loading
Loading
+5 −19
Original line number Diff line number Diff line
@@ -55,12 +55,7 @@ int32_t get_delay(
    const int32_t io_fs,              /* i  : input/output sampling frequency     */
    const IVAS_FORMAT ivas_format,    /* i  : IVAS format                         */
    HANDLE_CLDFB_FILTER_BANK hCldfb,  /* i  : Handle of Cldfb analysis            */
#ifndef FIX_I59_LFE_TD_DELAY
    RENDERER_TYPE renderer_type,      /* i  : IVAS rendering type                 */
    const int32_t binaural_latency_ns /* i  : binaural renderer HRTF delay in ns  */
#else
    const int32_t binaural_latency_ns /* i  : binauralization delay in ns         */
#endif
)
{
    int32_t delay = 0;
@@ -99,7 +94,6 @@ int32_t get_delay(
        {
            delay = IVAS_DEC_DELAY_NS;

#ifdef FIX_I59_LFE_TD_DELAY
            if ( hCldfb != NULL )
            {
                /* compensate for filterbank delay */
@@ -108,16 +102,8 @@ int32_t get_delay(

            /* compensate for binauralization delay */
            delay += binaural_latency_ns;
#else
            if ( hCldfb != NULL || renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
            {
                delay += IVAS_FB_DEC_DELAY_NS;
            }

            /* compensate for Binaural renderer HRTF delay */
            delay += binaural_latency_ns;
#endif
        }
    }

    return delay;
}
+0 −6
Original line number Diff line number Diff line
@@ -375,11 +375,9 @@ void hq2_bit_alloc_har(

    Word32 L_y[BANDS_MAX];

#ifdef FIX_150
#ifdef BASOP_NOGLOB
    Flag Overflow;
    Overflow = 0;
#endif
#endif

    grp_rngmax_fx[0] = 0;
@@ -646,13 +644,9 @@ void hq2_bit_alloc_har(

    L_temp = Mpy_32_16( L_Ravg_sub[GRP_SB - 1], sub( GRP_SB, 1 ) ); /* Qbe+0+1 */
    L_temp = Mpy_32_16( L_temp, Inv_norm_sum_fx );                  /* Qbe+1+QIpb+1 */
#ifdef FIX_150
#ifdef BASOP_NOGLOB
    lf_hf_ge_r_fx = round_fx_o( L_shl_o( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ), &Overflow ), &Overflow );
    Overflow = 0; /* reset BASOP Overflow */
#else
    lf_hf_ge_r_fx = round_fx( L_shl( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ) ) );
#endif
#else
    lf_hf_ge_r_fx = round_fx( L_shl( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ) ) );
#endif
+1 −24
Original line number Diff line number Diff line
@@ -168,9 +168,6 @@ ivas_error pre_proc_front_ivas(
    const int16_t n,                                            /* i  : channel number                             */
    float old_inp_12k8[],                                       /* o  : buffer of old input signal                 */
    float old_inp_16k[],                                        /* o  : buffer of old input signal @16kHz          */
#ifndef REMOVE_ETOT_PROPAGATION
    float *Etot,                                                /* o  : total energy                               */
#endif
    float *ener,                                                /* o  : residual energy from Levinson-Durbin       */
    float *relE,                                                /* o  : frame relative energy                      */
    float A[NB_SUBFR16k * ( M + 1 )],                           /* o  : A(z) unquantized for the 4 subframes       */
@@ -202,14 +199,9 @@ ivas_error pre_proc_front_ivas(
    const int16_t flag_16k_smc,                                 /* i  : flag to indicate if the OL SMC is run at 16 kHz */
    const int16_t front_vad_flag,                               /* i  : front-VAD flag to overwrite VAD decision   */
    const int16_t force_front_vad,                              /* i  : flag to force VAD decision                 */
#ifdef LOW_RATE_TRANS
    const int16_t front_vad_dtx_flag,                           /* i  : front-VAD DTX flag to overwrite VAD decision*/
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                         */
    const int16_t ivas_format                                   /* i  : IVAS format                                */
#else
    const int16_t front_vad_dtx_flag                            /* i  : front-VAD DTX flag to overwrite VAD decision*/
   ,const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                       */    
#endif
);

ivas_error pre_proc_ivas(
@@ -416,9 +408,6 @@ ivas_error ivas_core_enc(
    const int16_t n_CoreChannels,                                            /* i  : number of core channels to be coded     */
    float old_inp_12k8[CPE_CHANNELS][L_INP_12k8],                            /* i  : buffer of old input signal              */
    float old_inp_16k[CPE_CHANNELS][L_INP],                                  /* i  : buffer of old input signal              */
#ifndef REMOVE_ETOT_PROPAGATION
    const float Etot[CPE_CHANNELS],                                          /* i  : total energy                            */
#endif
    float ener[CPE_CHANNELS],                                                /* i  : residual energy from Levinson-Durbin    */
    float A[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )],                          /* i  : A(z) unquantized for the 4 subframes    */
    float Aw[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )],                         /* i  : weighted A(z) unquantized for subframes */
@@ -626,13 +615,12 @@ void set_transient_stereo(
    float currFlatness[]                                        /* i/o: current flatness                        */
);

#ifdef LOW_RATE_TRANS
/*! r: preliminary flag to force ACELP */
int16_t transient_analysis(
    TRAN_DET_HANDLE hTranDet,                                   /* i  : handle transient detection             */
    const float cor_map_LT[],                                   /* i  : LT correlation map                     */
    const float multi_harm_limit                                /* i  : multi harminic threshold               */
);
#endif

void ivas_post_proc(
    SCE_DEC_HANDLE hSCE,                                        /* i/o: SCE decoder structure                   */
@@ -1758,9 +1746,7 @@ void tdm_ol_pitch_comparison(

void tdm_configure_enc(
    CPE_ENC_HANDLE hCPE,                                        /* i  : CPE encoder structure                   */
#ifdef REMOVE_ETOT_PROPAGATION
    const float Etot_last[CPE_CHANNELS],                        /* i/o: Energy of last frame                    */
#endif
    const int16_t tdm_SM_or_LRTD_Pri,                           /* i  : channel combination scheme flag in TD stereo OR LRTD primary channel */
    const int16_t tdm_ratio_idx,                                /* i  : ratio index                             */
    const int16_t tdm_ratio_idx_SM,                             /* i  : ratio index in SM mode                  */
@@ -3181,11 +3167,6 @@ int16_t ivas_sba_get_analysis_order(
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);

#ifndef SBA_DIRAC_RENDERER_TYPE_CLEANUP
int16_t ivas_sba_get_order_transport(
    const int16_t nchan_transport                               /* i  : Number of transport channels            */
);
#endif
/*! r: number of Ambisonic channels */
int16_t ivas_sba_get_nchan(
    const int16_t sba_order,                                    /* i  : Ambisonic (SBA) order                   */
@@ -5034,11 +5015,7 @@ void ivas_lfe_enc(
ivas_error ivas_create_lfe_dec( 
    LFE_DEC_HANDLE *hLFE_out,                                   /* o  : IVAS LFE decoder structure              */
    const int32_t output_Fs,                                    /* i  : output sampling rate                    */
#ifdef FIX_I59_LFE_TD_DELAY
    const int32_t binauralization_delay_ns                      /* i  : additional LFE delay to sync with binaural renderer */
#else
    const float add_delay_s                                     /* i  : additional LFE delay to sync with binaural filter */
#endif
);

void ivas_lfe_dec_close( 
+0 −27
Original line number Diff line number Diff line
@@ -246,33 +246,6 @@ int16_t ivas_sba_get_analysis_order(
    return sba_analysis_order;
}

#ifndef SBA_DIRAC_RENDERER_TYPE_CLEANUP
/*-------------------------------------------------------------------*
 * ivas_sba_get_order_transport()
 *
 * Get effective Ambisonic order from number of transport channels
 *-------------------------------------------------------------------*/

int16_t ivas_sba_get_order_transport(
    const int16_t nchan_transport /* i  : Number of transport channels     */
)
{
    int16_t sba_order;

    sba_order = SBA_FOA_ORDER;

    if ( nchan_transport > 6 )
    {
        sba_order = SBA_HOA3_ORDER;
    }
    else if ( nchan_transport > 4 )
    {
        sba_order = SBA_HOA2_ORDER;
    }

    return ( sba_order );
}
#endif

/*-------------------------------------------------------------------*
 * ivas_sba_get_nchan()
+1 −10
Original line number Diff line number Diff line
@@ -144,20 +144,11 @@
#define SBA_BR_SWITCHING_2                              /* Issue 114: Changes for sba bit rate switching with reconfigurations*/
#define SBA_BR_SWITCHING                                /* Issue 114: Changes for sba bit rate switching*/
#define BRATE_SWITCHING_RENDERING                       /* Bitrate switching changes related to the renderers */
#define FIX_150                                         /* Issue 150: Crash in EVS mono, HQ_HARMONIC mode, related to BASOP_NOGLOB */
#define FIX_VBR_COMPLEXITY                              /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */
#define SBA_DIRAC_RENDERER_TYPE_CLEANUP                 /* Remove leftovers in renderer_type logic in SBA DirAC decoder */
#define FIX_I59_LFE_TD_DELAY                            /* Issue 59: correcting delay of LFE for TD renderer */
#define FIX_I59_LFE_CLDFB                               /* Issue 59: correcting LFE handling for fastconv binaural rendering */
#define FIX_I59_DELAY_ROUNDING                          /* Issue 59: rounding in sample domain instead of nanosec for IVAS_ENC_GetDelay() and IVAS_DEC_GetDelay() */
#define FIX_FIX_I59                                     /* Issue 59:  small fix concerning LFE delay rounding */
#define FIX_I59_CREND                                   /* Issue 59: Fixes for gcc compiler warnings in ivas_crend_utest_utils.c */
#define LOW_RATE_TRANS                                  /* Eri: Contribution 20: low rate encoding of transients */
#define MC_BITRATE_SWITCHING                            /* Issue 116: support bitrate switching in MC format  */
#define SIMPLIFY_TD_BWE_RESET                           /* Issue 250: Resolve "TB-BWE state memories reset simplification"  */
#define REMOVE_ETOT_PROPAGATION                         /* Issue 251: Do not propagate Etot parameter */
#define MC_JBM                                          /* FhG: extend JBM beyond mono for running IVAS in VoIP mode (contribution 19) */

#define FIX_265_MC_BRATE_SWITCHING                      /* Issue 265: fix use-of-uninitialized-value in MC bitrate switching */


/* ################## End DEVELOPMENT switches ######################### */
Loading