diff --git a/apps/renderer.c b/apps/renderer.c index 740680bb22cde65a19981c13c9ceb13d7d0e0457..69c01c28c66cd790deae2bc3aa0875eaf9c9a28c 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1235,15 +1235,11 @@ int main( masaIds[i] = 0u; } -#ifdef FIX_1377_HANDLE_ERROR_CODE if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) ); goto cleanup; } -#else - IVAS_REND_SetObjectIDs( hIvasRend ); -#endif for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) { @@ -2617,14 +2613,10 @@ static CmdlnArgs defaultArgs( args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; args.outConfig.outSetupCustom.num_spk = 0; args.outConfig.outSetupCustom.num_lfe = 0; -#ifdef FIX_HRTF_LEFTOVERS for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i ) { args.inConfig.ambisonicsBuses[i].audioConfig = IVAS_AUDIO_CONFIG_INVALID; } -#else - args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID; -#endif for ( i = 0; i < RENDERER_MAX_ISM_INPUTS + RENDERER_MAX_MASA_INPUTS; ++i ) { diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index ff0e1972fed39ed84c13a810d60d1d9d415e876c..6f679f0fd81f19ec85247e6db1be3016a9e45727 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -229,9 +229,7 @@ typedef enum /* format signaling in SID frames */ #define SID_FORMAT_NBITS 3 /* Bit 0 | Bit 1 | Bit 2 */ /*-------|-------|------ */ -#ifdef FIX_1384_MSAN_ivas_spar_dec_open #define SID_FORMAT_NONE (-0x1) /* n/a| n/a| n/a*/ -#endif #define SID_DFT_STEREO 0x0 /* 0| 0| 0 */ #define SID_MDCT_STEREO 0x1 /* 1| 0| 0 */ #define SID_ISM 0x2 /* 0| 1| 0 */ diff --git a/lib_com/options.h b/lib_com/options.h index 682494ad64b4cd50e15f0382b960e89ceed17064..6d394089cd1363bd8b44f7f310073adbf256963d 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,15 +168,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add split rendering support to decoder in VoIP mode */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ -#define FIX_1377_HANDLE_ERROR_CODE /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */ -#define FIX_HRTF_LEFTOVERS /* VA: HRTF updates - bring float main in line with BASOP main */ -#define FIX_1384_MSAN_ivas_spar_dec_open /* VA: issue 1386: fix use-of-uninitialized value in ivas_spar_dec_open() */ -#define FIX_1384_MSAN_stereo_tcx_core_enc /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */ -#define FIX_1388_MSAN_ivas_init_decoder /* VA: issue 1388: fix use-of-uninitialized value in ivas_init_decoder() */ -#define FIX_1383_HEAD_TRACK_SANITIZER /* Nok: issue 1383: Fix head tracking struc values reading in renderer */ -#define FIX_1385_INIT_IGF_STOP_FREQ /* FhG: Initialize infoIGFStopFreq in init_igf_dec() */ -#define FIX_1387_INIT_PRM_SQQ /* FhG: initialize pointer prm_sqQ, which might be uninitialized in case of bfi == 1 */ -#define FIX_1349_TNS_CRASH /* FhG: Fix crash in TNS entropy coding, in case order of joint TNS coding is reduced to 0 */ /* #################### End BE switches ################################## */ @@ -188,8 +179,6 @@ #define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define NONBE_1328_FIX_NON_LINEARITY /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0 */ -#define NONBE_1344_REND_MASA_LOW_FS /* Nokia: Issue 1344: Fix sanitizer errors when using IVAS_rend to render MASA with lower sampling rates */ #define NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES /* Nokia: Fix for issues 1399: obj edit broken with MC/SBA output in VOIP, and 1400: negative energy estimate used for gaining. */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_com/prot.h b/lib_com/prot.h index efb77f0a3f8067eae9f448e8a7c78e2ec5782e92..5f7ab86cf1b7c7ee447c853e104672c520dff706 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -2645,18 +2645,15 @@ void flip_and_downmix_generic( ); void non_linearity( - const float input[], /* i : input signal */ - float output[], /* i : output signal */ - float old_bwe_exc_extended[], /* i/o: memory bugffer */ - const int16_t length, /* i : input length */ - float *prev_scale, /* i/o: memory */ - const int16_t coder_type, /* i : Coder Type */ - const float *voice_factors, /* i : Voice Factors */ - const int16_t L_frame /* i : ACELP frame length */ -#ifdef NONBE_1328_FIX_NON_LINEARITY - , - const int16_t element_mode /* i : element_mode to differentiate EVS and IVAS */ -#endif + const float input[], /* i : input signal */ + float output[], /* i : output signal */ + float old_bwe_exc_extended[], /* i/o: memory bugffer */ + const int16_t length, /* i : input length */ + float *prev_scale, /* i/o: memory */ + const int16_t coder_type, /* i : Coder Type */ + const float *voice_factors, /* i : Voice Factors */ + const int16_t L_frame, /* i : ACELP frame length */ + const int16_t element_mode /* i : element_mode to differentiate EVS and IVAS*/ ); void interp_code_5over2( diff --git a/lib_com/swb_tbe_com.c b/lib_com/swb_tbe_com.c index ed06e57636c1bb4fa0f19df5422c1125585b5edb..2104e5cdee89af298c6c2a8d9df5c9fd39feda0e 100644 --- a/lib_com/swb_tbe_com.c +++ b/lib_com/swb_tbe_com.c @@ -1345,18 +1345,15 @@ void ScaleShapedSHB( * -------------------------------------------------------------------*/ void non_linearity( - const float input[], /* i : input signal */ - float output[], /* o : output signal */ - float old_bwe_exc_extended[], /* i/o: memory bugffer */ - const int16_t length, /* i : input length */ - float *prev_scale, /* i/o: memory */ - const int16_t coder_type, /* i : Coder Type */ - const float *voice_factors, /* i : Voice Factors */ - const int16_t L_frame /* i : ACELP frame length */ -#ifdef NONBE_1328_FIX_NON_LINEARITY - , - const int16_t element_mode /* i : element_mode to differentiate EVS and IVAS */ -#endif + const float input[], /* i : input signal */ + float output[], /* o : output signal */ + float old_bwe_exc_extended[], /* i/o: memory bugffer */ + const int16_t length, /* i : input length */ + float *prev_scale, /* i/o: memory */ + const int16_t coder_type, /* i : Coder Type */ + const float *voice_factors, /* i : Voice Factors */ + const int16_t L_frame, /* i : ACELP frame length */ + const int16_t element_mode /* i : element_mode to differentiate EVS and IVAS*/ ) { int16_t i, j; @@ -1369,17 +1366,16 @@ void non_linearity( int16_t en_abs = 0; float v_fac = 0, ths; int16_t nframes; -#ifdef NONBE_1328_FIX_NON_LINEARITY float sc_factor; -#endif + if ( L_frame == L_FRAME16k ) { - nframes = 5; + nframes = NB_SUBFR16k; ths = 0.87f; } else { - nframes = 4; + nframes = NB_SUBFR; ths = 0.94f; } @@ -1416,17 +1412,14 @@ void non_linearity( scale = 0.67f; } -#ifdef NONBE_1328_FIX_NON_LINEARITY sc_factor = 1024.0f; if ( element_mode > EVS_MONO ) { sc_factor = (float) ( 1 << max( 13 - norm_s( j + 1 ), 0 ) ); /* Adapt the scaling factor allowed depending of max position */ sc_factor = max( sc_factor, 2.0f ); } + if ( *prev_scale <= 0.0 || *prev_scale > sc_factor * scale ) -#else - if ( *prev_scale <= 0.0 || *prev_scale > 1024.0f * scale ) -#endif { scale_step = 1.0; *prev_scale = scale; @@ -1483,17 +1476,14 @@ void non_linearity( scale = 0.67f; } -#ifdef NONBE_1328_FIX_NON_LINEARITY sc_factor = 1024.0f; if ( element_mode > EVS_MONO ) { sc_factor = (float) ( 1 << max( 12 - norm_s( j - length / 2 + 1 ), 0 ) ); /* allowed intra frame jump is smaller */ sc_factor = max( sc_factor, 2.0f ); } + if ( *prev_scale <= 0.0 || *prev_scale > sc_factor * scale ) -#else - if ( *prev_scale <= 0.0 || *prev_scale > 1024.0f * scale ) -#endif { scale_step = 1.0; *prev_scale = scale; diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index d488d4479efb0225490c17226df1ef6c3e79afa9..8824a6f840dacbcf36a95e2a5cb73d668bfa7c14 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -1414,12 +1414,7 @@ ivas_error acelp_core_dec( if ( !st->ppp_mode_dec && ( st->idchan == 0 || st->element_mode != IVAS_CPE_TD || ( st->idchan == 1 && st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) ) ) { - non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame -#ifdef NONBE_1328_FIX_NON_LINEARITY - , - st->element_mode -#endif - ); + non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame, st->element_mode ); } if ( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) diff --git a/lib_dec/dec_acelp_tcx_main.c b/lib_dec/dec_acelp_tcx_main.c index a591157e44e72a87adab547256f7e80b5326acca..95a3f3275b0e403918159b7d4e6a8a33f3f1214b 100644 --- a/lib_dec/dec_acelp_tcx_main.c +++ b/lib_dec/dec_acelp_tcx_main.c @@ -425,12 +425,7 @@ void dec_acelp_tcx_frame( if ( st->core == ACELP_CORE && st->igf && st->con_tcx == 0 ) { - non_linearity( ptr_bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame -#ifdef NONBE_1328_FIX_NON_LINEARITY - , - st->element_mode -#endif - ); + non_linearity( ptr_bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame, st->element_mode ); /* update the old BWE exe memory */ mvr2r( &old_bwe_exc[L_FRAME32k], st->hBWE_TD->old_bwe_exc, PIT16k_MAX * 2 ); diff --git a/lib_dec/igf_dec.c b/lib_dec/igf_dec.c index ba7c4993fd1f8722f8a81aa6ca62afbc61958b53..8f91c43fb2282956044fa51d42850d9407e7a44f 100755 --- a/lib_dec/igf_dec.c +++ b/lib_dec/igf_dec.c @@ -1573,6 +1573,7 @@ void IGFDecRestoreTCX10SubFrameData( return; } + /*-----------------------------------------------------------------------* * init_igf_dec() * @@ -1592,9 +1593,7 @@ void init_igf_dec( hIGFDec->flag_sparse = &hIGFDec->flag_sparseBuf[0]; hIGFDec->infoTCXNoise = &hIGFDec->infoTCXNoiseBuf[0]; hIGFDec->virtualSpec = &hIGFDec->virtualSpecBuf[0]; -#ifdef FIX_1385_INIT_IGF_STOP_FREQ hIGFDec->infoIGFStopFreq = 0; -#endif return; } diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 31297ed45c82cfc8ee0cf0bee62c71754397b30a..f83de6eb2e85e176456c5e2c6a788be3e3091e6b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1154,9 +1154,7 @@ ivas_error ivas_init_decoder_front( st_ivas->ism_mode = ISM_MODE_NONE; st_ivas->mc_mode = MC_MODE_NONE; -#ifdef FIX_1384_MSAN_ivas_spar_dec_open st_ivas->sid_format = SID_FORMAT_NONE; -#endif st_ivas->sba_dirac_stereo_flag = 0; /* HRTF binauralization latency in ns */ diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index eef4b37bf8b0440b416beaba0f1da004587b59a4..9cf401aba420831ffb4701c627136ca1345cb345 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -532,9 +532,7 @@ void ivas_mdct_core_invQ( set_s( total_nbbits, 0, CPE_CHANNELS ); set_s( bitsRead, 0, CPE_CHANNELS ); tmp_concealment_method = 0; -#ifdef FIX_1387_INIT_PRM_SQQ prm_sqQ = NULL; /* set prm_sqQ to NULL - in case of bfi == 1 it's not set or needed, but it triggers sanitizers */ -#endif for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index b7e5c11f95406c11e8105194f6be867c69f90250..634ac0f6d7d77e7991bddddb74137efdbdf8ec26 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -288,18 +288,7 @@ void stereo_tcx_core_dec( { int16_t tcx_lpc_cdk; -#ifdef FIX_1384_MSAN_stereo_tcx_core_enc tcx_lpc_cdk = tcxlpc_get_cdk( st->coder_type ); -#else - if ( bfi && st->use_partial_copy && st->rf_frame_type == RF_TCXFD ) - { - tcx_lpc_cdk = tcxlpc_get_cdk( GENERIC ); - } - else - { - tcx_lpc_cdk = tcxlpc_get_cdk( st->coder_type ); - } -#endif mvr2r( st->lsf_old, &lsf[0], M ); mvr2r( st->lsp_old, &lsp[0], M ); @@ -398,13 +387,6 @@ void stereo_tcx_core_dec( lsp2a_stab( st->lsp_old, st->old_Aq_12_8, M ); } -#ifndef FIX_1384_MSAN_stereo_tcx_core_enc - if ( st->enablePlcWaveadjust && bfi ) - { - st->hPlcInfo->nbLostCmpt++; - } -#endif - /*--------------------------------------------------------------------------------* * TD-TCX concealment *--------------------------------------------------------------------------------*/ @@ -538,26 +520,6 @@ void stereo_tcx_core_dec( if ( st->core == TCX_10_CORE || st->core == TCX_20_CORE ) { -#ifndef FIX_1384_MSAN_stereo_tcx_core_enc - if ( st->enablePlcWaveadjust || /* bfi */ - ( st->last_total_brate >= HQ_48k && /* recovery */ - st->last_codec_mode == MODE2 ) ) - { - /* waveform adjustment */ - concealment_signal_tuning( st, bfi, synthFB, st->last_core_bfi ); - - if ( ( bfi || st->prev_bfi ) && st->hPlcInfo->Pitch && st->hPlcInfo->concealment_method == TCX_NONTONAL ) - { - lerp( synthFB, synth, st->L_frame, hTcxDec->L_frameTCX ); - - if ( !bfi && st->prev_bfi ) - { - st->hPlcInfo->Pitch = 0; - } - } - } -#endif - if ( !bfi && st->hTonalMDCTConc != NULL ) { TonalMDCTConceal_SaveTimeSignal( st->hTonalMDCTConc, synthFB, hTcxDec->L_frameTCX ); @@ -681,13 +643,6 @@ void stereo_tcx_core_dec( if ( !bfi ) { -#ifndef FIX_1384_MSAN_stereo_tcx_core_enc - if ( st->enablePlcWaveadjust ) - { - st->hPlcInfo->nbLostCmpt = 0; - } -#endif - if ( param[1 + NOISE_FILL_RANGES] != 0 ) { set_f( pitch_buf, hTcxLtpDec->tcxltp_pitch_int + (float) hTcxLtpDec->tcxltp_pitch_fr / (float) st->pit_res_max, NB_SUBFR16k ); @@ -844,11 +799,7 @@ static void dec_prm_tcx( getTCXMode( st, st, 0 /* <- MCT_flag */ ); /* last_core for error concealment */ -#ifdef FIX_1384_MSAN_stereo_tcx_core_enc if ( st->element_mode != IVAS_CPE_MDCT ) -#else - if ( !st->use_partial_copy && st->element_mode != IVAS_CPE_MDCT ) -#endif { st->last_core_from_bs = get_next_indice( st, 1 ); /* Store decoder memory of last_core */ if ( st->last_core == ACELP_CORE && st->last_core_from_bs != ACELP_CORE ) @@ -874,23 +825,16 @@ static void dec_prm_tcx( } } -#ifndef FIX_1384_MSAN_stereo_tcx_core_enc - if ( !st->use_partial_copy ) + if ( st->element_mode != IVAS_CPE_MDCT ) { -#endif - if ( st->element_mode != IVAS_CPE_MDCT ) - { - getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st ); - } - st->flagGuidedAcelp = 0; + getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st ); + } + st->flagGuidedAcelp = 0; - if ( st->dec_glr ) - { - st->dec_glr_idx = -1; - } -#ifndef FIX_1384_MSAN_stereo_tcx_core_enc + if ( st->dec_glr ) + { + st->dec_glr_idx = -1; } -#endif #ifdef DEBUG_MODE_TCX fprintf( pF, "\t TCX Header: %d bits: %d %d %d %d\n", st->next_bit_pos - start_bit_pos, st->tcxonly, st->core, st->tcxonly ? st->clas_dec : st->hTcxCfg->coder_type, st->hTcxCfg->tcx_curr_overlap_mode ); nbits_tcx = st->next_bit_pos; @@ -912,7 +856,6 @@ static void dec_prm_tcx( * TCX20/10 parameters *--------------------------------------------------------------------------------*/ -#ifdef FIX_1384_MSAN_stereo_tcx_core_enc getTCXparam( st, st, hm_cfg, param, bits_common, start_bit_pos, NULL, NULL, NULL, -1 ); if ( *total_nbbits - bitsRead[0] < ( st->next_bit_pos - start_bit_pos ) ) @@ -922,27 +865,11 @@ static void dec_prm_tcx( } bitsRead[0] = st->next_bit_pos - start_bit_pos; -#else - if ( st->use_partial_copy == 0 ) - { - getTCXparam( st, st, hm_cfg, param, bits_common, start_bit_pos, NULL, NULL, NULL, -1 ); - } - - if ( !st->use_partial_copy ) - { - if ( *total_nbbits - bitsRead[0] < ( st->next_bit_pos - start_bit_pos ) ) - { - st->BER_detect = 1; - st->next_bit_pos = start_bit_pos + *total_nbbits - bitsRead[0]; - } - - bitsRead[0] = st->next_bit_pos - start_bit_pos; - } -#endif return; } + /*-----------------------------------------------------------------* * Function stereo_tcx_dec_mode_switch_reconf() * diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 4f6c1f75abf92c556d7095b958fae02551529364..fc63961eda08cc6e81624ab2d2bb6d13171749ad 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -863,23 +863,19 @@ ivas_error IVAS_DEC_FeedFrame_Serial( { ivas_error error; -#ifdef FIX_1388_MSAN_ivas_init_decoder if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -#endif if ( !hIvasDec->isInitialized ) { /* Once first frame is fed, finish initialization in EVS Mono. * In IVAS mode, initialization is done in ivas_dec(). */ if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { -#ifdef FIX_1388_MSAN_ivas_init_decoder hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; -#endif if ( ( error = ivas_init_decoder( hIvasDec->st_ivas ) ) != IVAS_ERR_OK ) { return error; @@ -892,12 +888,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial( st->prev_use_partial_copy = 0; hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = hIvasDec->hVoIP->hCurrentDataUnit->dataSize * FRAMES_PER_SEC; } -#ifndef FIX_1388_MSAN_ivas_init_decoder - else - { - hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; - } -#endif + hIvasDec->isInitialized = true; } } diff --git a/lib_enc/acelp_core_enc.c b/lib_enc/acelp_core_enc.c index 33bef3e67a26bc212898ab133ba1c5a5ad420f4a..ccc96242b19b326a4b65592e24c62e04118e7cb0 100644 --- a/lib_enc/acelp_core_enc.c +++ b/lib_enc/acelp_core_enc.c @@ -695,12 +695,7 @@ ivas_error acelp_core_enc( if ( !st->Opt_SC_VBR && ( st->idchan == 0 || st->element_mode != IVAS_CPE_TD || ( st->idchan == 1 && st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) ) ) { /* Apply a non linearity to the SHB excitation */ - non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame -#ifdef NONBE_1328_FIX_NON_LINEARITY - , - st->element_mode -#endif - ); + non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame, st->element_mode ); } if ( st->core_brate == SID_2k40 || st->core_brate == FRAME_NO_DATA ) diff --git a/lib_enc/cod_tcx.c b/lib_enc/cod_tcx.c index 9a890ae3c9f4deb10580190b4f37b9ebbc844971..87e703d16051d917003691d7ea6f89b87164f69b 100644 --- a/lib_enc/cod_tcx.c +++ b/lib_enc/cod_tcx.c @@ -332,7 +332,6 @@ void TNSAnalysisStereo( pFilter[0]->order = pFilter[1]->order = maxOrder; } -#ifdef FIX_1349_TNS_CRASH else { pFilter[0]->filterType = TNS_FILTER_OFF; @@ -340,7 +339,6 @@ void TNSAnalysisStereo( sts[0]->hTcxEnc->tnsData[k].nFilters = 0; sts[1]->hTcxEnc->tnsData[k].nFilters = 0; } -#endif } } } diff --git a/lib_enc/enc_acelp_tcx_main.c b/lib_enc/enc_acelp_tcx_main.c index 8851d9be5e0c358e9470583a923ad7836d14c09b..f2dc342a0e0f2854faa2c579cb2aee3b7704a682 100644 --- a/lib_enc/enc_acelp_tcx_main.c +++ b/lib_enc/enc_acelp_tcx_main.c @@ -99,12 +99,7 @@ void enc_acelp_tcx_main( /* Apply non linearity to the SHB excitation */ if ( st->core == ACELP_CORE && st->igf ) { - non_linearity( ptr_bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame -#ifdef NONBE_1328_FIX_NON_LINEARITY - , - st->element_mode -#endif - ); + non_linearity( ptr_bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame, st->element_mode ); /* update the old_BWE_exc memory */ mvr2r( &old_bwe_exc[L_FRAME32k], st->hBWE_TD->old_bwe_exc, PIT16k_MAX * 2 ); diff --git a/lib_enc/ivas_tcx_core_enc.c b/lib_enc/ivas_tcx_core_enc.c index a2f96032d090dc4cbaaf847febeb2ea9ceef949d..60a79ea77175adc78bb7826d2e48ca883156209c 100644 --- a/lib_enc/ivas_tcx_core_enc.c +++ b/lib_enc/ivas_tcx_core_enc.c @@ -336,9 +336,7 @@ void stereo_tcx_core_enc( } } -#ifdef FIX_1384_MSAN_stereo_tcx_core_enc st->acelp_cfg.midLpc = 0; -#endif last_core_orig = st->last_core; for ( n = 0; n < n_subframes; n++ ) { diff --git a/lib_rend/ivas_dirac_ana.c b/lib_rend/ivas_dirac_ana.c index 973182504a5cca5f4ab1d3949a9d124f22567756..73c2db15c66c5e3f8ea51c99a22a9844e2cd0381 100644 --- a/lib_rend/ivas_dirac_ana.c +++ b/lib_rend/ivas_dirac_ana.c @@ -231,17 +231,14 @@ void ivas_dirac_ana( float spreadCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS]; float surroundingCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS]; - /* Estimate MASA parameters from the SBA signals */ ivas_dirac_param_est_ana( hDirAC, data_in_f, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence, input_frame ); -#ifdef NONBE_1344_REND_MASA_LOW_FS /* Add zeros to higher bands in case of lower sampling rates */ if ( hDirAC->nbands < MASA_FREQUENCY_BANDS ) { ivas_masa_zero_high_bands( hDirAC->nbands, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence ); } -#endif /* Create MASA metadata buffer from the estimated values */ ivas_create_masa_out_meta( hDirAC->hMasaOut, hDirAC->sph_grid16, nchan_transport, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence ); diff --git a/lib_rend/ivas_masa_merge.c b/lib_rend/ivas_masa_merge.c index 997cdc84d156e3f5efa171a446baf87e2bc75f7f..4432133cd4206f10ba9d42cafe73ded976b474b3 100644 --- a/lib_rend/ivas_masa_merge.c +++ b/lib_rend/ivas_masa_merge.c @@ -37,9 +37,7 @@ #include "ivas_prot.h" #include "ivas_cnst.h" #include "prot.h" -#ifdef NONBE_1344_REND_MASA_LOW_FS #include "ivas_rom_com.h" -#endif #include "wmc_auto.h" @@ -329,9 +327,7 @@ ivas_error masaPrerendOpen( { MASA_PREREND_HANDLE hMasaPrerend; int16_t i; -#ifdef NONBE_1344_REND_MASA_LOW_FS int16_t maxBin; -#endif ivas_error error; error = IVAS_ERR_OK; @@ -342,7 +338,6 @@ ivas_error masaPrerendOpen( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MASA prerenderer\n" ) ); } -#ifdef NONBE_1344_REND_MASA_LOW_FS /* Determine the number of bands and band grouping */ hMasaPrerend->nbands = MASA_FREQUENCY_BANDS; mvs2s( MASA_band_grouping_24, hMasaPrerend->band_grouping, MASA_FREQUENCY_BANDS + 1 ); @@ -357,7 +352,6 @@ ivas_error masaPrerendOpen( break; } } -#endif hMasaPrerend->num_Cldfb_instances = numTransports; for ( i = 0; i < hMasaPrerend->num_Cldfb_instances; i++ ) diff --git a/lib_rend/ivas_mcmasa_ana.c b/lib_rend/ivas_mcmasa_ana.c index 2f67607e9457a4ee100cceed1d482183c5fd0479..1ed545b4fe13a2493b9341ad3a358fc6ed11a27d 100644 --- a/lib_rend/ivas_mcmasa_ana.c +++ b/lib_rend/ivas_mcmasa_ana.c @@ -393,13 +393,11 @@ void ivas_mcmasa_ana( /* Analysis */ ivas_mcmasa_param_est_ana( hMcMasa, data_f, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence, input_frame, nchan_inp ); -#ifdef NONBE_1344_REND_MASA_LOW_FS /* Add zeros to higher bands in case of lower sampling rates */ if ( hMcMasa->nbands < MASA_FREQUENCY_BANDS ) { ivas_masa_zero_high_bands( hMcMasa->nbands, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence ); } -#endif /* Create MASA metadata buffer from the estimated values */ ivas_create_masa_out_meta( hMcMasa->hMasaOut, hMcMasa->sph_grid16, nchan_transport, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence ); @@ -1141,7 +1139,6 @@ void ivas_create_masa_out_meta( } -#ifdef NONBE_1344_REND_MASA_LOW_FS /*------------------------------------------------------------------------- * ivas_masa_zero_high_bands() * @@ -1173,4 +1170,3 @@ void ivas_masa_zero_high_bands( return; } -#endif diff --git a/lib_rend/ivas_omasa_ana.c b/lib_rend/ivas_omasa_ana.c index 566099d5b7ee1eb3f4f555aa5eb1ed3e0d91ad3a..d43c24f63b4cc17b1af58d6a2ffe9b22bb378c1a 100644 --- a/lib_rend/ivas_omasa_ana.c +++ b/lib_rend/ivas_omasa_ana.c @@ -261,13 +261,11 @@ void ivas_omasa_ana( /* Estimate MASA parameters from the objects */ ivas_omasa_param_est_ana( hOMasa, data_in_f, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence, input_frame, nchan_ism ); -#ifdef NONBE_1344_REND_MASA_LOW_FS /* Add zeros to higher bands in case of lower sampling rates */ if ( hOMasa->nbands < MASA_FREQUENCY_BANDS ) { ivas_masa_zero_high_bands( hOMasa->nbands, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence ); } -#endif /* Create MASA metadata buffer from the estimated values */ ivas_create_masa_out_meta( hOMasa->hMasaOut, hOMasa->sph_grid16, nchan_transport, elevation_m_values, azimuth_m_values, energyRatio, spreadCoherence, surroundingCoherence ); diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index cca2f34dc687444fd290d302ee4f3446b73b9c87..ae80304ee04ae85ea7bf3e40026aa3718a8004a0 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1476,16 +1476,14 @@ void ivas_create_masa_out_meta( float surroundingCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i : Estimated surround coherence */ ); -#ifdef NONBE_1344_REND_MASA_LOW_FS void ivas_masa_zero_high_bands( - const int16_t nbands, /* i : Number of frequency bands with estimated values */ - float elevation_m_values[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o : Estimated elevation */ - float azimuth_m_values[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o : Estimated azimuth */ - float energyRatio[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o : Estimated direct-to-total ratio */ - float spreadCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o : Estimated spread coherence */ - float surroundingCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i/o : Estimated surround coherence */ + const int16_t nbands, /* i : Number of frequency bands with estimated values */ + float elevation_m_values[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o: Estimated elevation */ + float azimuth_m_values[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o: Estimated azimuth */ + float energyRatio[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o: Estimated direct-to-total ratio */ + float spreadCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i/o: Estimated spread coherence */ + float surroundingCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i/o: Estimated surround coherence */ ); -#endif ivas_error ivas_dirac_ana_open( DIRAC_ANA_HANDLE *hDirACPtr, /* i/o: DIRAC data handle pointer */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index ad42bd515eb13c61b99d64bf782991e1003c1318..b9286d3d96b01ae9bddcb24319badb17319c024c 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -898,20 +898,10 @@ ivas_error combine_external_and_head_orientations_rend( int16_t i; sr_pose_pred_axis = DEFAULT_AXIS; -#ifdef FIX_1383_HEAD_TRACK_SANITIZER if ( hHeadTrackData->headRotEnabled ) { headRotQuaternions = hHeadTrackData->headPositions; listenerPos = hHeadTrackData->Pos; -#else - if ( hHeadTrackData != NULL ) - { - if ( hHeadTrackData->headRotEnabled ) - { - headRotQuaternions = hHeadTrackData->headPositions; - listenerPos = hHeadTrackData->Pos; - } -#endif sr_pose_pred_axis = hHeadTrackData->sr_pose_pred_axis; } else if ( hExtOrientationData != NULL ) diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index c575a9a60a5da146f9e53d272b0a3959e59e0a06..891f9013e5d6ae0e17cfbbcc37a99e3600acd951 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -1527,10 +1527,8 @@ typedef struct ivas_dirac_ana_data_structure typedef struct ivas_masa_prerend_data_structure { -#ifdef NONBE_1344_REND_MASA_LOW_FS int16_t nbands; int16_t band_grouping[MASA_FREQUENCY_BANDS + 1]; -#endif /* CLDFB analysis */ int16_t num_Cldfb_instances; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 1904c0a62469ccfbdadc8e8fb72f0cc9bb9834f9..bba3fbb187b09ae7a0bb1502506c125efbb00b99 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -7312,19 +7312,11 @@ static void renderMasaToMasa( } /* Compute channel energy for metadata processing */ -#ifdef NONBE_1344_REND_MASA_LOW_FS for ( band_m_idx = 0; band_m_idx < masaInput->hMasaPrerend->nbands; band_m_idx++ ) -#else - for ( band_m_idx = 0; band_m_idx < MASA_FREQUENCY_BANDS; band_m_idx++ ) -#endif { -#ifdef NONBE_1344_REND_MASA_LOW_FS brange[0] = masaInput->hMasaPrerend->band_grouping[band_m_idx]; brange[1] = masaInput->hMasaPrerend->band_grouping[band_m_idx + 1]; -#else - brange[0] = MASA_band_grouping_24[band_m_idx]; - brange[1] = MASA_band_grouping_24[band_m_idx + 1]; -#endif + for ( j = brange[0]; j < brange[1]; j++ ) { for ( i = 0; i < numAnalysisChannels; i++ ) diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 0affb9401c7505ecb162837c60979a18e3e5fb0f..164120d79dba7e7b422967b01a79a287bf68572c 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -816,11 +816,7 @@ static ivas_error load_reverb_from_binary( hHrtfStatistics->average_energy_r_dyn = (float *) malloc( lr_iac_len * sizeof( float ) ); hHrtfStatistics->inter_aural_coherence_dyn = (float *) malloc( lr_iac_len * sizeof( float ) ); -#ifdef FIX_HRTF_LEFTOVERS if ( hHrtfStatistics->average_energy_l_dyn == NULL || hHrtfStatistics->average_energy_r_dyn == NULL || hHrtfStatistics->inter_aural_coherence_dyn == NULL ) -#else - if ( hHrtfStatistics->average_energy_l_dyn == NULL || hHrtfStatistics->average_energy_l_dyn == NULL || hHrtfStatistics->inter_aural_coherence_dyn == NULL ) -#endif { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); }