diff --git a/apps/encoder.c b/apps/encoder.c index 9bf625bc972c3e94cff543cfe01b5b47f93ec185..61bb8ebb3f0d24c4835755b0b69ced48636add72 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -15,6 +15,7 @@ the software. This notice grants no license of any kind, including but not limited to patent license, nor is any license granted by implication, estoppel or otherwise. + Contributors are required to enter into the IVAS codec Public Collaboration agreement before making Contributors are required to enter into the IVAS codec Public Collaboration agreement before making contributions. diff --git a/apps/renderer.c b/apps/renderer.c index 5242242f7f9ca8a7c2003617524225f2f12e59c9..f43fde32d2d5729e544f9aa8e4d116b805f875de 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1081,18 +1081,19 @@ int main( fprintf( stderr, "\nFailed to read renderer configuration from file %s\n", args.renderConfigFilePath ); goto cleanup; } -#ifdef NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND + if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, args.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", args.directivityPatternId[0], args.directivityPatternId[1], args.directivityPatternId[2], args.directivityPatternId[3] ); goto cleanup; } + if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get Distance Attenuation \n\n" ); goto cleanup; } -#endif + if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { aeID = args.aeSequence.count > 0 ? args.aeSequence.pID[0] : 65535; diff --git a/lib_com/options.h b/lib_com/options.h index 3c9467e8ac18521ea5d4e8f36196240860eda83f..88467e1090cf93d6886bd480052954bbb9608967 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -58,7 +58,7 @@ #ifdef DEBUGGING /*#define DBG_BITSTREAM_ANALYSIS*/ /* Write bitstream with annotations to a text file */ -/*#define DEBUG_MODE_INFO*/ /* output most important parameters to the subdirectory "res/" */ +/*#define DEBUG_MODE_INFO*/ /* output most important parameters to the subdirectory "res/" */ #ifdef DEBUG_MODE_INFO /*#define DEBUG_MODE_ACELP*/ /* output most important ACELP core parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_TCX*/ /* output most important TCX core parameters to the subdirectory "res/" */ @@ -162,8 +162,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ -#define FIX_938_COMPILER_WARNING /* FhG: Fix compiler warning in ivas_mdct_core_reconstruct() */ -#define FIX_1288_SPLIT_REND_XSAN /* Dlb: Fix asan, msan and usan issues in split rendering mode*/ /* #################### End BE switches ################################## */ @@ -174,8 +172,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_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */ -#define NONBE_1329_FIX_OSBA_CRASH /* FhG: issue 1329: prevent assert when bit budget is low*/ #define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */ #define NONBE_1339_FIXOSBA_EXT_LOUDNESS /* FhG: issue 1339: apply scaling with EXT output in OSBA high-BR mode */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index b3d7e62e92ee9d4b83d952e7104dd93781eb9b02..a303c6d65b0f55de9ebaeb761d3b060081f6b8c0 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2782,11 +2782,8 @@ void ivas_destroy_dec( ivas_dirac_dec_close_binaural_data( st_ivas->hDiracDecBin ); /* Crend handle */ -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ), ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ); -#else ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); -#endif + /* Reverb handle */ ivas_reverb_close( &st_ivas->hReverb ); diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index e18a28281aa698abdf84223e948fd541ac72a5f6..a76db363061b54ef55b49b11622d8385fc4c75b6 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -253,11 +253,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( } /* close the crend binaural renderer */ -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ), ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ); -#else ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); -#endif } } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index e15b9c437f6dae18e7840aa70a57ceaeca9ccb85..8fb966c36518fb51edbce486791ec79dd5ba17b3 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1161,6 +1161,7 @@ static ivas_error ivas_mc_dec_reconfig( if ( st_ivas->hBinRenderer != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) ) { ivas_binRenderer_close( &st_ivas->hBinRenderer ); + if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) { efap_free_data( &st_ivas->hEFAPdata ); @@ -1169,11 +1170,7 @@ static ivas_error ivas_mc_dec_reconfig( if ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hCrend[0] != NULL ) && ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD || st_ivas->hIntSetup.output_config != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) ) { -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ), ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ); -#else ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); -#endif } if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) ) diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 7bb81b4afff23312b8a6f6ec1404164aa7a371bb..7ba536809ca7f5f5988fcb7bb17e4e2be0d280d6 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -943,15 +943,7 @@ void ivas_mdct_core_reconstruct( /* Postfiltering */ post_decoder( st, synth_buf, pit_gain[ch], pitch[ch], x[ch][0], st->p_bpf_noise_buf ); -#ifndef FIX_938_COMPILER_WARNING - if ( signal_outFB[ch] ) - { -#endif - mvr2r( synthFB, signal_outFB[ch], st->hTcxDec->L_frameTCX ); -#ifndef FIX_938_COMPILER_WARNING - } -#endif - + mvr2r( synthFB, signal_outFB[ch], st->hTcxDec->L_frameTCX ); #ifdef DEBUG_PLC_INFO { int16_t i; diff --git a/lib_enc/ivas_stereo_mdct_stereo_enc.c b/lib_enc/ivas_stereo_mdct_stereo_enc.c index d7cdd4786a1b214a14e7e929c7f0cc7f01236fd5..d97697434da3ff65ea66c67691ab0226cd639a84 100755 --- a/lib_enc/ivas_stereo_mdct_stereo_enc.c +++ b/lib_enc/ivas_stereo_mdct_stereo_enc.c @@ -411,7 +411,6 @@ void stereo_coder_tcx( nAvailBitsMS[k] = ( ( mct_on ? 2 * sts[0]->bits_frame_channel : sts[0]->bits_frame_nominal ) - sts[0]->side_bits_frame_channel - sts[1]->side_bits_frame_channel - ( nSubframes == 2 ? OFFSET_BITS_TCX10 : OFFSET_BITS_TCX20 ) ) / nSubframes; -#ifdef NONBE_1329_FIX_OSBA_CRASH if ( mct_on && nAvailBitsMS[k] <= 0 ) /*Force M/S when bit-budget is low for MCT*/ { hStereoMdct->mdct_stereo_mode[k] = 1; @@ -420,7 +419,6 @@ void stereo_coder_tcx( } else { -#endif MsStereoDecision( sfbConf, sts[0]->hTcxEnc->spectrum[k], sts[1]->hTcxEnc->spectrum[k], inv_spectrum[0][k], inv_spectrum[1][k], &hStereoMdct->mdct_stereo_mode[k], &ms_mask[k][0], nAvailBitsMS[k] ); if ( sts[0]->igf ) @@ -432,9 +430,7 @@ void stereo_coder_tcx( { hStereoMdct->IGFStereoMode[k] = hStereoMdct->mdct_stereo_mode[k]; } -#ifdef NONBE_1329_FIX_OSBA_CRASH } -#endif if ( hStereoMdct->mdct_stereo_mode[k] != SMDCT_DUAL_MONO || hStereoMdct->IGFStereoMode[k] != SMDCT_DUAL_MONO ) { diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 322d6b7e223a0ec3e3ab993b4eae666790b37384..b120fd6c6ac24a56830faed20d530b387a29c4cb 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1076,12 +1076,10 @@ ivas_error ivas_rend_initCrendWrapper( ( *pCrend )->binaural_latency_ns = 0; ( *pCrend )->hHrtfCrend = NULL; -#ifdef FIX_1288_SPLIT_REND_XSAN for ( pos_idx = 0; pos_idx < MAX_HEAD_ROT_POSES; pos_idx++ ) { ( *pCrend )->hCrend[pos_idx] = NULL; } -#endif for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) { @@ -1345,14 +1343,9 @@ ivas_error ivas_rend_openCrend( * * Deallocate Crend renderer handle *------------------------------------------------------------------------*/ -#ifndef FIX_1288_SPLIT_REND_XSAN -void ivas_rend_closeCrend( - CREND_WRAPPER_HANDLE *pCrend, - const int16_t num_poses ) -#else + void ivas_rend_closeCrend( CREND_WRAPPER_HANDLE *pCrend ) -#endif { int16_t i; int16_t pos_idx; @@ -1368,11 +1361,7 @@ void ivas_rend_closeCrend( ivas_hrtf_close( &( *pCrend )->hHrtfCrend ); } -#ifndef FIX_1288_SPLIT_REND_XSAN - for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) -#else for ( pos_idx = 0; pos_idx < MAX_HEAD_ROT_POSES; pos_idx++ ) -#endif { hCrend = ( *pCrend )->hCrend[pos_idx]; if ( hCrend != NULL ) diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 0e17d68ed0f51d1b87f0804cb2b2f5016ea3cc2c..bb936d4b14b85a1eac27874a27c08884f57de35b 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -903,15 +903,9 @@ ivas_error ivas_rend_openCrend( const int16_t num_poses ); -#ifndef FIX_1288_SPLIT_REND_XSAN -void ivas_rend_closeCrend( - CREND_WRAPPER_HANDLE *pCrend, - const int16_t num_poses -); -#else void ivas_rend_closeCrend( - CREND_WRAPPER_HANDLE *pCrend ); -#endif + CREND_WRAPPER_HANDLE *pCrend +); ivas_error ivas_Crend_hrtf_init( HRTFS_CREND_DATA *hHrtf /* i/o: Crend HRTF handle */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index bea0c4aa34ad9bc5417c29a6bd061b0d0a693349..142215e67507bf6444bc723f5b1caa3516b84717 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1263,11 +1263,7 @@ static ivas_error initIsmMasaRendering( ivas_td_binaural_close( &inputIsm->tdRendWrapper.hBinRendererTd ); } -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper != NULL ? inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputIsm->crendWrapper ); -#endif ivas_reverb_close( &inputIsm->hReverb ); @@ -1394,11 +1390,7 @@ static void clearInputIsm( initRendInputBase( &inputIsm->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper != NULL ? inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputIsm->crendWrapper ); -#endif ivas_reverb_close( &inputIsm->hReverb ); @@ -2096,11 +2088,7 @@ static ivas_error initMcBinauralRendering( /* if we need to use TD renderer and CREND was open, close it */ if ( useTDRend ) { -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputMc->crendWrapper ); -#endif } if ( !reconfigureFlag || ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) ) @@ -2192,11 +2180,7 @@ static ivas_error initMcMasaRendering( ivas_td_binaural_close( &inputMc->tdRendWrapper.hBinRendererTd ); } -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputMc->crendWrapper ); -#endif ivas_reverb_close( &inputMc->hReverb ); @@ -2381,11 +2365,7 @@ static void clearInputMc( efap_free_data( &inputMc->efapInWrapper.hEfap ); } -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper != NULL ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputMc->crendWrapper ); -#endif ivas_reverb_close( &inputMc->hReverb ); @@ -2602,11 +2582,7 @@ static ivas_error initSbaMasaRendering( { ivas_error error; -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputSba->crendWrapper, inputSba->base.ctx.pSplitRendWrapper != NULL ? inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputSba->crendWrapper ); -#endif if ( ( error = ivas_dirac_ana_open( &inputSba->hDirAC, inSampleRate ) ) != IVAS_ERR_OK ) { @@ -2684,11 +2660,7 @@ static void clearInputSba( initRendInputBase( &inputSba->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ -#ifndef FIX_1288_SPLIT_REND_XSAN - ivas_rend_closeCrend( &inputSba->crendWrapper, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ); -#else ivas_rend_closeCrend( &inputSba->crendWrapper ); -#endif if ( inputSba->cldfbRendWrapper.hCldfbRend != NULL ) {