From 964309a3d6b2bb3787ca7c6b77cf85a69700e15e Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 15 Jan 2025 21:49:54 +0100 Subject: [PATCH 1/4] [cleanup] accept FIX_1225_DISCLAIMER --- apps/renderer.c | 4 -- lib_com/disclaimer.c | 4 -- lib_com/options.h | 1 - lib_dec/lib_dec.c | 90 ------------------------------------- lib_rend/ivas_output_init.c | 4 -- lib_rend/ivas_prot_rend.h | 2 - lib_rend/lib_rend.c | 2 - lib_rend/lib_rend.h | 5 --- 8 files changed, 112 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index a29ce5bb03..4704f4433e 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -737,10 +737,8 @@ int main( lfeRoutingConfigs[i] = NULL; } -#ifdef FIX_1225_DISCLAIMER IVAS_REND_PrintDisclaimer(); -#endif CmdlnArgs args = parseCmdlnArgs( argc, argv ); if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_AUDIO_CONFIG_MONO ) || @@ -898,7 +896,6 @@ int main( exit( -1 ); } -#ifdef FIX_1225_DISCLAIMER fprintf( stdout, "Input audio file: %s\n", args.inputFilePath ); fprintf( stdout, "Output audio file: %s\n\n", args.outputFilePath ); @@ -940,7 +937,6 @@ int main( goto cleanup; } -#endif if ( !isEmptyString( args.customHrtfFilePath ) ) { if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) diff --git a/lib_com/disclaimer.c b/lib_com/disclaimer.c index f49f043ca6..18cc5a2ddb 100644 --- a/lib_com/disclaimer.c +++ b/lib_com/disclaimer.c @@ -47,11 +47,7 @@ int16_t print_disclaimer( FILE *fPtr ) { fprintf( fPtr, "\n==================================================================================================\n" ); -#ifdef FIX_1225_DISCLAIMER fprintf( fPtr, " \n IVAS Codec Version IVAS-FL-2.0\n" ); -#else - fprintf( fPtr, " IVAS Codec Baseline\n" ); -#endif fprintf( fPtr, " \n" ); fprintf( fPtr, " Based on EVS Codec (Floating Point) 3GPP TS26.443 Nov 04, 2021,\n" ); fprintf( fPtr, " Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0\n" ); diff --git a/lib_com/options.h b/lib_com/options.h index ea90c9d30c..5cc31c629e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,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_1225_DISCLAIMER /* VA: issue 1225: Add disclaimer for external renderer + Add info about IVAS reference version */ #define FIX_1179_USAN_PHASEECU /* Eri: issue 1179: better handling of 16 bit wrap around for very long(>200ms) FER-bursts */ #define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ #define FIX_1217_OBJECT_EDIT_FILE_INTERFACE /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 06ce14fb67..65d2044a52 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -43,9 +43,6 @@ #include "jbm_pcmdsp_fifo.h" #include #include -#ifndef FIX_1225_DISCLAIMER -#include -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -3913,93 +3910,6 @@ const char *IVAS_DEC_GetErrorMessage( return ivas_error_to_string( error ); } -#ifndef FIX_1225_DISCLAIMER -/*---------------------------------------------------------------------* - * get_channel_config() - * - * Gets a str related to input config - *---------------------------------------------------------------------*/ - -static ivas_error get_channel_config( - AUDIO_CONFIG config, - char *str ) -{ - if ( config == IVAS_AUDIO_CONFIG_MONO ) - { - strcpy( str, "Mono" ); - } - else if ( config == IVAS_AUDIO_CONFIG_STEREO ) - { - strcpy( str, "Stereo" ); - } - else if ( config == IVAS_AUDIO_CONFIG_5_1 ) - { - strcpy( str, "Multichannel 5.1 (CICP6)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_7_1 ) - { - strcpy( str, "Multichannel 7.1 (CICP12)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_5_1_2 ) - { - strcpy( str, "Multichannel 5.1+2 (CICP14)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_5_1_4 ) - { - strcpy( str, "Multichannel 5.1+4 (CICP16)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_7_1_4 ) - { - strcpy( str, "Multichannel 7.1+4 (CICP19)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_LS_CUSTOM ) - { - strcpy( str, "Multichannel (custom loudspeaker layout)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_FOA ) - { - strcpy( str, "Ambisonics: First Order (FOA)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_HOA2 ) - { - strcpy( str, "Ambisonics: Second Order (HOA2)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_HOA3 ) - { - strcpy( str, "Ambisonics: Third Order (HOA3)" ); - } - else if ( config == IVAS_AUDIO_CONFIG_BINAURAL ) - { - strcpy( str, "Binaural: no room" ); - } - else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) - { - strcpy( str, "Binaural: room with impulse responses" ); - } - else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) - { - strcpy( str, "Binaural: room with reverb" ); - } - else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) - { - strcpy( str, "BINAURAL_SPLIT_CODED" ); - } - else if ( config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) - { - strcpy( str, "Binaural_Split_PCM" ); - } - else if ( config == IVAS_AUDIO_CONFIG_EXTERNAL ) - { - strcpy( str, "External renderer" ); - } - else - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Error: Incorrect Input/Output Configuration" ); - } - - return IVAS_ERR_OK; -} -#endif /*---------------------------------------------------------------------* * printConfigInfo_dec( ) diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index cd2330bf09..8c74119ffe 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -37,9 +37,7 @@ #include "ivas_prot_rend.h" #include "ivas_rom_com.h" #include "ivas_prot.h" -#ifdef FIX_1225_DISCLAIMER #include -#endif #ifdef DEBUGGING #include "debug.h" #include @@ -480,7 +478,6 @@ int16_t is_split_rendering_enabled( } } -#ifdef FIX_1225_DISCLAIMER /*---------------------------------------------------------------------* * get_channel_config() @@ -591,4 +588,3 @@ ivas_error get_channel_config( return IVAS_ERR_OK; } -#endif diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 5d88fab636..246cb3e8cc 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -83,12 +83,10 @@ int16_t is_split_rendering_enabled( const IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* i : Render config data structure */ ); -#ifdef FIX_1225_DISCLAIMER ivas_error get_channel_config( const AUDIO_CONFIG config, char *str ); -#endif /*----------------------------------------------------------------------------------* * TD decorr. function prototypes diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7c9b9c0037..c73a5cbf03 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8706,7 +8706,6 @@ static void freeMasaExtRenderer( } -#ifdef FIX_1225_DISCLAIMER static ivas_error printConfigInfo_rend( IVAS_REND_HANDLE hIvasRend /* i : IVAS renderer handle */ ) @@ -8799,4 +8798,3 @@ void IVAS_REND_PrintDisclaimer( void ) return; } -#endif diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index ee4aa681d4..e9425be7bf 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -35,9 +35,6 @@ #include "common_api_types.h" #include -#ifndef FIX_1225_DISCLAIMER -#include "ivas_stat_rend.h" -#endif /*---------------------------------------------------------------------* @@ -424,7 +421,6 @@ int32_t IVAS_REND_GetCntFramesLimited( #endif -#ifdef FIX_1225_DISCLAIMER /* Disclaimer and info printing */ void IVAS_REND_PrintInputConfig( @@ -438,7 +434,6 @@ ivas_error IVAS_REND_PrintConfig( void IVAS_REND_PrintDisclaimer( void ); -#endif /* clang-format on */ #endif -- GitLab From 04c0ba5c0d3066568077b43a04a6848c38d5ce0f Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 15 Jan 2025 21:50:43 +0100 Subject: [PATCH 2/4] [cleanup] accept FIX_1179_USAN_PHASEECU --- lib_com/options.h | 1 - lib_dec/FEC_HQ_phase_ecu.c | 27 --------------------------- 2 files changed, 28 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5cc31c629e..6866ff16c0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,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_1179_USAN_PHASEECU /* Eri: issue 1179: better handling of 16 bit wrap around for very long(>200ms) FER-bursts */ #define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ #define FIX_1217_OBJECT_EDIT_FILE_INTERFACE /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */ diff --git a/lib_dec/FEC_HQ_phase_ecu.c b/lib_dec/FEC_HQ_phase_ecu.c index a500166677..c0d3764a33 100644 --- a/lib_dec/FEC_HQ_phase_ecu.c +++ b/lib_dec/FEC_HQ_phase_ecu.c @@ -2089,28 +2089,16 @@ static void hq_phase_ecu( if ( !prev_bfi || ( prev_bfi && *last_fec && ( *time_offs == output_frame ) ) ) { -#ifdef FIX_1179_USAN_PHASEECU if ( !( prev_bfi && *last_fec && ( element_mode == EVS_MONO ) ) ) { *time_offs = 0; /* IVAS reset of offset time counter, timeoffset variable later also used to calculate burst length */ } -#else - if ( prev_bfi && *last_fec && element_mode == EVS_MONO ) - { - *time_offs += 0; - } - else - { - *time_offs = 0; - } -#endif trans_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, *last_fec, alpha, beta, beta_mute, Xavg ); spec_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, plocs, plocsi, num_p, X_sav, output_frame, bwidth, element_mode, &noise_fac, pcorr ); if ( prev_bfi && *last_fec ) { -#ifdef FIX_1179_USAN_PHASEECU if ( element_mode != EVS_MONO ) { *time_offs = (int16_t) ( *time_offs + output_frame ); /* USAN avoid risk of internal int32_t in "+=" */ @@ -2123,26 +2111,15 @@ static void hq_phase_ecu( { *time_offs = (int16_t) ( *time_offs + output_frame ); /* EVS_MONO BE compatible, but EVS CR needed as wrap will cause burst length muting envelope instability issues */ } -#else - *time_offs += output_frame; -#endif } } else { -#ifdef FIX_1179_USAN_PHASEECU *time_offs = (int16_t) ( *time_offs + output_frame ); /* cast added for USAN, "+=" avoided as it may creat a truncation from int to int16_t */ -#else - *time_offs += output_frame; -#endif if ( *time_offs <= 0 ) { /* detect wrap around of st->time_offs */ -#ifdef FIX_1179_USAN_PHASEECU *time_offs = (int16_t) INT16_MAX; /* high value --> continued muting will ensure that the now saturated seed is not creating tones */ -#else - *time_offs = MAX16B; -#endif } trans_ana( prevsynth + 2 * output_frame - Lprot, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, 0, alpha, beta, beta_mute, Xavg ); /* 1.0 stable-music, 0.0 speech-like */ @@ -2154,11 +2131,7 @@ static void hq_phase_ecu( seed = *time_offs; if ( *num_p > 0 ) { -#ifdef FIX_1179_USAN_PHASEECU seed = (int16_t) ( seed + plocs[*num_p - 1] ); /* explicit cast and "+=" not used, as it "+=" may create a cast from 32 bit to 16 bit, triggering USAN */ -#else - seed += plocs[*num_p - 1]; -#endif } subst_spec( plocs, plocsi, num_p, *time_offs, X, mag_chg, ph_dith, old_is_transient, output_frame, &seed, alpha, beta, *beta_mute, Xavg, element_mode, ph_ecu_lookahead, noise_fac ); -- GitLab From 513456708ffc4f5f2b349d92924c0388ca6913e6 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 15 Jan 2025 21:51:26 +0100 Subject: [PATCH 3/4] [cleanup] accept FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX --- lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 20 -------------------- lib_dec/ivas_output_config.c | 14 -------------- 3 files changed, 35 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6866ff16c0..012cab64d1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,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_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ #define FIX_1217_OBJECT_EDIT_FILE_INTERFACE /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 27cc34245e..1e683cac68 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1509,16 +1509,6 @@ ivas_error ivas_init_decoder( return error; } -#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup ) - { - if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) - { - return error; - } - } - -#endif if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) @@ -1666,16 +1656,6 @@ ivas_error ivas_init_decoder( return error; } -#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup ) - { - if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) - { - return error; - } - } - -#endif if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 27ccf25676..06d1fa7d92 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -326,15 +326,7 @@ void ivas_renderer_select( { *internal_config = output_config; } -#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX - else if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) - { - *internal_config = IVAS_AUDIO_CONFIG_FOA; - } - else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) -#else else -#endif { *internal_config = IVAS_AUDIO_CONFIG_HOA3; } @@ -357,12 +349,6 @@ void ivas_renderer_select( { *renderer_type = RENDERER_DISABLE; } -#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX - else if ( ivas_format == SBA_FORMAT && output_config == IVAS_AUDIO_CONFIG_MONO ) - { - *renderer_type = RENDERER_SBA_LINEAR_DEC; - } -#endif else if ( ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_STEREO ) { *renderer_type = RENDERER_OSBA_STEREO; -- GitLab From 9580b551a620813360ec35a7eb5eacae76e538c5 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 15 Jan 2025 21:52:41 +0100 Subject: [PATCH 4/4] [cleanup] accept NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP --- lib_com/options.h | 1 - lib_dec/ivas_masa_dec.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 012cab64d1..a068276baa 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,7 +172,6 @@ #define NONBE_1217_OBJ_EDIT_FOA /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */ #define NONBE_1215_FIX_JBM_MAX_SCALING /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */ -#define NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP /* Nokia: Fixes ivas_decode_masaism_metadata decision logic change due to precision difference; this is the fix in floating point */ /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 2fc4da6845..3d4a089ce5 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -2418,23 +2418,15 @@ static int16_t ivas_decode_masaism_metadata( if ( azimuth * hMasaIsmData->q_azimuth_old[obj] > 0 ) { delta_phi = 180.0f / (float) ( no_phi_masa[bits_ism[obj] - 1][idx_el] ); /* 360/2*/ -#ifdef NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP /* this is equivalent to testing if 'azimuth - hMasaIsmData->q_azimuth_old[obj] > delta_phi' with limited precision */ if ( roundf( 100 * ( no_phi_masa[bits_ism[obj] - 1][idx_el] ) * ( azimuth - hMasaIsmData->q_azimuth_old[obj] ) ) / 100.0f > 180.0f ) -#else - if ( azimuth - hMasaIsmData->q_azimuth_old[obj] > delta_phi ) -#endif { azimuth -= delta_phi; } else { -#ifdef NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP /* this is equivalent to testing if 'hMasaIsmData->q_azimuth_old[obj] - azimuth > delta_phi' with limited precision */ if ( roundf( 100 * ( no_phi_masa[bits_ism[obj] - 1][idx_el] ) * ( hMasaIsmData->q_azimuth_old[obj] - azimuth ) ) / 100.0f > 180.0f ) -#else - if ( hMasaIsmData->q_azimuth_old[obj] - azimuth > delta_phi ) -#endif { azimuth += delta_phi; } -- GitLab