From 2708cec47d933cbddcb2ccd6c1b8b7e284248294 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 11 May 2024 22:03:14 +0200 Subject: [PATCH 1/6] [cleanup] accept FIX_NUM_SUBFRAME_UPDATE --- lib_com/options.h | 1 - lib_dec/lib_dec.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index b1d421c416..2412a2d0a1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -158,7 +158,6 @@ #define ISAR_BITSTREAM_UPDATE_LC3PLUS /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */ #define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS -#define FIX_NUM_SUBFRAME_UPDATE #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define CONF_DISTATT /* Eri: Make distance attenuation configurable */ #define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index edbeec9bca..9f59528a0c 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -609,7 +609,6 @@ ivas_error IVAS_DEC_SetRenderFramesize( hIvasDec->st_ivas->hDecoderConfig->render_framesize = render_framesize; -#ifdef FIX_NUM_SUBFRAME_UPDATE if ( hIvasDec->st_ivas->hExtOrientationData != NULL ) { hIvasDec->st_ivas->hExtOrientationData->num_subframes = (int16_t) render_framesize; @@ -618,7 +617,6 @@ ivas_error IVAS_DEC_SetRenderFramesize( { hIvasDec->st_ivas->hCombinedOrientationData->num_subframes = (int16_t) render_framesize; } -#endif return IVAS_ERR_OK; } -- GitLab From 3dce673232cbeaddbcce239af1dd940f437e23b4 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 11 May 2024 22:04:02 +0200 Subject: [PATCH 2/6] [cleanup] accept FIX_1077_MEMORY_TEST_MISSING --- lib_com/options.h | 1 - lib_util/hrtf_file_reader.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 2412a2d0a1..c0df35069f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -161,7 +161,6 @@ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define CONF_DISTATT /* Eri: Make distance attenuation configurable */ #define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */ -#define FIX_1077_MEMORY_TEST_MISSING /* orange: issue 1077 : add missing memory test*/ #define FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK /* VA: issue 1081: correct error print-out when BINAURAL_SPLIT_PCM is requested */ #define FIX_1052_EXT_OUTPUT /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index c42d5c643a..d49568bc08 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -1860,11 +1860,7 @@ ivas_error destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { -#ifdef FIX_1077_MEMORY_TEST_MISSING if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) ) -#else - if ( hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == FALSE ) -#endif { free( ( *hHrtfStatistics )->average_energy_l ); free( ( *hHrtfStatistics )->average_energy_r ); -- GitLab From c3d57f4afdb0cf81741a8410fd958bf30bdef014 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 11 May 2024 22:05:52 +0200 Subject: [PATCH 3/6] [cleanup] accept FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK --- apps/decoder.c | 4 ---- lib_com/options.h | 1 - 2 files changed, 5 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 3362a45dd4..9d38acb1da 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1718,14 +1718,12 @@ static bool parseCmdlIVAS_dec( return false; } -#ifdef FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK if ( arg->outputMdFilename != NULL && arg->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { fprintf( stderr, "Error: Output split rendering metadata file is supported for BINAURAL_SPLIT_PCM output config. only\n\n" ); usage_dec(); return false; } -#endif } else { @@ -2040,13 +2038,11 @@ static ivas_error initOnFirstGoodFrame( } else { -#ifdef FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK if ( arg.outputMdFilename == NULL ) { fprintf( stderr, "\nOutput split rendering metadata file not specified\n" ); return IVAS_ERR_INVALID_SPLIT_REND_CONFIG; } -#endif if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, diff --git a/lib_com/options.h b/lib_com/options.h index c0df35069f..da83740102 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -161,7 +161,6 @@ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define CONF_DISTATT /* Eri: Make distance attenuation configurable */ #define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */ -#define FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK /* VA: issue 1081: correct error print-out when BINAURAL_SPLIT_PCM is requested */ #define FIX_1052_EXT_OUTPUT /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ -- GitLab From 4dac3833a15a55700b5f4c4f5e1995c4d018bd6a Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 11 May 2024 22:06:52 +0200 Subject: [PATCH 4/6] [cleanup] accept NONBE_FIX_1028_1DB_TCX_LEVEL_DROP --- lib_com/options.h | 1 - lib_dec/core_dec_init.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index da83740102..314e07eed1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,7 +171,6 @@ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_ISM_XOVER_BR /* FhG: issue 1072: select OSBA coding method depending on number of object and bitrate */ -#define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ diff --git a/lib_dec/core_dec_init.c b/lib_dec/core_dec_init.c index e2000d5749..802a7ec302 100644 --- a/lib_dec/core_dec_init.c +++ b/lib_dec/core_dec_init.c @@ -150,11 +150,7 @@ void open_decoder_LPD( { st->gamma = GAMMA16k; } -#ifdef NONBE_FIX_1028_1DB_TCX_LEVEL_DROP else if ( st->element_mode > EVS_MONO && st->sr_core > INT_FS_16k ) -#else - else if ( st->sr_core > INT_FS_16k && st->element_mode == IVAS_CPE_MDCT ) -#endif { st->gamma = GAMMA16k; } -- GitLab From fd3f0f071479cba1010a1df6ac34cc46981dc92a Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 11 May 2024 22:07:59 +0200 Subject: [PATCH 5/6] [cleanup] accept NONBE_FIX_SBA_SIGNALING_BITS_B --- lib_com/ivas_dirac_com.c | 4 ---- lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 14 -------------- lib_enc/ivas_mct_core_enc.c | 11 ----------- lib_enc/ivas_spar_encoder.c | 4 ---- 5 files changed, 34 deletions(-) diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index 80f49f95fb..4bc1a81781 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -345,11 +345,7 @@ void ivas_get_dirac_sba_max_md_bits( /* OSBA needs an additional 5-bits safety margin to avoid acelp crashes */ if ( ivas_format == SBA_ISM_FORMAT ) { -#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B ( *metadata_max_bits ) -= 7; -#else - ( *metadata_max_bits ) -= 3; -#endif } } else if ( sba_total_brate <= IVAS_32k ) diff --git a/lib_com/options.h b/lib_com/options.h index 314e07eed1..cc4e5d249b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,7 +171,6 @@ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_ISM_XOVER_BR /* FhG: issue 1072: select OSBA coding method depending on number of object and bitrate */ -#define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ #define NONBE_FIX_1052_SBA_EXT /* Dlb: SBA external output support */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 8f719a1a83..e98492f574 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -477,23 +477,15 @@ ivas_error ivas_dec_setup( /* the number of objects is written at the end of the bitstream, in the SBA metadata */ st_ivas->nchan_ism = 2 * st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 1] + st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 2] + 1; -#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B - if ( ivas_total_brate < IVAS_24k4 || ivas_total_brate >= IVAS_256k ) - { -#endif /* read Ambisonic (SBA) planar flag */ st_ivas->sba_planar = st_ivas->bit_stream[num_bits_read]; num_bits_read += SBA_PLANAR_BITS; -#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B - } -#endif /* read Ambisonic (SBA) order (0 for signaling OSBA format at low bitrates)*/ st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1]; st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read]; num_bits_read += SBA_ORDER_BITS; -#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B /* read the real Ambisonic order when the above bits are used to signal OSBA format */ if ( ivas_total_brate < IVAS_24k4 ) { @@ -501,12 +493,6 @@ ivas_error ivas_dec_setup( st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read]; num_bits_read += SBA_ORDER_BITS; } -#else - if ( ivas_total_brate < IVAS_256k ) - { - st_ivas->sba_order = 3; - } -#endif if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate ) { #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_enc/ivas_mct_core_enc.c b/lib_enc/ivas_mct_core_enc.c index d4aad15afa..cf2f3d8afd 100644 --- a/lib_enc/ivas_mct_core_enc.c +++ b/lib_enc/ivas_mct_core_enc.c @@ -498,18 +498,11 @@ void ivas_mct_core_enc( nAvailBits -= IVAS_FORMAT_SIGNALING_NBITS_EXTENDED; nAvailBits -= SBA_ORDER_BITS + SBA_PLANAR_BITS; -#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B /*MCT is used at bitrates > 80 kbps and additional 1 bit is present at these bitrates*/ if ( ivas_format == SBA_ISM_FORMAT ) { nAvailBits -= IVAS_COMBINED_FORMAT_SIGNALLING_BITS; } -#else - if ( ivas_format == SBA_ISM_FORMAT && nChannels > 4 ) - { - nAvailBits -= IVAS_COMBINED_FORMAT_SIGNALLING_BITS; - } -#endif } for ( cpe_id = 0, i = 0; cpe_id < nCPE; cpe_id++ ) @@ -584,11 +577,7 @@ void ivas_mct_core_enc( #ifdef DEBUGGING format_bits = ( ivas_format == MC_FORMAT ? IVAS_FORMAT_SIGNALING_NBITS + MC_LS_SETUP_BITS : IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + SBA_ORDER_BITS + SBA_PLANAR_BITS ); -#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B format_bits += ( ivas_format == SBA_ISM_FORMAT ); -#else - format_bits += ( ivas_format == SBA_ISM_FORMAT && nChannels > FOA_CHANNELS ); -#endif mct_bits += hMCT->nBitsMCT + hMCT->nchan_out_woLFE; assert( ( total_brate + ( NBITS_BWIDTH + format_bits + mct_bits + sba_meta + lfe_bits ) * FRAMES_PER_SEC ) == ivas_total_brate ); diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index d7d3dadc13..0a6f44b1d0 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -356,18 +356,14 @@ ivas_error ivas_spar_enc( /* hack to indicate OSBA format (SBA order = 0) at low bitrates */ push_indice( st0->hBstr, IND_SMODE, 0, SBA_ORDER_BITS ); -#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B /* additionally code the real SBA order */ push_indice( st0->hBstr, IND_SMODE, hEncoderConfig->sba_order, SBA_ORDER_BITS ); -#endif } else { -#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B /* Write SBA planar flag */ push_indice( st0->hBstr, IND_SMODE, hEncoderConfig->sba_planar, SBA_PLANAR_BITS ); -#endif /* Write SBA order */ push_indice( st0->hBstr, IND_SMODE, hEncoderConfig->sba_order, SBA_ORDER_BITS ); -- GitLab From 3df216dd49b00436444a8fd4d543c64b73876c8f Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 11 May 2024 22:10:31 +0200 Subject: [PATCH 6/6] formatting --- lib_dec/ivas_init_dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index e98492f574..9f8d5bbc39 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -477,9 +477,9 @@ ivas_error ivas_dec_setup( /* the number of objects is written at the end of the bitstream, in the SBA metadata */ st_ivas->nchan_ism = 2 * st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 1] + st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 2] + 1; - /* read Ambisonic (SBA) planar flag */ - st_ivas->sba_planar = st_ivas->bit_stream[num_bits_read]; - num_bits_read += SBA_PLANAR_BITS; + /* read Ambisonic (SBA) planar flag */ + st_ivas->sba_planar = st_ivas->bit_stream[num_bits_read]; + num_bits_read += SBA_PLANAR_BITS; /* read Ambisonic (SBA) order (0 for signaling OSBA format at low bitrates)*/ st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1]; -- GitLab