Commit 3cae0d7f authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'main' into 109-harmonize-head-and-orientation-tracking

parents c31798b1 baa5d9ca
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -375,6 +375,13 @@ 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;
    grp_rngmax_fx[1] = 0;

@@ -639,7 +646,16 @@ 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

    exp_normn = norm_s( norm_sum_fx );
    exp_normn = sub( exp_normn, 1 );
+4 −0
Original line number Diff line number Diff line
@@ -926,6 +926,10 @@ typedef enum
{
    DIRAC_OPEN,                                 /* initialize to default value              */
    DIRAC_RECONFIGURE                           /* HOA3                                     */
#ifdef SBA_BR_SWITCHING_2
    ,
    DIRAC_RECONFIGURE_MODE
#endif
} DIRAC_CONFIG_FLAG;


+13 −2
Original line number Diff line number Diff line
@@ -112,8 +112,19 @@ ivas_error ivas_sba_enc_reinit(
#endif
#ifdef SBA_BR_SWITCHING
int16_t get_sba_reinit_flag(
    int32_t ivas_total_bitrate,                                /* i: current bitrate                  */
    int32_t last_ivas_total_brate                              /* i: previous bitrate                  */
    int32_t ivas_total_bitrate,                                /* i  : Current bitrate  */
    int32_t last_ivas_total_brate                              /* i  : Previous bitrate  */
#ifdef SBA_BR_SWITCHING_2
    , int16_t sba_order
#endif
);
#endif
#ifdef SBA_BR_SWITCHING_2
ivas_error ivas_spar_md_enc_init
(
    ivas_spar_md_enc_state_t *hMdEnc,                         /* o  : MD encoder handle        */
    const ENCODER_CONFIG_HANDLE hEncoderConfig,               /* i  : configuration structure  */
    const int16_t sba_order                                   /* i  : Ambisonic (SBA) order    */
);
#endif
ivas_error ivas_sba_enc_reconfigure( 
+24 −1
Original line number Diff line number Diff line
@@ -82,14 +82,37 @@ SBA_MODE ivas_sba_mode_select(
int16_t get_sba_reinit_flag(
    int32_t ivas_total_bitrate,   /* i  : Current bitrate  */
    int32_t last_ivas_total_brate /* i  : Previous bitrate  */
#ifdef SBA_BR_SWITCHING_2
    ,
    int16_t sba_order
#endif
)
{
    int16_t sba_reinit_flag;

    sba_reinit_flag = 0;
#ifdef SBA_BR_SWITCHING_2
    if ( ivas_total_bitrate != last_ivas_total_brate && ( ivas_total_bitrate > IVAS_SID_5k2 ) )
#else
    if ( ivas_total_bitrate != last_ivas_total_brate && ( last_ivas_total_brate > IVAS_SID_5k2 ) && ( ivas_total_bitrate > IVAS_SID_5k2 ) )
#endif
    {
#ifdef SBA_BR_SWITCHING_2
        int16_t sba_analysis_order, nchan_transport_old, nchan_transport_new;
        SBA_MODE last_sba_mode, current_sba_mode;
        sba_analysis_order = ivas_sba_get_analysis_order( last_ivas_total_brate, sba_order );
        nchan_transport_old = ivas_get_sba_num_TCs( last_ivas_total_brate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) );
        last_sba_mode = ivas_sba_mode_select( last_ivas_total_brate );
        current_sba_mode = ivas_sba_mode_select( ivas_total_bitrate );
        sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_bitrate, sba_order );
        nchan_transport_new = ivas_get_sba_num_TCs( ivas_total_bitrate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) );
        if ( ( current_sba_mode != last_sba_mode ) || ( nchan_transport_new != nchan_transport_old ) )
        {
#endif
            sba_reinit_flag = 1;
#ifdef SBA_BR_SWITCHING_2
        }
#endif
    }

    return sba_reinit_flag;
+3 −3
Original line number Diff line number Diff line
@@ -147,10 +147,12 @@
#define FIX_I109_ORIENTATION_TRACKING                   /* Issue 109: Harmonize head and orientation tracking */
#define FIX_I1_113                                      /* under review : MCT bit distribution optimization for SBA high bitrates*/
#define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS              /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */
#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 FIX_ITD                                         /* Contribution 16: TD renderer ITD improvement and code cleanup */
#define BRATE_SWITCHING_RENDERING                       /* Bitrate switching changes related to the renderers */
#define FIX_ISM_DECODER_PRINTOUT                        /* Issue 229: fix ISM decoder printout */
#define FIX_150                                         /* Issue 150: Crash in EVS mono, HQ_HARMONIC mode, related to BASOP_NOGLOB */
#define FIX_REND_ISM_XFADE                              /* Issue 193: Crossfade inconsistencies in ISM between decoder and external renderer */
#define FIX_REND_ISM_POS_ROUNDING                       /* Issue 193: (Temporary solution until fix for #215) Align rounding of ISM position data in external renderer */
#define FIX_REND_ISM_STEREO_PANNING                     /* Issue 193: Use tangent panning for ISM to stereo in external renderer */
@@ -161,9 +163,7 @@
#define FIX_VBR_COMPLEXITY                              /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */
#define FIX_ISM_INACTIVE_BITS                           /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */
#define IMPROVE_CMDLINE_ROBUSTNESS                      /* Issue 233: Improve robustness of command-line parameters */

#define FIX_ITD_CNG                                     /* Eri: Fix for CNG ITD */

#define FIX_MDCT_AND_MC_MONO_ISSUES                     /* Issue 242: Fix some issues with TCX-LTP and delay alignement for mono output */

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