diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index b83057ede4a5b4e5cbb95178777fd3d2b241b730..bff649e726154d5a35a5b6d3dcba893a3e1d9128 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -195,19 +195,11 @@ ivas_error ivas_dirac_config( if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) { -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft, 1 ); -#else - ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); -#endif } else { -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft, 1 ); -#else - ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft ); -#endif } return error; @@ -220,7 +212,6 @@ ivas_error ivas_dirac_config( * DirAC Configuration freq. band function; used also in MASA decoder *------------------------------------------------------------------------*/ -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING void ivas_dirac_config_bands( int16_t *band_grouping, /* o : band grouping */ const int16_t nbands, /* i : number of bands */ @@ -230,16 +221,6 @@ void ivas_dirac_config_bands( const int16_t enc_param_start_band, IVAS_FB_MIXER_HANDLE hFbMdft, const int8_t BandGroupLowRes ) -#else -void ivas_dirac_config_bands( - int16_t *band_grouping, /* o : band grouping */ - const int16_t nbands, /* i : number of bands */ - const int16_t max_band, /* i : maximal band index +1 */ - int16_t *dirac_to_spar_md_bands, - const int8_t useLowerBandRes, - const int16_t enc_param_start_band, - IVAS_FB_MIXER_HANDLE hFbMdft ) -#endif { int16_t i; { @@ -290,9 +271,8 @@ void ivas_dirac_config_bands( { int16_t step = DIRAC_LOW_BANDRES_STEP; int16_t reduced_band; -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING + if ( BandGroupLowRes ) -#endif { for ( band = enc_param_start_band + 2, reduced_band = enc_param_start_band + 1; band <= DIRAC_MAX_NBANDS; band += step, reduced_band++ ) { diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 132922102b58510346a2185b6fb48f2211414a75..d22a60cdb385f032f9cdb0075453cb3dc7dd244e 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -2958,12 +2958,10 @@ int16_t check_bounds_s( const int16_t high /* i : High limit */ ); -#ifdef FIX_CRASH_LONG_BRIR void set_zero_l( - float *vec, /* o : input vector */ - const uint32_t lvec /* i : length of the vector */ + float *vec, /* o : input vector */ + const uint32_t lvec /* i : length of the vector */ ); -#endif ivas_error stereo_memory_enc( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ @@ -3669,7 +3667,6 @@ ivas_error ivas_dirac_config( const int16_t enc_dec /* i : encoder or decoder flag */ ); -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING void ivas_dirac_config_bands( int16_t *band_grouping, /* o : band grouping */ const int16_t nbands, /* i : number of bands */ @@ -3680,17 +3677,6 @@ void ivas_dirac_config_bands( IVAS_FB_MIXER_HANDLE hFbMdft, /* i : MDFT filterbank handle */ const int8_t BandGroupLowRes /* i : flag indicating lower band grouping resolution for DirAC */ ); -#else -void ivas_dirac_config_bands( - int16_t *band_grouping, /* o : band grouping */ - const int16_t nbands, /* i : number of bands */ - const int16_t max_band, /* i : maximal band index +1 */ - int16_t *dirac_to_spar_md_bands, /* o : mapping of DirAC parameter band index to SPAR FB band index */ - const int8_t useLowerBandRes, /* i : flag indicating lower band resolution for DirAC */ - const int16_t enc_param_start_band, /* i : band index of first DirAC parameter band */ - IVAS_FB_MIXER_HANDLE hFbMdft -); -#endif void ivas_get_dirac_sba_max_md_bits( const int32_t sba_total_brate, @@ -5903,14 +5889,6 @@ ivas_error ivas_td_binaural_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); -#ifndef FIX_910_REMOVE_DUPLICATION_TD_REND -ivas_error ivas_td_binaural_renderer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float *output[], /* i/o: SCE channels / Binaural synthesis */ - const int16_t output_frame /* i : output frame length */ -); -#endif - ivas_error ivas_td_binaural_renderer_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ diff --git a/lib_com/ivas_tools.c b/lib_com/ivas_tools.c index 7d4b0f2c64c8cec26634bb4715260b63410d67db..58a92ab5b58749aada0dc882c968ce20374b4d28 100644 --- a/lib_com/ivas_tools.c +++ b/lib_com/ivas_tools.c @@ -581,7 +581,7 @@ int16_t check_bounds_s( return value_adj; } -#ifdef FIX_CRASH_LONG_BRIR + /*---------------------------------------------------------------------* * set_zero_l() * @@ -602,7 +602,6 @@ void set_zero_l( return; } -#endif /****************************************************************************/ /* matrix functions */ diff --git a/lib_com/options.h b/lib_com/options.h index d05090183b848d06b67cda5c6daddf0db5ffcd95..6917d5f67929f4141ad1c5ff1198ffc7639fa656 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -197,12 +197,6 @@ #define ISAR_BITSTREAM_UPDATE_LC3PLUS /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */ #endif #define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */ -#define NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING /* Dlb: issue 907: fix for band mapping at VLBR */ -#define NONBE_FIX_869_MASA_PREREND_MERGE /* Nokia: issue: #869: MASA pre-rend not updating energy */ -#define FIX_910_REMOVE_DUPLICATION_TD_REND /* VA: issue 910: remove duplication of function ivas_td_binaural_renderer() */ -#define FIX_940_DEBUGGING_VARIABLE /* Nokia: issue #940: remove debugging variable */ -#define NONBE_FIX_931_IGF_STEREO_DEC_NOISE /* FhG: issue #931: fix noise substitution in the stereo IGF decoder */ -#define FIX_CRASH_LONG_BRIR /* Orange : Fix crash when long BRIR is set */ #define NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* FhG: issue 943: fix crash in BW switchin from WB in MDCT-Stereo core encoder */ #define FIX_911_REMOVE_CREND_DUPLICATION /* VA: issue 911: resolve duplication of CRend binaural external renderer function */ #define FIX_938_GCC_12_WARNINGS /* VA: issue #938: remove set_f(.,.,0) call in which length is always 0 to remove GCC 12.0 warning */ diff --git a/lib_dec/igf_dec.c b/lib_dec/igf_dec.c index 7d69970075bb699a3367834af824baad08726561..dac1f0278798fbd1917b81843c226da15fb77eb8 100644 --- a/lib_dec/igf_dec.c +++ b/lib_dec/igf_dec.c @@ -490,11 +490,7 @@ static void IGF_prepStereo( { if ( hPrivateDataL->n_noise_bands_off ) { -#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE IGF_replaceTCXNoise_2_new( src_specL, TCXNoiseL, strt_cpy, stop, hPrivateDataL->totalNoiseNrg_off, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); -#else - IGF_replaceTCXNoise_2_new( igf_specL, TCXNoiseL, strt_cpy, stop, hPrivateDataL->totalNoiseNrg_off, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); -#endif } sel_specL = src_specL; } @@ -511,11 +507,7 @@ static void IGF_prepStereo( { if ( hPrivateDataR->n_noise_bands_off ) { -#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE IGF_replaceTCXNoise_2_new( src_specR, TCXNoiseR, strt_cpy, stop, hPrivateDataR->totalNoiseNrg_off, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); -#else - IGF_replaceTCXNoise_2_new( igf_specR, TCXNoiseR, strt_cpy, stop, hPrivateDataR->totalNoiseNrg_off, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); -#endif } sel_specR = src_specR; } @@ -582,11 +574,7 @@ static void IGF_prepStereo( { if ( hPrivateDataL->n_noise_bands_off ) { -#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE IGF_replaceTCXNoise_2_new( src_specL, TCXNoiseL, strt_cpy, stop, hPrivateDataL->totalNoiseNrg_off, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); -#else - IGF_replaceTCXNoise_2_new( igf_specL, TCXNoiseL, strt_cpy, stop, hPrivateDataL->totalNoiseNrg_off, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); -#endif } sel_specL = src_specL; } @@ -603,11 +591,7 @@ static void IGF_prepStereo( { if ( hPrivateDataR->n_noise_bands_off ) { -#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE IGF_replaceTCXNoise_2_new( src_specR, TCXNoiseR, strt_cpy, stop, hPrivateDataR->totalNoiseNrg_off, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); -#else - IGF_replaceTCXNoise_2_new( igf_specR, TCXNoiseR, strt_cpy, stop, hPrivateDataR->totalNoiseNrg_off, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); -#endif } sel_specR = src_specR; } diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index da04827dea0bc6a6e2d688aad43c54837fd43cf3..ba7e8afb39301ed1dcbc59a30843d240f871b882 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1287,11 +1287,7 @@ void ivas_qmetadata_to_dirac( /* SID/zero-frame: 1 direction, 5 bands, nblocks re-generated out of SID decoder*/ start_band = 0; hDirAC->hConfig->nbands = 5; -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, NULL, 0, 0, NULL, 1 ); -#else - ivas_dirac_config_bands( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, NULL, 0, 0, NULL ); -#endif nbands = 5; } else @@ -1306,11 +1302,7 @@ void ivas_qmetadata_to_dirac( hDirAC->hConfig->nbands = q_direction->cfg.nbands; } -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hDirAC->hConfig->enc_param_start_band, hDirAC->hFbMdft, 0 ); -#else - ivas_dirac_config_bands( hDirAC->band_grouping, hDirAC->hConfig->nbands, nbands, dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hDirAC->hConfig->enc_param_start_band, hDirAC->hFbMdft ); -#endif nbands = hDirAC->hConfig->nbands; if ( hQMetaData->q_direction[0].cfg.nblocks == 0 ) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index e9fd70202ba11b9f0310ce99a97233d3a2cf9e92..d07eacc984c68bd68b3f60873d6e22288c82caa9 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1356,14 +1356,8 @@ ivas_error ivas_init_decoder( st_ivas->hQMetaData->numTwoDirBands = (uint8_t) st_ivas->hQMetaData->q_direction[0].cfg.nbands; } - -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0, 1 ); -#else - ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), - st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); -#endif } st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); @@ -1516,13 +1510,8 @@ ivas_error ivas_init_decoder( st_ivas->hQMetaData->numTwoDirBands = (uint8_t) st_ivas->hQMetaData->q_direction[0].cfg.nbands; } -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0, 1 ); -#else - ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), - st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); -#endif } for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index fd9ae297c3f0b4386675d461abb9de207c4f040d..88b03489af644f32c7be0d2ef84a0730e841d10c 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1365,17 +1365,6 @@ ivas_error ivas_jbm_dec_render( { ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); } -#ifndef FIX_910_REMOVE_DUPLICATION_TD_REND - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - { - if ( ( error = ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) - { - return error; - } - - ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); - } -#endif } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index e0c6b5ce7cd553e8a87e7067ad9f5a30fc5fa68d..a0e747afa0b7397adb9c38f54689a0b89b5af6cb 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -65,42 +65,6 @@ ivas_error ivas_td_binaural_open( st_ivas->transport_config, st_ivas->hRenderConfig->directivity, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns ); } -#ifndef FIX_910_REMOVE_DUPLICATION_TD_REND -/*---------------------------------------------------------------------* - * ivas_td_binaural_renderer() - * - * Receives the current frames for the object streams, updates metadata - * and renders the current frame. - *---------------------------------------------------------------------*/ - -ivas_error ivas_td_binaural_renderer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float *output[], /* i/o: SCE channels / Binaural synthesis */ - const int16_t output_frame /* i : output frame length */ -) -{ - int16_t ism_md_subframe_update; - int16_t nchan_transport; - - nchan_transport = ( st_ivas->ism_mode == ISM_MASA_MODE_DISC || st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ? st_ivas->nchan_ism : st_ivas->nchan_transport; - - if ( st_ivas->hDecoderConfig->Opt_delay_comp ) - { - ism_md_subframe_update = 1; - } - else - { - ism_md_subframe_update = 2; - } - - if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) - { - ism_md_subframe_update = 2; - } - - return ivas_td_binaural_renderer_unwrap( st_ivas->hReverb, st_ivas->transport_config, st_ivas->hBinRendererTd, nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, st_ivas->hCombinedOrientationData, ism_md_subframe_update, output, output_frame, MAX_PARAM_SPATIAL_SUBFRAMES ); -} -#endif /*---------------------------------------------------------------------* * ivas_td_binaural_renderer_sf() diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index c9f5fd8dd0956e5405a209fd3049ee123d6e3251..92661092c328eb2297771790eec3a0f5d5744c46 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -227,17 +227,9 @@ void ivas_renderer_select( #endif { #ifdef DEBUGGING -#ifdef FIX_910_REMOVE_DUPLICATION_TD_REND if ( ( ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && st_ivas->mc_mode == MC_MODE_MCT && st_ivas->hDecoderConfig->force_rend != FORCE_CLDFB_RENDERER ) #else - if ( ( ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) -#endif -#else -#ifdef FIX_910_REMOVE_DUPLICATION_TD_REND if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && st_ivas->mc_mode == MC_MODE_MCT ) -#else - if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) -#endif #endif { *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 236edb3986321e8b3dbc65a31381df7d75054aad..d40ac0057dc30c2a9e034e7b63c6f5a4068ef054 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -4263,11 +4263,7 @@ static void read_stream_dct_coeffs_omasa( int16_t *index, const int16_t first_line ) { -#ifdef FIX_940_DEBUGGING_VARIABLE int16_t sign; -#else - int16_t sign, nbits; -#endif int16_t i, j, i_min; #ifndef NONBE_1319_M2R_PRECISION_ALIGN float step; @@ -4278,9 +4274,6 @@ static void read_stream_dct_coeffs_omasa( step_fx = STEP_M2T_FX; #else step = STEP_M2T; -#endif -#ifndef FIX_940_DEBUGGING_VARIABLE - nbits = 0; #endif sign = 1; if ( first_line == 0 ) @@ -4291,9 +4284,6 @@ static void read_stream_dct_coeffs_omasa( { sign = -1; } -#ifndef FIX_940_DEBUGGING_VARIABLE - nbits++; -#endif } set_s( q_idx, 0, len_stream ); @@ -4315,9 +4305,6 @@ static void read_stream_dct_coeffs_omasa( { i_min = ( i_min << 1 ) + bit_stream[( *index )--]; } -#ifndef FIX_940_DEBUGGING_VARIABLE - nbits += j; -#endif /* read GR orders */ GR1 = bit_stream[( *index )--] + 1; if ( GR1 == 2 ) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 94634c40a3b600f37d871229870beafd352fa820..2257da605ffcecb2cc018c0cecd11c5522ff9071 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -423,14 +423,8 @@ ivas_error ivas_sba_dec_reconfigure( st_ivas->hQMetaData->numTwoDirBands = (uint8_t) st_ivas->hQMetaData->q_direction[0].cfg.nbands; } - -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0, 1 ); -#else - ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), - st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); -#endif if ( st_ivas->hDirAC ) { diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index be984bb404b69fd1c4f5364c1d165342726efa28..514eb207bf79077645267dfd43fd660631f671ab 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -492,9 +492,7 @@ ivas_error ivas_spar_md_enc_process( int16_t md_indices_allocated; int16_t max_num_indices_tmp; float Wscale[IVAS_MAX_NUM_BANDS]; -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING float P_quant_re_prior[SPAR_DIRAC_SPLIT_START_BAND][FOA_CHANNELS - 1]; -#endif /*extra 16 bits for arithmetic coder as overshoot check is after a symbol is written*/ md_indices_allocated = hMdEnc->spar_md_cfg.max_bits_per_blk + IVAS_SPAR_ARITH_OVERSHOOT_BITS; @@ -591,7 +589,6 @@ ivas_error ivas_spar_md_enc_process( } } -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING if ( hEncoderConfig->ivas_total_brate < IVAS_24k4 ) { for ( b = 0; b < num_bands * bands_bw; b++ ) @@ -599,7 +596,6 @@ ivas_error ivas_spar_md_enc_process( mvr2r( hMdEnc->spar_md.band_coeffs[b].P_quant_re, P_quant_re_prior[b], FOA_CHANNELS - 1 ); } } -#endif ivas_compute_spar_params( cov_real, dm_fv_re, 0, hMdEnc->mixer_mat, 0, nB, dtx_vad, num_ch, bands_bw, active_w, active_w_vlbr, &hMdEnc->spar_md_cfg, &hMdEnc->spar_md, Wscale, 0, dyn_active_w_flag ); @@ -867,7 +863,6 @@ ivas_error ivas_spar_md_enc_process( #endif /* Reuse mixer matrix values for unsent bands */ -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING if ( hEncoderConfig->ivas_total_brate < IVAS_24k4 ) { for ( k = num_bands - 1; k >= 0; k-- ) @@ -878,7 +873,6 @@ ivas_error ivas_spar_md_enc_process( } } } -#endif if ( ( hEncoderConfig->ivas_total_brate < IVAS_24k4 ) && ( code_strat > 3 ) ) { @@ -896,10 +890,8 @@ ivas_error ivas_spar_md_enc_process( hMdEnc->mixer_mat[i][j][b + 1] = prior_mixer[i][j][b + 1]; } } -#ifdef NONBE_FIX_907_VLBR_DIRAC_BAND_MAPPING mvr2r( P_quant_re_prior[b], hMdEnc->spar_md.band_coeffs[b].P_quant_re, FOA_CHANNELS - 1 ); mvr2r( P_quant_re_prior[b + 1], hMdEnc->spar_md.band_coeffs[b + 1].P_quant_re, FOA_CHANNELS - 1 ); -#endif } } #ifdef DEBUG_LBR_SBA diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 8b1faac576b14f9745d6c52202ff719bc0b06708..2b3219ad5ba5a9e0a0b9f8fe10e31bbd5727f212 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1249,17 +1249,11 @@ ivas_error ivas_rend_openCrend( ) { int16_t i, subframe_length; -#ifdef FIX_CRASH_LONG_BRIR int32_t max_total_ir_len; -#else - int16_t max_total_ir_len; -#endif HRTFS_HANDLE hHrtf; CREND_HANDLE hCrend; ivas_error error; -#ifdef SPLIT_REND_WITH_HEAD_ROT int16_t pos_idx; -#endif error = IVAS_ERR_OK; @@ -1303,21 +1297,13 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } -#ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_re[i], max_total_ir_len ); -#else - set_zero( hCrend->freq_buffer_re[i], max_total_ir_len ); -#endif if ( ( hCrend->freq_buffer_im[i] = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } -#ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_im[i], max_total_ir_len ); -#else - set_zero( hCrend->freq_buffer_im[i], max_total_ir_len ); -#endif } for ( i = 0; i < BINAURAL_CHANNELS; i++ ) @@ -1326,11 +1312,7 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } -#ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->prev_out_buffer[i], subframe_length ); -#else - set_zero( hCrend->prev_out_buffer[i], subframe_length ); -#endif } max_total_ir_len = hHrtf->num_iterations_diffuse[0] * subframe_length; @@ -1341,21 +1323,13 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } -#ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); -#else - set_zero( hCrend->freq_buffer_re_diffuse, max_total_ir_len ); -#endif if ( ( hCrend->freq_buffer_im_diffuse = (float *) malloc( sizeof( float ) * max_total_ir_len ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } -#ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); -#else - set_zero( hCrend->freq_buffer_im_diffuse, max_total_ir_len ); -#endif } else { @@ -1370,11 +1344,7 @@ ivas_error ivas_rend_openCrend( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend" ); } -#ifdef FIX_CRASH_LONG_BRIR set_zero_l( hCrend->lfe_delay_line, max_total_ir_len ); -#else - set_zero( hCrend->lfe_delay_line, max_total_ir_len ); -#endif } else { @@ -1617,11 +1587,7 @@ static ivas_error ivas_rend_crendConvolver( int16_t i, j, k, m; int16_t subframe_length, idx_in; int16_t lfe_idx_in; -#ifdef FIX_CRASH_LONG_BRIR int32_t offset, offset_in, offset_diffuse; -#else - int16_t offset, offset_in, offset_diffuse; -#endif int16_t nchan_in, nchan_out; const float *pIn; float *pFreq_buf_re, *pFreq_buf_im; diff --git a/lib_rend/ivas_masa_merge.c b/lib_rend/ivas_masa_merge.c index 6640eb59b0e942c1266f774c90abbfbf32b09099..37ee8cc7ef5620e987c5b30f8a854a66272ade8f 100644 --- a/lib_rend/ivas_masa_merge.c +++ b/lib_rend/ivas_masa_merge.c @@ -124,19 +124,11 @@ void copy_masa_descriptive_meta( *---------------------------------------------------------------------*/ void diffuse_meta_merge_1x1( -#ifdef NONBE_FIX_869_MASA_PREREND_MERGE MASA_DECODER_EXT_OUT_META_HANDLE outMeta, /* o : Merged metadata output */ MASA_DECODER_EXT_OUT_META_HANDLE inMeta, /* i : Input metadata 1 */ float inEne[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o: TF-energy of input 1. energy after merge */ MASA_DECODER_EXT_OUT_META_HANDLE inMetaISM, /* i : Input metadata 2 */ float inEneISM[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i : TF-energy of input 2 */ -#else - MASA_DECODER_EXT_OUT_META_HANDLE outMeta, /* o : Merged metadata output */ - MASA_DECODER_EXT_OUT_META_HANDLE inMeta, /* i : Input metadata 1 */ - float inEne[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i : TF-energy of input 1 */ - MASA_DECODER_EXT_OUT_META_HANDLE inMetaISM, /* i : Input metadata 2 */ - float inEneISM[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i : TF-energy of input 2 */ -#endif ) { int8_t sf, band; @@ -284,7 +276,6 @@ void full_stream_merge( *---------------------------------------------------------------------*/ void ivas_prerend_merge_masa_metadata( -#ifdef NONBE_FIX_869_MASA_PREREND_MERGE MASA_DECODER_EXT_OUT_META_HANDLE outMeta, /* o : Merged metadata output */ MASA_DECODER_EXT_OUT_META_HANDLE inMeta1, /* i : Input metadata 1 */ IVAS_REND_AudioConfigType inType1, /* i : Type of input 1 */ @@ -292,22 +283,12 @@ void ivas_prerend_merge_masa_metadata( MASA_DECODER_EXT_OUT_META_HANDLE inMeta2, /* i : Input metadata 2 */ IVAS_REND_AudioConfigType inType2, /* i : Type of input 2 */ float inEne2[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i : TF-energy of input 2. may be altered */ -#else - MASA_DECODER_EXT_OUT_META_HANDLE outMeta, /* o : Merged metadata output */ - MASA_DECODER_EXT_OUT_META_HANDLE inMeta1, /* i : Input metadata 1 */ - IVAS_REND_AudioConfigType inType1, /* i : Type of input 1 */ - float inEne1[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o: TF-energy of input 1. after merge, contains the energy of the merged signal */ - MASA_DECODER_EXT_OUT_META_HANDLE inMeta2, /* i : Input metadata 2 */ - IVAS_REND_AudioConfigType inType2, /* i : Type of input 2 */ - float inEne2[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i : TF-energy of input 2 */ -#endif ) { /* mixing ISMs with non-ISM use different merge */ if ( inType1 == IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED && inType2 != IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED && ( inMeta1->descriptiveMeta.numberOfDirections == 0u && inMeta2->descriptiveMeta.numberOfDirections == 0u ) ) { /* meta_1 is ISM and both are 1dir */ -#ifdef NONBE_FIX_869_MASA_PREREND_MERGE int8_t sf; diffuse_meta_merge_1x1( outMeta, inMeta2, inEne2, inMeta1, inEne1 ); /* post-merge energy is now in inEne2 and needs to be copied to inEne1 */ @@ -316,9 +297,6 @@ void ivas_prerend_merge_masa_metadata( { mvr2r( inEne2[sf], inEne1[sf], MASA_FREQUENCY_BANDS ); } -#else - diffuse_meta_merge_1x1( outMeta, inMeta2, inEne2, inMeta1, inEne1 ); -#endif } else if ( inType2 == IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED && inType1 != IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED && ( inMeta1->descriptiveMeta.numberOfDirections == 0u && inMeta2->descriptiveMeta.numberOfDirections == 0u ) ) {