Commit cdd260fa authored by multrus's avatar multrus
Browse files

[cleanup] accept HODIRAC

parent 3dc9f82f
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -172,9 +172,7 @@ typedef enum
#define BINAURAL_CHANNELS                       2                           /* number of channels for binaural output configuration */
#define CPE_CHANNELS                            2                           /* number of CPE (stereo) channels */
#define FOA_CHANNELS                            4                           /* number of FOA channels */
#ifdef HODIRAC
#define HOA2_CHANNELS                           9
#endif

#define MAX_NUM_OBJECTS                         4                           /* max. number of audio objects */

@@ -933,11 +931,7 @@ typedef enum
 * DirAC Constants 
 *----------------------------------------------------------------------------------*/

#ifdef HODIRAC
#define DIRAC_MAX_ANA_CHANS                     11                          /* Maximum number of channels for DirAC analysis */
#else
#define DIRAC_MAX_ANA_CHANS                     FOA_CHANNELS                /* Maximum number of channels for DirAC analysis */
#endif

#define DIRAC_NUM_DIMS                          3                           /* number of directions to estimate (X,Y,Z) */
#define DIRAC_MAX_NBANDS                        12                          /* Maximum number of frequency bands for the DirAC Side Parameter decoding */
@@ -951,10 +945,8 @@ typedef enum
#define DIRAC_NO_FB_BANDS_MAX                   MDFT_FB_BANDS_240
#define DELAY_DIRAC_ENC_CMP_NS_PARAM_ISM        ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) /* == 12 ms */

#ifdef HODIRAC
#define DIRAC_HO_NUMSECTORS                     2
#define NUM_ANA_SECTORS 2
#endif


/* DirAC renderer setup */
@@ -1014,16 +1006,10 @@ typedef enum

#define SPAR_CONFIG_BW                          FB

#ifndef HODIRAC
#define IVAS_SPAR_MAX_CH                        (FOA_CHANNELS + 2 * ( IVAS_MAX_SBA_ORDER - 1 )) /* FOA + planar HOA */
#else
#define IVAS_SPAR_MAX_CH                        ((( IVAS_MAX_SBA_ORDER ) * ( IVAS_MAX_SBA_ORDER )) + 2) /* HOA2 + pHOA3*/
#define IVAS_HBR_MAX_DECOR_CHS                  (2)
#endif

#ifdef HODIRAC
#define IVAS_SPAR_MAX_FB_IN_CHAN                11
#endif

#define IVAS_SPAR_P_LOWERTRI                    ((IVAS_SPAR_MAX_CH - 1) * (IVAS_SPAR_MAX_CH - 2)) >> 1
#define IVAS_SPAR_MAX_C_COEFF                   (IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS) * ( IVAS_SPAR_MAX_DMX_CHS - 1)
@@ -1232,9 +1218,7 @@ enum
#define MASA_ANGLE_TOLERANCE                    0.5f
#define MASA_LIMIT_NO_BANDS_SUR_COH             8
#define MINIMUM_BIT_BUDGET_NORMAL_META          100
#ifdef HODIRAC
#define DIFF_DFRATIO_2BIT_LIMIT_IDX_HODIRAC     4
#endif
#define DIFF_DFRATIO_2BIT_LIMIT_IDX             3

#define DIFF_DFRATIO_1BIT_LIMIT_IDX             6
+1 −21
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@
static uint16_t deindex_sph_idx_general( const int16_t idx_sph, const int16_t no_bits, float *theta_dec, float *phi_dec, uint16_t *p_id_phi, const MC_LS_SETUP mc_format );


#ifdef HODIRAC
/*-------------------------------------------------------------------------
 * ivas_get_hodirac_flag()
 *
@@ -71,7 +70,6 @@ int16_t ivas_get_hodirac_flag(
        return 0;
    }
}
#endif


/*-------------------------------------------------------------------------
@@ -159,12 +157,10 @@ ivas_error ivas_dirac_config(

        spar_dirac_split_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND );

#ifdef HODIRAC
        if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) )
        {
            spar_dirac_split_band = 0;
        }
#endif
    }
    else
    {
@@ -199,7 +195,6 @@ ivas_error ivas_dirac_config(
                hConfig->enc_param_start_band = spar_dirac_split_band;
            }

#ifdef HODIRAC
            if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) )
            {
                hConfig->dec_param_estim = FALSE;
@@ -208,7 +203,6 @@ ivas_error ivas_dirac_config(
                set_c( (int8_t *) hQMetaData->twoDirBands, (int8_t) 1, hQMetaData->q_direction[0].cfg.nbands );
                hQMetaData->numTwoDirBands = (uint8_t) hQMetaData->q_direction[0].cfg.nbands;
            }
#endif
        }
        else
        {
@@ -357,16 +351,12 @@ ivas_error ivas_dirac_sba_config(
    int16_t i;
    int16_t nbands_wb;
    int16_t nbands_coded;
#ifdef HODIRAC
    int16_t hodirac_flag;
#endif
    ivas_error error;

    error = IVAS_ERR_OK;
    hQMetaData->is_masa_ivas_format = 0;
#ifdef HODIRAC
    hodirac_flag = ivas_get_hodirac_flag( sba_total_brate, sba_order );
#endif

    if ( sba_mode == SBA_MODE_SPAR )
    {
@@ -403,9 +393,7 @@ ivas_error ivas_dirac_sba_config(
        else
        {
            hQMetaData->useLowerBandRes = 0;
#ifdef HODIRAC
            if ( hodirac_flag == 0 )
#endif
            {
                nbands_coded = nbands - 1; /* always combine the last two bands */
            }
@@ -413,18 +401,16 @@ ivas_error ivas_dirac_sba_config(

        {
            int16_t no_dirs = 1;
#ifdef HODIRAC
            if ( hodirac_flag )
            {
                no_dirs = 2;
            }
#endif

            if ( ( error = ivas_qmetadata_allocate_memory( hQMetaData, nbands_coded, no_dirs, 0 ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#if defined( HODIRAC ) && !defined( FIX_DTX_428 )
#if !defined( FIX_DTX_428 )
            {
                int16_t dir, j;
                for ( dir = 0; dir < hQMetaData->no_directions; dir++ )
@@ -534,12 +520,10 @@ ivas_error ivas_dirac_sba_config(
        {
            {
                int16_t no_dirs = 1;
#ifdef HODIRAC
                if ( hodirac_flag )
                {
                    no_dirs = 2;
                }
#endif
                if ( ( error = ivas_qmetadata_allocate_memory( hQMetaData, 6, no_dirs, 0 ) ) != IVAS_ERR_OK )
                {
                    return error;
@@ -573,13 +557,11 @@ ivas_error ivas_dirac_sba_config(
            {
                hQMetaData->q_direction[i].cfg.search_effort = 1;

#ifdef HODIRAC
                if ( hodirac_flag )
                {
                    hQMetaData->q_direction[i].cfg.start_band = 0;
                }
                else
#endif
                {
                    hQMetaData->q_direction[i].cfg.start_band = nbands_wb;
                }
@@ -886,7 +868,6 @@ void deindex_spherical_component(
}


#ifdef HODIRAC
/*----------------------------------------------------------------
 * calculate_hodirac_sector_parameters()
 *
@@ -1102,7 +1083,6 @@ void calculate_hodirac_sector_parameters(

    return;
}
#endif


/*-----------------------------------------------------------------------*
+0 −46
Original line number Diff line number Diff line
@@ -106,10 +106,8 @@ ivas_error ivas_fb_set_cfg(
    const int16_t num_out_chans,   /* i  : number of FB output channels     */
    const int16_t active_w_mixing, /* i  : active_w_mixing flag             */
    const int32_t sampling_rate    /* i  : sampling rate                    */
#ifdef HODIRAC
    ,
    const int16_t nchan_fb_in /* i  : number of dirAC analysis channels*/
#endif
)
{
    IVAS_FB_CFG *pFb_cfg;
@@ -121,9 +119,7 @@ ivas_error ivas_fb_set_cfg(

    pFb_cfg->num_in_chans = num_in_chans;
    pFb_cfg->num_out_chans = num_out_chans;
#ifdef HODIRAC
    pFb_cfg->nchan_fb_in = nchan_fb_in;
#endif

    pFb_cfg->pcm_offset = 0; /* note: in SPAR decoder, this parameter is overwritten later */
    pFb_cfg->active_w_mixing = active_w_mixing;
@@ -222,11 +218,7 @@ ivas_error ivas_FB_mixer_open(
    }
    else if ( fb_cfg->active_w_mixing )
    {
#ifdef HODIRAC
        num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in );
#else
        num_chs_alloc = fb_cfg->num_in_chans;
#endif
    }
    else
    {
@@ -262,11 +254,7 @@ ivas_error ivas_FB_mixer_open(
    }
    else
    {
#ifdef HODIRAC
        num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in );
#else
        num_chs_alloc = fb_cfg->num_in_chans;
#endif
    }

    for ( i = 0; i < num_chs_alloc; i++ )
@@ -281,11 +269,7 @@ ivas_error ivas_FB_mixer_open(
    if ( ( fb_cfg->active_w_mixing != -1 ) && ( fb_cfg->num_out_chans > 0 ) )
    {
        float *pTemp_mem;
#ifdef HODIRAC
        if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ) * IVAS_MAX_NUM_BANDS ) ) == NULL )
#else
        if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * fb_cfg->num_in_chans * IVAS_MAX_NUM_BANDS ) ) == NULL )
#endif
        {
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer" );
        }
@@ -396,11 +380,7 @@ void ivas_FB_mixer_close(
    }
    else if ( fb_cfg->active_w_mixing )
    {
#ifdef HODIRAC
        num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in );
#else
        num_chs_alloc = fb_cfg->num_in_chans;
#endif
    }
    else
    {
@@ -429,11 +409,7 @@ void ivas_FB_mixer_close(
        }
        else
        {
#ifdef HODIRAC
            num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in );
#else
            num_chs_alloc = fb_cfg->num_in_chans;
#endif
        }


@@ -514,10 +490,8 @@ void ivas_fb_mixer_pcm_ingest(
    float pcm_in[][L_FRAME48k],    /* i  : input audio channels        */
    float **ppOut_pcm,             /* o  : output audio channels       */
    const int16_t frame_len        /* i  : frame length                */
#ifdef HODIRAC
    ,
    const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH]
#endif
)
{
    int16_t i;
@@ -536,15 +510,7 @@ void ivas_fb_mixer_pcm_ingest(
    for ( i = 0; i < fb_cfg->num_in_chans; i++ )
    {
        mvr2r( &hFbMixer->ppFilterbank_prior_input[i][fb_cfg->prior_input_length - frame_len], ppOut_pcm[i], frame_len );
#ifdef HODIRAC
#ifdef HODIRAC
        mvr2r( pcm_in[HOA_md_ind[i]], &ppOut_pcm[i][frame_len], frame_len );
#else
        mvr2r( pcm_in[HOA_keep_ind_spar[i]], &ppOut_pcm[i][frame_len], frame_len );
#endif
#else
        mvr2r( pcm_in[i], &ppOut_pcm[i][frame_len], frame_len );
#endif
    }

    for ( i = 0; i < num_chs_ingest; i++ )
@@ -566,20 +532,14 @@ void ivas_fb_mixer_update_prior_input(
    IVAS_FB_MIXER_HANDLE hFbMixer, /* i/o: FB mixer handle              */
    float *pcm_in[],               /* i  : input audio channels         */
    const int16_t length           /* i  : length of time slot          */
#ifdef HODIRAC
    ,
    const int16_t nchan_fb_in /* i  : number of analysis channels  */
#endif
)
{
    int16_t i;

    for ( i = 0; i <
#ifdef HODIRAC
                 nchan_fb_in;
#else
                 hFbMixer->fb_cfg->num_in_chans;
#endif
          i++ )
    {
        mvr2r( &hFbMixer->ppFilterbank_prior_input[i][length], hFbMixer->ppFilterbank_prior_input[i], hFbMixer->fb_cfg->prior_input_length - length );
@@ -603,10 +563,8 @@ void ivas_fb_mixer_get_windowed_fr(
    float *frame_f_imag[],         /* o  : imag freq domain values            */
    const int16_t length,          /* i  : number of new samples in time slot */
    const int16_t mdft_len         /* i  : MDFT frame length                  */
#ifdef HODIRAC
    ,
    const int16_t nchan_fb_in /* i  : number of analysis channels        */
#endif
)
{
    int16_t ch_idx, j, offset, rev_offset;
@@ -622,11 +580,7 @@ void ivas_fb_mixer_get_windowed_fr(
    set_zero( fr_in_block, offset );

    for ( ch_idx = 0; ch_idx <
#ifdef HODIRAC
                      nchan_fb_in
#else
                      hFbMixer->fb_cfg->num_in_chans
#endif
          ;
          ch_idx++ )
    {
+1 −59
Original line number Diff line number Diff line
@@ -3090,10 +3090,8 @@ void mdct_read_IGF_bits(
ivas_error ivas_qmetadata_enc_encode(
    BSTR_ENC_HANDLE hMetaData,                                  /* i/o: metadata bitstream handle               */
    IVAS_QMETADATA *hQMetaData                                  /* i/o: q_metadata handle                       */
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode          */
#endif
);

#ifdef HR_METADATA
@@ -3158,10 +3156,8 @@ int16_t ivas_qmetadata_dec_decode(
    IVAS_QMETADATA_HANDLE hQMetaData,                           /* i/o: q_metadata handle                       */
    uint16_t *bitstream,                                        /* i  : bitstream                               */
    int16_t *index                                              /* i/o: bitstream position                      */
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode          */
#endif
);

#ifdef HR_METADATA
@@ -3193,9 +3189,7 @@ void ivas_qmetadata_to_dirac(
    MASA_DECODER_HANDLE hMasa,                                  /* i  : MASA decoder structure                  */
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                      */
    const SBA_MODE sba_mode,                                    /* i  : SBA mode                                */
#ifdef HODIRAC
    const int16_t hodirac_flag,                                 /* i : flag to indicate HO-DirAC mode           */
#endif
    int16_t *dirac_to_spar_md_bands                             /* o  : DirAC->SPAR MD bands                    */
);

@@ -3398,11 +3392,9 @@ void ivas_dirac_param_est_enc(
    float **pp_fr_imag,
    const int16_t input_frame, 
    const SBA_MODE sba_mode
#ifdef HODIRAC
    ,
   const int16_t hodirac_flag,
   const int16_t nchan_fb_in
#endif
 );


@@ -3478,13 +3470,10 @@ int16_t ivas_sba_get_nchan(
/*! r: number of ambisonics metadata channels */
int16_t ivas_sba_get_nchan_metadata(
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
#ifdef HODIRAC
    ,
    const int32_t ivas_total_brate
#endif
);

#ifdef HODIRAC
void ivas_sba_get_spar_hoa_ch_ind(
    const int16_t num_md_chs,                                   /* i  : number of MD channels                   */
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                      */
@@ -3498,13 +3487,6 @@ void ivas_sba_get_spar_hoa_md_flag(
    int16_t *spar_hoa_md_flag,
    int16_t *spar_hoa_dirac2spar_md_flag 
);
#else
/*! r: flag indicating to code SPAR HOA MD for all bands */
int16_t ivas_sba_get_spar_hoa_md_flag(
    const int16_t sba_order,                                    /* i  : Ambisonic (SBA) order                   */
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
);
#endif

void ivas_sba_zero_vert_comp(
    float sba_data[][L_FRAME48k],                               /* i/o: SBA data frame                          */
@@ -3536,13 +3518,11 @@ void ivas_sba_dirac_stereo_config(
    STEREO_DFT_CONFIG_DATA_HANDLE hConfig                       /* o  : DFT stereo configuration                */
);

#ifdef HODIRAC
/*! r: HO-DirAC flag */
int16_t ivas_get_hodirac_flag(
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                      */
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);
#endif

int16_t ivas_get_sba_dirac_stereo_flag(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
@@ -3661,9 +3641,7 @@ void ivas_dirac_dec_read_BS(
    IVAS_QMETADATA_HANDLE hQMetaData,                           /* i/o: q metadata                              */
    int16_t *nb_bits,                                           /* o  : number of bits read                     */
    const SBA_MODE sba_mode,                                    /* i  : SBA mode                                */
#ifdef HODIRAC
    const int16_t hodirac_flag,                                 /* i  : flag to indicate HO-DirAC mode          */
#endif
    int16_t *dirac_to_spar_md_bands                             /* o  : DirAC->SPAR MD bands                    */
);

@@ -3811,19 +3789,15 @@ ivas_error ivas_dirac_dec_output_synthesis_open(
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                               */
    const int16_t nchan_transport,                              /* i  : number of transport channels                */
    const int32_t output_Fs                                     /* i  : output sampling rate                        */
#ifdef HODIRAC
	,
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode              */
#endif
);

void ivas_dirac_dec_output_synthesis_init(
    DIRAC_DEC_HANDLE hDirAC,                                    /* i/o: DirAC handle                                */
    const int16_t nchan_out_woLFE                               /* i  : number of output audio channels without LFE */
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode              */
#endif
);

void ivas_dirac_dec_output_synthesis_close(
@@ -3846,14 +3820,12 @@ void ivas_dirac_dec_output_synthesis_process_slot(
    const VBAP_HANDLE hVBAPdata,                                /* i  : VBAP structure                              */
    const IVAS_OUTPUT_SETUP hOutSetup,                          /* i  : output setup structure                      */
	const int16_t nchan_transport                               /* i  : number of transport channels                */
#if !defined( HODIRAC ) || defined( JBM_TSM_ON_TCS )
#if defined( JBM_TSM_ON_TCS )
    ,
    const int16_t index_slot
#endif
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag
#endif
);

void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd(
@@ -3865,13 +3837,11 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd(
    const int16_t nbslots,                                                  /* i  : number of slots to process                  */
#endif
    const float *onset_filter 
#ifdef HODIRAC                                                      
    ,
#ifdef JBM_TSM_ON_TCS
    const int16_t md_idx,
#endif
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode              */
#endif
);

void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls(
@@ -3928,10 +3898,8 @@ void ivas_dirac_dec_compute_directional_responses(
    const float *surCohRatio,
    const int16_t shd_rot_max_order, /* i  : split-order rotation method    */
    const float *p_Rmat              /* i  : rotation matrix                */
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode                  */
#endif
);

void ivas_dirac_dec_get_frequency_axis( 
@@ -3939,7 +3907,6 @@ void ivas_dirac_dec_get_frequency_axis(
    const int32_t output_Fs,                                    /* i  : sampling frequency                                */
    const int16_t num_freq_bands );                             /* i  : number of frequency bands                         */

#ifdef HODIRAC
void calculate_hodirac_sector_parameters(
    float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX],   /* i  : signal vector (L+1)^2 x N_bins, real part       */
    float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX],   /* i  : signal vector, imaginary part                   */
@@ -3953,7 +3920,6 @@ void calculate_hodirac_sector_parameters(
    float *diff,                                                    /* o  : array of sector diffuseness values, flat        */
    float *ene                                                      /* o  : array of sector energy values, flat             */
);
#endif

void ivas_mc_paramupmix_enc(
    Encoder_Struct *st_ivas,                                        /* i/o: IVAS Encoder handle                             */
@@ -4678,11 +4644,9 @@ void ivas_get_spar_md_from_dirac(
    const int16_t active_w_vlbr
);

#ifdef HODIRAC
int16_t ivas_get_spar_dec_md_num_subframes(
    const int16_t sba_order, /* i  : Ambisonic (SBA) order            */
    const int32_t ivas_total_brate );
#endif

ivas_error ivas_spar_md_dec_open(
    ivas_spar_md_dec_state_t **hMdDec_out,                      /* i/o: SPAR MD decoder handle                  */
@@ -4736,19 +4700,15 @@ void ivas_spar_update_md_hist(
void ivas_spar_smooth_md_dtx(
    ivas_spar_md_dec_state_t *hMdDec,                           /* i/o: SPAR MD decoder handle                  */
    const int16_t num_bands_out                                 /* i  : number of output bands                  */
	#ifdef HODIRAC
    ,
    const int16_t num_md_sub_frames /* i  : number of metadata subframes      */
#endif
);

void ivas_spar_setup_md_smoothing(
    ivas_spar_md_dec_state_t *hMdDec,                           /* i/o: SPAR MD decoder handle                  */
    const int16_t num_bands_out                                 /* i  : number of output bands                  */
#ifdef HODIRAC
    ,
    const int16_t num_md_sub_frames /* i  : number of metadata subframes      */
#endif
);

void ivas_spar_dec_gen_umx_mat(
@@ -4756,10 +4716,8 @@ void ivas_spar_dec_gen_umx_mat(
    const int16_t nchan_transport,                              /* i  : number of transport channels            */
    const int16_t num_bands_out,                                /* i  : number of output bands                  */
    const int16_t bfi                                           /* i  : bad frame indicator                     */
#ifdef HODIRAC
                               ,
    const int16_t num_md_sub_frames
#endif
);

/* Covariance module */
@@ -4789,10 +4747,8 @@ void ivas_enc_cov_handler_process(
    const int16_t nchan_inp,
    const int16_t dtx_vad,
    const int16_t transient_det[2]
#ifdef HODIRAC
    ,
    const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH]
#endif
);

ivas_error ivas_spar_covar_smooth_enc_open( 
@@ -5164,10 +5120,8 @@ void masa_compensate_two_dir_energy_ratio_index(
    const int16_t ratio_index_2,                                /* i  : Input ratio for direction 2                     */
    int16_t *ratio_index_mod1,                                  /* o  : Output modified ratio for direction 1           */
    int16_t *ratio_index_mod2                                   /* o  : Output modified ratio for direction 2           */
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag                                  /* i  : flag to indicate HO-DirAC mode                  */
#endif
);

void ivas_set_qmetadata_maxbit_req(
@@ -5175,12 +5129,10 @@ void ivas_set_qmetadata_maxbit_req(
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                                     */
);

#ifdef HODIRAC
/*! r: Bits to be used for quantizing distribution ratio of direct-to-total ratios */
int16_t ivas_get_df_ratio_bits_hodirac(
    const int16_t index_diff                                    /* i  : Index of quantized diffuse-to-total ratio       */
);
#endif

/*! r: Bits to be used for quantizing distribution ratio of direct-to-total ratios */
int16_t ivas_get_df_ratio_bits(
@@ -5544,10 +5496,8 @@ void computeReferencePower_enc(
    const int16_t enc_param_start_band,                         /* i  : first band to process                           */
    const int16_t num_freq_bands,                               /* i  : Number of frequency bands                       */
    const SBA_MODE sba_mode                                     /* i  : SBA mode                                        */
#ifdef HODIRAC
    ,
    const int16_t nchan_ana                                     /* i  : number of analysis channels                     */
#endif
);

ivas_error ivas_mono_dmx_renderer_open(
@@ -5683,10 +5633,8 @@ ivas_error ivas_fb_set_cfg(
    const int16_t num_out_chans,                                /* i  : number of FB output channels                */
    const int16_t active_w_mixing,                              /* i  : active_w_mixing flag                        */
    const int32_t sampling_Fs                                   /* i  : sampling rate                               */
#ifdef HODIRAC
    ,
    const int16_t nachan_dirac_ana                              /* i  : number of DirAR analysis channels           */
#endif
);

ivas_error ivas_FB_mixer_open( 
@@ -5707,10 +5655,8 @@ void ivas_fb_mixer_pcm_ingest(
    float pcm_in[][L_FRAME48k],                                 /* i  : input audio channels                        */
    float **ppOut_pcm,                                          /* o  : output audio channels                       */
    const int16_t frame_length                                  /* i  : frame length                                */
#ifdef HODIRAC
    ,
    const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH]
#endif
);

void ivas_dirac_enc_spar_delay_synchro(
@@ -5723,10 +5669,8 @@ void ivas_fb_mixer_update_prior_input(
    IVAS_FB_MIXER_HANDLE hFbMixer,                              /* i/o: FB mixer handle                             */
    float *pcm_in[],                                            /* i  : input audio channels                        */
    const int16_t length                                        /* i  : length of time slot                         */
#ifdef HODIRAC
    ,
    const int16_t nchan_fb_in                                   /* i  : number of analysis channels                 */
#endif
);

void ivas_fb_mixer_get_windowed_fr(
@@ -5736,10 +5680,8 @@ void ivas_fb_mixer_get_windowed_fr(
    float *frame_f_imag[],                                      /* o  : imag freq domain values                     */
    const int16_t length,                                       /* i  : number of new samples in time slot          */
    const int16_t mdft_len                                      /* i  : MDFT frame length                           */
#ifdef HODIRAC
    ,
    const int16_t nchan_fb_in                                   /* i  : number of analysis channels                 */
#endif
);

void ivas_fb_mixer_process( 
+0 −6
Original line number Diff line number Diff line
@@ -508,10 +508,8 @@ void masa_compensate_two_dir_energy_ratio_index(
    const int16_t ratio_index_2, /* i  : Input ratio for direction 2           */
    int16_t *ratio_index_mod1,   /* o  : Output modified ratio for direction 1 */
    int16_t *ratio_index_mod2    /* o  : Output modified ratio for direction 2 */
#ifdef HODIRAC
    ,
    const int16_t hodirac_flag /* i  : flag to indicate HO-DirAC mode        */
#endif
)
{
    float ratio1, ratio2;
@@ -520,9 +518,7 @@ void masa_compensate_two_dir_energy_ratio_index(
    ratio1 = 1.0f - diffuseness_reconstructions[ratio_index_1];
    ratio2 = 1.0f - diffuseness_reconstructions[ratio_index_2];

#ifdef HODIRAC
    if ( !hodirac_flag )
#endif
    {
        ratioSum = ratio1 + ratio2;
        if ( ratio1 >= ratio2 )
@@ -621,7 +617,6 @@ void ivas_qmetadata_direction_vector_to_azimuth_elevation(
}


#ifdef HODIRAC
/*-------------------------------------------------------------------------
 * ivas_get_df_ratio_bits_hodirac()
 *
@@ -650,7 +645,6 @@ int16_t ivas_get_df_ratio_bits_hodirac(

    return dfRatio_bits;
}
#endif

/*---------------------------------------------------------------
 * ivas_get_df_ratio_bits()
Loading