diff --git a/Workspace_msvc/lib_com.vcxproj b/Workspace_msvc/lib_com.vcxproj
index 8c91d39725f7c84c7f2efbffe0dc98408424b586..8e37844b9a69e8b386dcd0cd8576f99396bf96fd 100644
--- a/Workspace_msvc/lib_com.vcxproj
+++ b/Workspace_msvc/lib_com.vcxproj
@@ -212,6 +212,7 @@
+
diff --git a/Workspace_msvc/lib_com.vcxproj.filters b/Workspace_msvc/lib_com.vcxproj.filters
index 8860ccd56555b76348f97d185429a3ed4e3f2adf..f247d199eba36b4b9c2e75593421e64bfdf9a25a 100644
--- a/Workspace_msvc/lib_com.vcxproj.filters
+++ b/Workspace_msvc/lib_com.vcxproj.filters
@@ -512,6 +512,7 @@
common_ivas_c
+
common_ivas_c
diff --git a/lib_com/ivas_osba_com_fx.c b/lib_com/ivas_osba_com_fx.c
new file mode 100644
index 0000000000000000000000000000000000000000..79ce8443ace24e625bd32134f6817c56bd34b78c
--- /dev/null
+++ b/lib_com/ivas_osba_com_fx.c
@@ -0,0 +1,73 @@
+/******************************************************************************************************
+
+ (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
+ Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
+ Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
+ Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
+ contributors to this repository. All Rights Reserved.
+
+ This software is protected by copyright law and by international treaties.
+ The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
+ Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
+ Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
+ Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
+ contributors to this repository retain full ownership rights in their respective contributions in
+ 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
+ contributions.
+
+ This software is provided "AS IS", without any express or implied warranties. The software is in the
+ development stage. It is intended exclusively for experts who have experience with such software and
+ solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
+ and fitness for a particular purpose are hereby disclaimed and excluded.
+
+ Any dispute, controversy or claim arising under or in relation to providing this software shall be
+ submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
+ accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
+ the United Nations Convention on Contracts on the International Sales of Goods.
+
+*******************************************************************************************************/
+
+#include "options.h"
+#include "ivas_cnst.h"
+#include "ivas_prot_fx.h"
+#include "prot_fx.h"
+#include "ivas_rom_com.h"
+#ifdef DEBUGGING
+#include "debug.h"
+#endif
+
+/*! r : ISM format mode */
+ISM_MODE ivas_osba_ism_mode_select(
+ const Word32 ivas_total_brate, /* i : IVAS total bitrate */
+ const Word16 nchan_ism /* i : number of input ISM's */
+)
+{
+ ISM_MODE ism_mode = ISM_MODE_NONE;
+
+ SWITCH( nchan_ism )
+ {
+ case 1:
+ if ( GE_32( ivas_total_brate, IVAS_96k ) )
+ {
+ ism_mode = ISM_SBA_MODE_DISC;
+ move32();
+ }
+ BREAK;
+
+
+ case 2:
+ case 3:
+ case 4:
+ if ( GE_32( ivas_total_brate, IVAS_128k ) )
+ {
+ ism_mode = ISM_SBA_MODE_DISC;
+ move32();
+ }
+ BREAK;
+ }
+
+ return ism_mode;
+}
diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h
index 3c8ce9aa0693eaf7deae3643b196ed06bdd00178..0b0c1a755fb89339599b13b633b3ac3aa89cb898 100644
--- a/lib_com/ivas_prot_fx.h
+++ b/lib_com/ivas_prot_fx.h
@@ -3885,6 +3885,13 @@ void ivas_osba_data_close_fx(
SBA_ISM_DATA_HANDLE *hSbaIsmData /* i/o: OSBA rendering handle */
);
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ISM_MODE ivas_osba_ism_mode_select(
+ const Word32 ivas_total_brate, /* i : IVAS total bitrate */
+ const Word16 nchan_ism /* i : number of input ISM's */
+);
+#endif
+
void ivas_set_ism_importance_interformat_fx(
const Word32 ism_total_brate, /* i/o: ISms total bitrate */
const Word16 nchan_transport, /* i : number of transported channels */
diff --git a/lib_com/options.h b/lib_com/options.h
old mode 100644
new mode 100755
index 76c8aa71cf65ae9a9adbb0b9e4d88fdc38efdb3c..04cbfaa19d6bbe24170f2284c23e60e0031ea040
--- a/lib_com/options.h
+++ b/lib_com/options.h
@@ -104,6 +104,7 @@
#define FIX_1831_REVERB_REGRESSION /* Philips: fixes reverb regression issues */
#define FIX_1835_REVERB_ACTIVATION /* FhG: Modified reverberation activation logic and corrected factEQ calculation */
#define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */
+#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 FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */
#define CONF_DISTATT /* Eri: Make distance attenuation configurable */
diff --git a/lib_dec/ivas_corecoder_dec_reconfig_fx.c b/lib_dec/ivas_corecoder_dec_reconfig_fx.c
index 8333f146f594a61de657bee9e9b066119b14e694..c8ad991af0024e2a902d10b604e9f898a3db8ee5 100644
--- a/lib_dec/ivas_corecoder_dec_reconfig_fx.c
+++ b/lib_dec/ivas_corecoder_dec_reconfig_fx.c
@@ -342,7 +342,11 @@ ivas_error ivas_corecoder_dec_reconfig_fx(
}
ELSE IF( st_ivas->hMCT != NULL && GT_16( st_ivas->nCPE, 1 ) )
{
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ IF( NE_32( ( error = mct_dec_reconfigure_fx( st_ivas, (UWord16) NE_16( nchan_transport_real, nchan_transport_old ) ) ), IVAS_ERR_OK ) )
+#else
IF( NE_32( ( error = mct_dec_reconfigure_fx( st_ivas, (UWord16) NE_16( st_ivas->nchan_transport, nchan_transport_old ) ) ), IVAS_ERR_OK ) )
+#endif
{
return error;
}
@@ -444,7 +448,13 @@ ivas_error ivas_corecoder_dec_reconfig_fx(
*-----------------------------------------------------------------*/
test();
- IF( EQ_16( st_ivas->ivas_format, SBA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_FORMAT ) )
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ test();
+ test();
+ IF( EQ_16( st_ivas->ivas_format, SBA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_FORMAT ) || EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
+#else
+ if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT )
+#endif
{
ivas_sba_set_cna_cng_flag( st_ivas );
}
diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c
index 9b45dc013675f6cc15d32829605bb53c84145708..4a8673aeb5691cf9acd2c2fe6076809735f79600 100644
--- a/lib_dec/ivas_init_dec_fx.c
+++ b/lib_dec/ivas_init_dec_fx.c
@@ -476,8 +476,8 @@ ivas_error ivas_dec_setup(
st_ivas->nchan_ism = add( add( shl( st_ivas->bit_stream[res_dec - 1], 1 ), st_ivas->bit_stream[res_dec - 2] ), 1 );
move16();
- test();
#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B
+ test();
IF( LT_32( ivas_total_brate, IVAS_24k4 ) || GE_32( ivas_total_brate, IVAS_256k ) )
{
#endif
@@ -532,13 +532,27 @@ ivas_error ivas_dec_setup(
/*correct number of CPEs for discrete ISM coding*/
test();
IF( st_ivas->ini_frame > 0 && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
+
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ {
+ Word16 n;
+
+ n = add( st_ivas->nchan_transport, st_ivas->nchan_ism );
+ st_ivas->nCPE = shr_r( n, 1 );
+ }
+#else
{
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->nchan_ism, 1 ), 1 ) );
move16();
}
+#endif
}
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ IF( EQ_16( ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->nchan_ism ), ISM_SBA_MODE_DISC ) )
+#else
IF( GE_32( ivas_total_brate, IVAS_256k ) )
+#endif
{
st_ivas->ism_mode = ISM_SBA_MODE_DISC;
move32();
@@ -1845,8 +1859,17 @@ ivas_error ivas_init_decoder_fx(
{
st_ivas->nCPE_old = st_ivas->nCPE;
move16();
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ {
+ Word16 n_all;
+
+ n_all = add( st_ivas->nchan_transport, st_ivas->nchan_ism );
+ st_ivas->nCPE = shr( add( n_all, 1 ), 1 );
+ }
+#else
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->nchan_ism, 1 ), 1 ) );
move16();
+#endif
st_ivas->element_mode_init = IVAS_CPE_MDCT;
move16();
}
diff --git a/lib_dec/ivas_osba_dec_fx.c b/lib_dec/ivas_osba_dec_fx.c
index fc325d893963ebb89b81c814c08ca8e1eb9cdbdf..c6c55299a17d7461d61a55ef0c819e5b563e0e25 100644
--- a/lib_dec/ivas_osba_dec_fx.c
+++ b/lib_dec/ivas_osba_dec_fx.c
@@ -160,6 +160,9 @@ ivas_error ivas_osba_dirac_td_binaural_jbm_fx(
return error;
}
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ ivas_combined_orientation_set_to_start_index( st_ivas->hCombinedOrientationData );
+#endif
IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
{
Word16 slot_idx, num_cldfb_bands, b, nchan_transport_orig;
diff --git a/lib_dec/ivas_sba_dec_fx.c b/lib_dec/ivas_sba_dec_fx.c
index 59bc705b60cc534710af63fc2e4d99a1666f753e..0afec8a42ccc2ef64aef88cd4d542ecaa49631d5 100644
--- a/lib_dec/ivas_sba_dec_fx.c
+++ b/lib_dec/ivas_sba_dec_fx.c
@@ -59,6 +59,9 @@ void ivas_sba_set_cna_cng_flag(
test();
test();
test();
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ test();
+#endif
IF( EQ_16( st_ivas->ivas_format, SBA_FORMAT ) && EQ_16( st_ivas->nchan_transport, 1 ) )
{
/* skip as done in init function */
@@ -72,7 +75,11 @@ void ivas_sba_set_cna_cng_flag(
st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 1;
move16();
}
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ ELSE IF( EQ_16( st_ivas->nchan_transport, 2 ) && NE_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
+#else
ELSE IF( EQ_16( st_ivas->nchan_transport, 2 ) )
+#endif
{
FOR( n = 0; n < CPE_CHANNELS; n++ )
{
@@ -124,6 +131,9 @@ ivas_error ivas_sba_dec_reconfigure_fx(
ivas_error error;
ISM_MODE ism_mode_old;
Word16 granularity_new;
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ Word16 nchan_transport;
+#endif
ism_mode_old = st_ivas->ism_mode;
hDecoderConfig = st_ivas->hDecoderConfig;
@@ -146,7 +156,11 @@ ivas_error ivas_sba_dec_reconfigure_fx(
IF( EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
{
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ IF( EQ_16( ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->nchan_ism ), ISM_SBA_MODE_DISC ) )
+#else
IF( GE_32( ivas_total_brate, IVAS_256k ) )
+#endif
{
st_ivas->ism_mode = ISM_SBA_MODE_DISC;
move16();
@@ -498,6 +512,10 @@ ivas_error ivas_sba_dec_reconfigure_fx(
* Allocate, initialize, and configure SCE/CPE/MCT handles
*-----------------------------------------------------------------*/
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport = st_ivas->nchan_transport;
+ move16();
+#endif
IF( EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
{
test();
@@ -579,8 +597,12 @@ ivas_error ivas_sba_dec_reconfigure_fx(
{
return error;
}
-
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport = add( nchan_transport, st_ivas->nchan_ism );
+ st_ivas->nCPE = shr_r( nchan_transport, 1 );
+#else
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->nchan_ism, 1 ), 1 ) ); /*Q0*/
+#endif
move16();
}
ELSE IF( EQ_16( ism_mode_old, ISM_SBA_MODE_DISC ) && EQ_16( st_ivas->ism_mode, ISM_MODE_NONE ) )
@@ -595,12 +617,21 @@ ivas_error ivas_sba_dec_reconfigure_fx(
{
ivas_td_binaural_close_fx( &st_ivas->hBinRendererTd );
}
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport = st_ivas->nchan_transport;
+ move16();
+#endif
nchan_transport_old = add( nchan_transport_old, st_ivas->nchan_ism ); /*Q0*/
st_ivas->ism_mode = ISM_MODE_NONE;
move16();
}
ELSE IF( EQ_16( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
{
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport = add( st_ivas->nchan_transport, st_ivas->nchan_ism );
+ st_ivas->nCPE = shr_r( nchan_transport, 1 );
+ nchan_transport_old = add( nchan_transport_old, st_ivas->nchan_ism );
+#else
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->nchan_ism, 1 ), 1 ) ); /*Q0*/
move16();
nCPE_old = st_ivas->nCPE;
@@ -608,6 +639,7 @@ ivas_error ivas_sba_dec_reconfigure_fx(
nchan_transport_old = st_ivas->nchan_transport;
move16();
nchan_transport_old = add( nchan_transport_old, st_ivas->nchan_ism ); /*Q0*/
+#endif
}
}
diff --git a/lib_enc/ivas_corecoder_enc_reconfig_fx.c b/lib_enc/ivas_corecoder_enc_reconfig_fx.c
index 40ee8b95bb450e1d7fca1403e2b73242966bb990..a121ed3c2d3856d7b22fcdfc6ae63199e721d26b 100644
--- a/lib_enc/ivas_corecoder_enc_reconfig_fx.c
+++ b/lib_enc/ivas_corecoder_enc_reconfig_fx.c
@@ -695,7 +695,11 @@ ivas_error ivas_corecoder_enc_reconfig_fx(
}
ELSE IF( st_ivas->hMCT != NULL && GT_16( st_ivas->nCPE, 1 ) )
{
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ IF( ( error = mct_enc_reconfigure_fx( st_ivas, NE_16( nchan_transport_old_real, nchan_transport_real ) ) ) != IVAS_ERR_OK )
+#else
IF( ( error = mct_enc_reconfigure_fx( st_ivas, st_ivas->nchan_transport != nchan_transport_old ) ) != IVAS_ERR_OK )
+#endif
{
return error;
}
diff --git a/lib_enc/ivas_init_enc_fx.c b/lib_enc/ivas_init_enc_fx.c
index 8dc2a62546f315237e760761b733822ea9feb429..3f5b8f8636e8870bd1ba4c480dddd51adba9fc39 100644
--- a/lib_enc/ivas_init_enc_fx.c
+++ b/lib_enc/ivas_init_enc_fx.c
@@ -769,11 +769,15 @@ ivas_error ivas_init_encoder_fx(
st_ivas->ism_mode = ISM_MODE_NONE;
move16();
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ st_ivas->ism_mode = ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->hEncoderConfig->nchan_ism );
+#else
IF( GE_32( ivas_total_brate, IVAS_256k ) )
{
st_ivas->ism_mode = ISM_SBA_MODE_DISC;
move16();
}
+#endif
IF( ( error = ivas_ism_metadata_enc_create_fx( st_ivas, hEncoderConfig->nchan_ism, element_brate_tmp ) ) != IVAS_ERR_OK )
{
@@ -830,7 +834,16 @@ ivas_error ivas_init_encoder_fx(
ELSE
{
/* allocate and initialize MCT core coder */
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ {
+ int16_t n_all;
+
+ n_all = add( st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_ism );
+ st_ivas->nCPE = shr_r( n_all, 1 );
+ }
+#else
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->hEncoderConfig->nchan_ism, 1 ), 1 ) ); /* Q0 */
+#endif
FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
{
diff --git a/lib_enc/ivas_mct_core_enc_fx.c b/lib_enc/ivas_mct_core_enc_fx.c
index 4eacd287bdc56699d66360b9f58c2df8727b3f41..2daeb21e84e56e5068c8df753fb21f13faf2827a 100644
--- a/lib_enc/ivas_mct_core_enc_fx.c
+++ b/lib_enc/ivas_mct_core_enc_fx.c
@@ -699,12 +699,11 @@ void ivas_mct_core_enc_fx(
{
nAvailBits = sub( nAvailBits, IVAS_FORMAT_SIGNALING_NBITS_EXTENDED );
nAvailBits = sub( nAvailBits, SBA_ORDER_BITS + SBA_PLANAR_BITS );
- test();
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
/*MCT is used at bitrates > 80 kbps and additional 1 bit is present at these bitrates*/
if ( EQ_32( ivas_format, SBA_ISM_FORMAT ) )
{
- nAvailBits -= IVAS_COMBINED_FORMAT_SIGNALLING_BITS;
+ nAvailBits = sub( nAvailBits, IVAS_COMBINED_FORMAT_SIGNALLING_BITS );
}
#else
if ( EQ_32( ivas_format, SBA_ISM_FORMAT ) && GT_16( nChannels, 4 ) )
diff --git a/lib_enc/ivas_osba_enc_fx.c b/lib_enc/ivas_osba_enc_fx.c
index dbff29d68514b1e32c846e9963c1c03c3386dc38..66231d6f75b90d023302a2eb930eb1743f99e091 100644
--- a/lib_enc/ivas_osba_enc_fx.c
+++ b/lib_enc/ivas_osba_enc_fx.c
@@ -188,6 +188,9 @@ ivas_error ivas_osba_enc_reconfig(
hEncoderConfig = st_ivas->hEncoderConfig;
ivas_total_brate = hEncoderConfig->ivas_total_brate;
move32();
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ Word16 nchan_transport;
+#endif
IF( NE_32( ivas_total_brate, hEncoderConfig->last_ivas_total_brate ) )
{
@@ -202,6 +205,9 @@ ivas_error ivas_osba_enc_reconfig(
move16();
old_ism_mode = st_ivas->ism_mode;
move32();
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ st_ivas->ism_mode = ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->hEncoderConfig->nchan_ism );
+#else
IF( GE_32( ivas_total_brate, IVAS_256k ) )
{
st_ivas->ism_mode = ISM_SBA_MODE_DISC;
@@ -212,6 +218,7 @@ ivas_error ivas_osba_enc_reconfig(
st_ivas->ism_mode = ISM_MODE_NONE;
move32();
}
+#endif
nchan_transport_old = st_ivas->nchan_transport;
nCPE_old = st_ivas->nCPE;
nSCE_old = st_ivas->nSCE;
@@ -361,19 +368,39 @@ ivas_error ivas_osba_enc_reconfig(
/*-----------------------------------------------------------------*
* Allocate, initialize, and configure SCE/CPE/MCT handles
*-----------------------------------------------------------------*/
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport = st_ivas->nchan_transport;
+#endif
+
test();
test();
IF( old_ism_mode == ISM_MODE_NONE && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
{
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ {
+ nchan_transport = add( st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_ism );
+ st_ivas->nCPE = shr_r( nchan_transport, 1 );
+ }
+#else
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->hEncoderConfig->nchan_ism, 1 ), 1 ) );
move16();
+#endif
}
ELSE IF( EQ_32( old_ism_mode, ISM_SBA_MODE_DISC ) && st_ivas->ism_mode == ISM_MODE_NONE )
{
nchan_transport_old = add( nchan_transport_old, st_ivas->hEncoderConfig->nchan_ism );
+
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport = st_ivas->nchan_transport;
+#endif
}
ELSE IF( EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
{
+#ifdef NONBE_FIX_ISM_XOVER_BR
+ nchan_transport_old = add( nchan_transport_old, st_ivas->hEncoderConfig->nchan_ism );
+ nchan_transport = add( st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_ism );
+ st_ivas->nCPE = shr_r( nchan_transport, 1 );
+#else
st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->hEncoderConfig->nchan_ism, 1 ), 1 ) );
move16();
nCPE_old = st_ivas->nCPE;
@@ -381,6 +408,7 @@ ivas_error ivas_osba_enc_reconfig(
nchan_transport_old = st_ivas->nchan_transport;
move16();
nchan_transport_old = add( nchan_transport_old, st_ivas->hEncoderConfig->nchan_ism );
+#endif
}
Word16 tmp_e;
Word32 bitrate_per_chan = L_deposit_h( BASOP_Util_Divide3216_Scale( ivas_total_brate, st_ivas->nchan_transport, &tmp_e ) );