Loading lib_com/ivas_cnst.h +8 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,10 @@ 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 */ #define MAX_SCE MAX_NUM_OBJECTS /* max. number of SCEs */ Loading Loading @@ -987,6 +991,10 @@ typedef enum #define SPAR_CONFIG_BW FB #define IVAS_SPAR_MAX_CH (FOA_CHANNELS + 2 * ( IVAS_MAX_SBA_ORDER - 1 )) /* FOA + planar HOA */ #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) Loading lib_com/ivas_fb_mixer.c +17 −24 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ ivas_error ivas_fb_set_cfg( const int32_t sampling_rate /* i : sampling rate */ #ifdef HODIRAC , const int16_t nchan_dirac_ana /* i: number of dirac analysis channels */ const int16_t nchan_fb_in /* i: number of dirac analysis channels */ #endif ) { Loading @@ -122,7 +122,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_dirac_ana = nchan_dirac_ana; pFb_cfg->nchan_fb_in = nchan_fb_in; #endif pFb_cfg->pcm_offset = 0; /* note: in SPAR decoder, this parameter is overwritten later */ Loading Loading @@ -223,7 +223,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_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading @@ -231,7 +231,7 @@ ivas_error ivas_FB_mixer_open( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_out_chans; #endif Loading Loading @@ -267,7 +267,7 @@ ivas_error ivas_FB_mixer_open( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading @@ -288,7 +288,7 @@ ivas_error ivas_FB_mixer_open( if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * #ifdef HODIRAC max( fb_cfg->num_in_chans, fb_cfg->nchan_dirac_ana ) * max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ) * #else fb_cfg->num_in_chans * #endif Loading Loading @@ -404,7 +404,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_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading @@ -412,7 +412,7 @@ void ivas_FB_mixer_close( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_out_chans; #endif Loading Loading @@ -442,7 +442,7 @@ void ivas_FB_mixer_close( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading Loading @@ -545,7 +545,7 @@ void ivas_fb_mixer_pcm_ingest( { mvr2r( &hFbMixer->ppFilterbank_prior_input[i][fb_cfg->prior_input_length - frame_len], ppOut_pcm[i], frame_len ); #ifdef HODIRAC mvr2r( pcm_in[HOA_keep_ind[i]], &ppOut_pcm[i][frame_len], frame_len ); mvr2r( pcm_in[HOA_keep_ind_spar[i]], &ppOut_pcm[i][frame_len], frame_len ); #else mvr2r( pcm_in[i], &ppOut_pcm[i][frame_len], frame_len ); #endif Loading @@ -570,13 +570,17 @@ 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 #endif ) { int16_t i; for ( i = 0; i < #ifdef HODIRAC max( hFbMixer->fb_cfg->num_in_chans, hFbMixer->fb_cfg->nchan_dirac_ana ); nchan_fb_in; #else hFbMixer->fb_cfg->num_in_chans; #endif Loading Loading @@ -605,7 +609,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , const int16_t hodirac /* i: flag for skipping non-planar 3rd-order ambisonic channels*/ int16_t nchan_fb_in #endif ) { Loading @@ -615,10 +619,6 @@ void ivas_fb_mixer_get_windowed_fr( float fr_in_block[L_FRAME48k * 2]; const float *win_ptr; #ifdef HODIRAC int16_t nchan_ana = max( hFbMixer->fb_cfg->nchan_dirac_ana, hFbMixer->fb_cfg->num_in_chans ); #endif n_old_samples = min( ( hFbMixer->fb_cfg->prior_input_length - hFbMixer->fb_cfg->windowed_fr_offset ), ( 2 * mdft_len ) ); n_new_samples = max( 0, 2 * length - n_old_samples ); offset = (int16_t) ( 2 * mdft_len - length - hFbMixer->ana_window_offset ); Loading @@ -627,20 +627,13 @@ void ivas_fb_mixer_get_windowed_fr( for ( ch_idx = 0; ch_idx < #ifdef HODIRAC nchan_ana nchan_fb_in #else hFbMixer->fb_cfg->num_in_chans #endif ; ch_idx++ ) { #ifdef HODIRAC if ( hodirac && ch_idx >= 10 && ch_idx <= 14 ) { continue; } #endif mvr2r( &hFbMixer->ppFilterbank_prior_input[ch_idx][offset + hFbMixer->fb_cfg->windowed_fr_offset], &fr_in_block[offset], n_old_samples - offset ); mvr2r( pcm_in[ch_idx], &fr_in_block[n_old_samples], n_new_samples ); win_ptr = hFbMixer->pAna_window; Loading lib_com/ivas_prot.h +6 −2 Original line number Diff line number Diff line Loading @@ -3216,7 +3216,7 @@ void ivas_dirac_param_est_enc( #ifdef HODIRAC , const int16_t hodirac, const int16_t nchan_dirac_ana const int16_t nchan_fb_in #endif ); Loading Loading @@ -5124,6 +5124,10 @@ 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 #endif ); void ivas_fb_mixer_get_windowed_fr( Loading @@ -5135,7 +5139,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , const int16_t hodirac /* i: flag for skipping non-planar 3rd-order ambisonic channels*/ int16_t nchan_fb_in #endif ); Loading lib_com/ivas_rom_com.c +5 −0 Original line number Diff line number Diff line Loading @@ -1484,7 +1484,12 @@ const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH] = { /* WYZX --> WYXZ... */ #endif const int16_t keep_planar[IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS] = { 1, 1, 1, 1 }; #ifdef HODIRAC const int16_t HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15}; const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 10}; #else const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 15}; #endif /*----------------------------------------------------------------------* Loading lib_com/ivas_rom_com.h +5 −0 Original line number Diff line number Diff line Loading @@ -199,7 +199,12 @@ extern const int16_t remix_order_set[1][DIRAC_MAX_ANA_CHANS]; extern const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH]; #endif extern const int16_t keep_planar[IVAS_SPAR_MAX_CH - FOA_CHANNELS]; #ifdef HODIRAC extern const int16_t HOA_keep_ind[11]; extern const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH]; #else extern const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH]; #endif extern const float dtx_pd_real_min_max[2]; extern const int16_t dtx_pd_real_q_levels[3][3]; Loading Loading
lib_com/ivas_cnst.h +8 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,10 @@ 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 */ #define MAX_SCE MAX_NUM_OBJECTS /* max. number of SCEs */ Loading Loading @@ -987,6 +991,10 @@ typedef enum #define SPAR_CONFIG_BW FB #define IVAS_SPAR_MAX_CH (FOA_CHANNELS + 2 * ( IVAS_MAX_SBA_ORDER - 1 )) /* FOA + planar HOA */ #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) Loading
lib_com/ivas_fb_mixer.c +17 −24 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ ivas_error ivas_fb_set_cfg( const int32_t sampling_rate /* i : sampling rate */ #ifdef HODIRAC , const int16_t nchan_dirac_ana /* i: number of dirac analysis channels */ const int16_t nchan_fb_in /* i: number of dirac analysis channels */ #endif ) { Loading @@ -122,7 +122,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_dirac_ana = nchan_dirac_ana; pFb_cfg->nchan_fb_in = nchan_fb_in; #endif pFb_cfg->pcm_offset = 0; /* note: in SPAR decoder, this parameter is overwritten later */ Loading Loading @@ -223,7 +223,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_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading @@ -231,7 +231,7 @@ ivas_error ivas_FB_mixer_open( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_out_chans; #endif Loading Loading @@ -267,7 +267,7 @@ ivas_error ivas_FB_mixer_open( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading @@ -288,7 +288,7 @@ ivas_error ivas_FB_mixer_open( if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * #ifdef HODIRAC max( fb_cfg->num_in_chans, fb_cfg->nchan_dirac_ana ) * max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ) * #else fb_cfg->num_in_chans * #endif Loading Loading @@ -404,7 +404,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_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading @@ -412,7 +412,7 @@ void ivas_FB_mixer_close( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_out_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_out_chans; #endif Loading Loading @@ -442,7 +442,7 @@ void ivas_FB_mixer_close( else { #ifdef HODIRAC num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_dirac_ana ); num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); #else num_chs_alloc = fb_cfg->num_in_chans; #endif Loading Loading @@ -545,7 +545,7 @@ void ivas_fb_mixer_pcm_ingest( { mvr2r( &hFbMixer->ppFilterbank_prior_input[i][fb_cfg->prior_input_length - frame_len], ppOut_pcm[i], frame_len ); #ifdef HODIRAC mvr2r( pcm_in[HOA_keep_ind[i]], &ppOut_pcm[i][frame_len], frame_len ); mvr2r( pcm_in[HOA_keep_ind_spar[i]], &ppOut_pcm[i][frame_len], frame_len ); #else mvr2r( pcm_in[i], &ppOut_pcm[i][frame_len], frame_len ); #endif Loading @@ -570,13 +570,17 @@ 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 #endif ) { int16_t i; for ( i = 0; i < #ifdef HODIRAC max( hFbMixer->fb_cfg->num_in_chans, hFbMixer->fb_cfg->nchan_dirac_ana ); nchan_fb_in; #else hFbMixer->fb_cfg->num_in_chans; #endif Loading Loading @@ -605,7 +609,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , const int16_t hodirac /* i: flag for skipping non-planar 3rd-order ambisonic channels*/ int16_t nchan_fb_in #endif ) { Loading @@ -615,10 +619,6 @@ void ivas_fb_mixer_get_windowed_fr( float fr_in_block[L_FRAME48k * 2]; const float *win_ptr; #ifdef HODIRAC int16_t nchan_ana = max( hFbMixer->fb_cfg->nchan_dirac_ana, hFbMixer->fb_cfg->num_in_chans ); #endif n_old_samples = min( ( hFbMixer->fb_cfg->prior_input_length - hFbMixer->fb_cfg->windowed_fr_offset ), ( 2 * mdft_len ) ); n_new_samples = max( 0, 2 * length - n_old_samples ); offset = (int16_t) ( 2 * mdft_len - length - hFbMixer->ana_window_offset ); Loading @@ -627,20 +627,13 @@ void ivas_fb_mixer_get_windowed_fr( for ( ch_idx = 0; ch_idx < #ifdef HODIRAC nchan_ana nchan_fb_in #else hFbMixer->fb_cfg->num_in_chans #endif ; ch_idx++ ) { #ifdef HODIRAC if ( hodirac && ch_idx >= 10 && ch_idx <= 14 ) { continue; } #endif mvr2r( &hFbMixer->ppFilterbank_prior_input[ch_idx][offset + hFbMixer->fb_cfg->windowed_fr_offset], &fr_in_block[offset], n_old_samples - offset ); mvr2r( pcm_in[ch_idx], &fr_in_block[n_old_samples], n_new_samples ); win_ptr = hFbMixer->pAna_window; Loading
lib_com/ivas_prot.h +6 −2 Original line number Diff line number Diff line Loading @@ -3216,7 +3216,7 @@ void ivas_dirac_param_est_enc( #ifdef HODIRAC , const int16_t hodirac, const int16_t nchan_dirac_ana const int16_t nchan_fb_in #endif ); Loading Loading @@ -5124,6 +5124,10 @@ 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 #endif ); void ivas_fb_mixer_get_windowed_fr( Loading @@ -5135,7 +5139,7 @@ void ivas_fb_mixer_get_windowed_fr( const int16_t mdft_len /* i : MDFT frame length */ #ifdef HODIRAC , const int16_t hodirac /* i: flag for skipping non-planar 3rd-order ambisonic channels*/ int16_t nchan_fb_in #endif ); Loading
lib_com/ivas_rom_com.c +5 −0 Original line number Diff line number Diff line Loading @@ -1484,7 +1484,12 @@ const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH] = { /* WYZX --> WYXZ... */ #endif const int16_t keep_planar[IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS] = { 1, 1, 1, 1 }; #ifdef HODIRAC const int16_t HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15}; const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 10}; #else const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 15}; #endif /*----------------------------------------------------------------------* Loading
lib_com/ivas_rom_com.h +5 −0 Original line number Diff line number Diff line Loading @@ -199,7 +199,12 @@ extern const int16_t remix_order_set[1][DIRAC_MAX_ANA_CHANS]; extern const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH]; #endif extern const int16_t keep_planar[IVAS_SPAR_MAX_CH - FOA_CHANNELS]; #ifdef HODIRAC extern const int16_t HOA_keep_ind[11]; extern const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH]; #else extern const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH]; #endif extern const float dtx_pd_real_min_max[2]; extern const int16_t dtx_pd_real_q_levels[3][3]; Loading