diff --git a/lib_com/options.h b/lib_com/options.h index daa581012a72260db13ea4548d7ab24cddfde67e..51594b2b4557728390c3b65d5cd56aa0e9153283 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -99,13 +99,13 @@ #define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ -#define FIX_1052_EXT_OUTPUT /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ +#define FIX_1052_EXT_OUTPUT /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */ #define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */ -#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_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 FIX_1741_REVERB_TIMES_Q_FORMAT /* Philips: reverberation times in Q26 format instead of Q31 */ #define FIX_1831_REVERB_REGRESSION /* Philips: fixes reverb regression issues */ @@ -120,6 +120,7 @@ #define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/ #define NONBE_FIX_1052_SBA_EXT /* Dlb: SBA external output support */ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ +#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 674e08ee8f2d01a641f33993c114f41e38867b67..57e0f475b23cef9ebf285f06de8c4b03dfcd228c 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -427,6 +427,25 @@ ivas_error ivas_dec_setup( IF( GT_16( st_ivas->nchan_ism, 0 ) ) { +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + /* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */ + /* info about the number of objects: + '00' - MASA format at the encoder + '01' - MASA_ISM_FORMAT at the encoder, with 4 objects + '10' - MASA_ISM_FORMAT at the encoder, with 3 objects + '11' - MASA_ISM_FORMAT at the encoder, with 1 or 2 objects + reading if 1 or 2 objects is performed later + */ + st_ivas->nchan_ism = sub( 5, st_ivas->nchan_ism ); + + test(); + IF( EQ_16( st_ivas->nchan_transport, 1 ) && EQ_16( st_ivas->nchan_ism, 2 ) ) + { + st_ivas->nchan_ism = 1; + move16(); + } + /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 and the corresponding bit is not used here*/ +#else /* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */ test(); IF( EQ_16( st_ivas->nchan_transport, 2 ) && EQ_16( st_ivas->nchan_ism, 3 ) ) @@ -435,6 +454,7 @@ ivas_error ivas_dec_setup( move16(); } /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 */ +#endif st_ivas->nchan_transport = 2; element_mode_flag = 1; move16(); diff --git a/lib_dec/ivas_masa_dec_fx.c b/lib_dec/ivas_masa_dec_fx.c index 974312b5c6e6431ed246d92ad813b0c7386a800c..ba90382ae389485e34760619f5c1cbb0762c4c79 100644 --- a/lib_dec/ivas_masa_dec_fx.c +++ b/lib_dec/ivas_masa_dec_fx.c @@ -184,98 +184,118 @@ ivas_error ivas_masa_decode_fx( test(); IF( NE_32( ivas_format, MC_FORMAT ) || NE_16( st_ivas->mc_mode, MC_MODE_MCMASA ) ) { - IF( NE_32( ivas_format, MASA_ISM_FORMAT ) ) +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + Word16 bits_per_frame = extract_l( Mpy_32_32( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) ); + IF( EQ_32( ivas_format, MASA_FORMAT ) ) { - /* number of transport channels is always 2 for MASA_ISM format */ - /* the number of MASA transport channels was read in ivas_dec_setup() */ - st->next_bit_pos = sub( st->next_bit_pos, MASA_TRANSP_BITS ); - *nb_bits_read = add( *nb_bits_read, MASA_TRANSP_BITS ); - move16(); + /* re-read the number of objects, needed in case of bad frame */ + st_ivas->nchan_ism = sub( 5, add( st_ivas->bit_stream[bits_per_frame - 3], shl( st_ivas->bit_stream[bits_per_frame - 2], 1 ) ) ); } - test(); - IF( EQ_32( ivas_format, MASA_ISM_FORMAT ) && NE_32( st_ivas->ism_mode, ISM_MODE_NONE ) ) + IF( EQ_32( ivas_format, MASA_FORMAT ) && NE_16( st_ivas->nchan_ism, 5 ) ) { - /* the number of objects was read */ - st->next_bit_pos = sub( st->next_bit_pos, NO_BITS_MASA_ISM_NO_OBJ ); - *nb_bits_read = add( *nb_bits_read, NO_BITS_MASA_ISM_NO_OBJ ); - move16(); - move16(); - - IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) + /* there was OMASA in the input */ + hMasa->config.input_ivas_format = MASA_ISM_FORMAT; + move32(); + IF( LT_16( st_ivas->nchan_ism, 3 ) ) { - /* read index of separated object */ - /* nchan_ism should be > 1*/ + /* was read in ivas_init_dec() to distinguish between 1 and 2 objects */ + IF( EQ_16( st_ivas->bit_stream[bits_per_frame - 1], 0 ) ) + { + st_ivas->nchan_ism = 1; + move16(); + } + st->next_bit_pos = sub( st->next_bit_pos, MASA_TRANSP_BITS ); + *nb_bits_read = add( *nb_bits_read, MASA_TRANSP_BITS ); + + /* the two reserved bits were already read in ivas_init_dec()*/ + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; byteBuffer = st->bit_stream[( st->next_bit_pos )--]; move16(); - *nb_bits_read = add( *nb_bits_read, 1 ); move16(); - st_ivas->hMasaIsmData->idx_separated_ism = extract_l( L_add( L_shl( byteBuffer, 1 ), st->bit_stream[( st->next_bit_pos )--] ) ); + *nb_bits_read = add( *nb_bits_read, MASA_HEADER_BITS ); + /* read number of directions */ + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; move16(); *nb_bits_read = add( *nb_bits_read, 1 ); - move16(); + hMasa->config.numberOfDirections = (UWord8) L_add( byteBuffer, 1 ); } ELSE { - st_ivas->hMasaIsmData->idx_separated_ism = -1; + /* if there are 3 or 4 objects the number of transport channels bit is given to MASA format + and used to read number of directions*/ + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, 1 ); + hMasa->config.numberOfDirections = (UWord8) L_add( byteBuffer, 1 ); + + /* the two reserved bits were already read in ivas_init_dec()*/ + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + move16(); + move16(); + *nb_bits_read = add( *nb_bits_read, MASA_HEADER_BITS ); + } + } + ELSE + { +#endif + IF( NE_32( ivas_format, MASA_ISM_FORMAT ) ) + { + /* number of transport channels is always 2 for MASA_ISM format */ + /* the number of MASA transport channels was read in ivas_dec_setup() */ + st->next_bit_pos = sub( st->next_bit_pos, MASA_TRANSP_BITS ); + *nb_bits_read = add( *nb_bits_read, MASA_TRANSP_BITS ); move16(); } - /* read ISM importance flag (one per object) */ - IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) + test(); + IF( EQ_32( ivas_format, MASA_ISM_FORMAT ) && NE_32( st_ivas->ism_mode, ISM_MODE_NONE ) ) { - ism_imp = 0; + /* the number of objects was read */ + st->next_bit_pos = sub( st->next_bit_pos, NO_BITS_MASA_ISM_NO_OBJ ); + *nb_bits_read = add( *nb_bits_read, NO_BITS_MASA_ISM_NO_OBJ ); + move16(); move16(); - FOR( i = 0; i < ISM_METADATA_FLAG_BITS; i++ ) + IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) { + /* read index of separated object */ + /* nchan_ism should be > 1*/ byteBuffer = st->bit_stream[( st->next_bit_pos )--]; move16(); *nb_bits_read = add( *nb_bits_read, 1 ); move16(); - ism_imp = add( shl( ism_imp, 1 ), (Word16) byteBuffer ); - } - st_ivas->hIsmMetaData[0]->ism_imp = ism_imp; - move16(); - } - - IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_MASA_ONE_OBJ ) ) - { - ism_imp = 0; - move16(); - FOR( i = 0; i < ISM_METADATA_FLAG_BITS; i++ ) - { - byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + st_ivas->hMasaIsmData->idx_separated_ism = extract_l( L_add( L_shl( byteBuffer, 1 ), st->bit_stream[( st->next_bit_pos )--] ) ); move16(); *nb_bits_read = add( *nb_bits_read, 1 ); move16(); - ism_imp = add( shl( ism_imp, 1 ), (Word16) byteBuffer ); + } + ELSE + { + st_ivas->hMasaIsmData->idx_separated_ism = -1; move16(); } - st_ivas->hIsmMetaData[0]->ism_imp = ism_imp; - move16(); - /* reset */ - st_ivas->hIsmMetaData[0]->ism_md_null_flag = 0; - move16(); - st_ivas->hIsmMetaData[0]->ism_md_lowrate_flag = 0; - move16(); - IF( EQ_16( st_ivas->hIsmMetaData[0]->ism_imp, ISM_NO_META ) ) + /* read ISM importance flag (one per object) */ + IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) { - /* read flags */ - st_ivas->hIsmMetaData[0]->ism_md_null_flag = st->bit_stream[( st->next_bit_pos )--]; - move16(); - *nb_bits_read = add( *nb_bits_read, ISM_METADATA_MD_FLAG_BITS ); - move16(); - st_ivas->hIsmMetaData[0]->ism_md_lowrate_flag = st->bit_stream[( st->next_bit_pos )--]; + ism_imp = 0; move16(); - *nb_bits_read = add( *nb_bits_read, ISM_METADATA_INACTIVE_FLAG_BITS ); + + FOR( i = 0; i < ISM_METADATA_FLAG_BITS; i++ ) + { + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, 1 ); + move16(); + ism_imp = add( shl( ism_imp, 1 ), (Word16) byteBuffer ); + } + st_ivas->hIsmMetaData[0]->ism_imp = ism_imp; move16(); } - } - ELSE IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) - { - FOR( ch = 0; ch < st_ivas->nchan_ism; ch++ ) + + IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_MASA_ONE_OBJ ) ) { ism_imp = 0; move16(); @@ -286,66 +306,104 @@ ivas_error ivas_masa_decode_fx( *nb_bits_read = add( *nb_bits_read, 1 ); move16(); ism_imp = add( shl( ism_imp, 1 ), (Word16) byteBuffer ); + move16(); } - st_ivas->hIsmMetaData[ch]->ism_imp = ism_imp; + st_ivas->hIsmMetaData[0]->ism_imp = ism_imp; move16(); /* reset */ - st_ivas->hIsmMetaData[ch]->ism_md_null_flag = 0; + st_ivas->hIsmMetaData[0]->ism_md_null_flag = 0; move16(); - st_ivas->hIsmMetaData[ch]->ism_md_lowrate_flag = 0; + st_ivas->hIsmMetaData[0]->ism_md_lowrate_flag = 0; move16(); - IF( EQ_16( st_ivas->hIsmMetaData[ch]->ism_imp, ISM_NO_META ) ) + IF( EQ_16( st_ivas->hIsmMetaData[0]->ism_imp, ISM_NO_META ) ) { /* read flags */ - st_ivas->hIsmMetaData[ch]->ism_md_null_flag = st->bit_stream[( st->next_bit_pos )--]; + st_ivas->hIsmMetaData[0]->ism_md_null_flag = st->bit_stream[( st->next_bit_pos )--]; move16(); *nb_bits_read = add( *nb_bits_read, ISM_METADATA_MD_FLAG_BITS ); move16(); - st_ivas->hIsmMetaData[ch]->ism_md_lowrate_flag = st->bit_stream[( st->next_bit_pos )--]; + st_ivas->hIsmMetaData[0]->ism_md_lowrate_flag = st->bit_stream[( st->next_bit_pos )--]; move16(); *nb_bits_read = add( *nb_bits_read, ISM_METADATA_INACTIVE_FLAG_BITS ); move16(); } } - st_ivas->flag_omasa_brate = 0; - move16(); - test(); - IF( GE_16( st_ivas->nchan_ism, 3 ) && EQ_32( ivas_total_brate, IVAS_128k ) ) + ELSE IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) { - st_ivas->flag_omasa_brate = st->bit_stream[( st->next_bit_pos )--]; - move16(); - *nb_bits_read = add( *nb_bits_read, 1 ); + FOR( ch = 0; ch < st_ivas->nchan_ism; ch++ ) + { + ism_imp = 0; + move16(); + FOR( i = 0; i < ISM_METADATA_FLAG_BITS; i++ ) + { + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, 1 ); + move16(); + ism_imp = add( shl( ism_imp, 1 ), (Word16) byteBuffer ); + } + st_ivas->hIsmMetaData[ch]->ism_imp = ism_imp; + move16(); + + /* reset */ + st_ivas->hIsmMetaData[ch]->ism_md_null_flag = 0; + move16(); + st_ivas->hIsmMetaData[ch]->ism_md_lowrate_flag = 0; + move16(); + IF( EQ_16( st_ivas->hIsmMetaData[ch]->ism_imp, ISM_NO_META ) ) + { + /* read flags */ + st_ivas->hIsmMetaData[ch]->ism_md_null_flag = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, ISM_METADATA_MD_FLAG_BITS ); + move16(); + st_ivas->hIsmMetaData[ch]->ism_md_lowrate_flag = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, ISM_METADATA_INACTIVE_FLAG_BITS ); + move16(); + } + } + st_ivas->flag_omasa_brate = 0; move16(); + test(); + IF( GE_16( st_ivas->nchan_ism, 3 ) && EQ_32( ivas_total_brate, IVAS_128k ) ) + { + st_ivas->flag_omasa_brate = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, 1 ); + move16(); + } } } - } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT - /* read 2 bits: - '00' - MASA format at the encoder - '01' - MASA_ISM_FORMAT at the encoder, with 1 object - '10' - MASA_ISM_FORMAT at the encoder, with 2 objects - '11' - MASA_ISM_FORMAT at the encoder, with 3 or 4 objects - reading if 3 or 4 object is performed later - */ - byteBuffer = st->bit_stream[st->next_bit_pos]; - move16(); - st->next_bit_pos = sub( st->next_bit_pos, 1 ); - byteBuffer = add( byteBuffer, shl( st->bit_stream[st->next_bit_pos], 1 ) ); - st->next_bit_pos = sub( st->next_bit_pos, 1 ); +#ifndef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + /* read 2 bits: + '00' - MASA format at the encoder + '01' - MASA_ISM_FORMAT at the encoder, with 1 object + '10' - MASA_ISM_FORMAT at the encoder, with 2 objects + '11' - MASA_ISM_FORMAT at the encoder, with 3 or 4 objects + reading if 3 or 4 object is performed later + */ +#endif + byteBuffer = st->bit_stream[st->next_bit_pos]; + move16(); + st->next_bit_pos = sub( st->next_bit_pos, 1 ); + byteBuffer = add( byteBuffer, shl( st->bit_stream[st->next_bit_pos], 1 ) ); + st->next_bit_pos = sub( st->next_bit_pos, 1 ); - test(); - IF( EQ_16( byteBuffer, 0 ) && EQ_32( ivas_format, MASA_FORMAT ) ) - { - hMasa->config.input_ivas_format = MASA_FORMAT; - move32(); - } - ELSE - { - hMasa->config.input_ivas_format = MASA_ISM_FORMAT; - move32(); - } + test(); + IF( EQ_16( byteBuffer, 0 ) && EQ_32( ivas_format, MASA_FORMAT ) ) + { + hMasa->config.input_ivas_format = MASA_FORMAT; + move32(); + } + ELSE + { + hMasa->config.input_ivas_format = MASA_ISM_FORMAT; + move32(); + } #else /* read the MASA_ISM_FORMAT bit */ byteBuffer = st->bit_stream[( st->next_bit_pos )--]; @@ -364,15 +422,18 @@ ivas_error ivas_masa_decode_fx( byteBuffer = st->bit_stream[( st->next_bit_pos )--]; move16(); #endif - *nb_bits_read = add( *nb_bits_read, MASA_HEADER_BITS ); + *nb_bits_read = add( *nb_bits_read, MASA_HEADER_BITS ); - /* read number of directions */ - byteBuffer = st->bit_stream[( st->next_bit_pos )--]; - move16(); - *nb_bits_read = add( *nb_bits_read, 1 ); - move16(); - hMasa->config.numberOfDirections = (UWord8) L_add( byteBuffer, 1 ); - move16(); + /* read number of directions */ + byteBuffer = st->bit_stream[( st->next_bit_pos )--]; + move16(); + *nb_bits_read = add( *nb_bits_read, 1 ); + move16(); + hMasa->config.numberOfDirections = (UWord8) L_add( byteBuffer, 1 ); + move16(); +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + } +#endif } ELSE { diff --git a/lib_enc/ivas_masa_enc_fx.c b/lib_enc/ivas_masa_enc_fx.c index a9b635283d87f89f6cb6d0d63fa6037ad743e802..0c87faa4e5441a9ef0e1035723eb02723bdfa6d9 100644 --- a/lib_enc/ivas_masa_enc_fx.c +++ b/lib_enc/ivas_masa_enc_fx.c @@ -537,6 +537,19 @@ ivas_error ivas_masa_encode_fx( test(); IF( EQ_32( ivas_format, MASA_ISM_FORMAT ) && EQ_32( ism_mode, ISM_MODE_NONE ) ) { +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + /* use the MASA number of transport channels bit to signal if there are 1 or 2 objects */ + test(); + IF( EQ_16( nchan_ism, 1 ) || EQ_16( nchan_ism, 2 ) ) + { + push_next_indice( hMetaData, sub( nchan_ism, 1 ), MASA_TRANSP_BITS ); + } + ELSE + { + /* for 3 or 4 objects write already the number of MASA directions */ + push_next_indice( hMetaData, sub( hQMetaData->no_directions, 1 ), MASA_TRANSP_BITS ); + } +#else /* use the MASA number of transport channels bit to signal if there are 3 or 4 objects */ IF( EQ_16( nchan_ism, 4 ) ) { @@ -546,6 +559,7 @@ ivas_error ivas_masa_encode_fx( { push_next_indice( hMetaData, 0, MASA_TRANSP_BITS ); } +#endif } ELSE { @@ -563,6 +577,16 @@ ivas_error ivas_masa_encode_fx( IF( EQ_32( ivas_format, MASA_ISM_FORMAT ) && EQ_32( ism_mode, ISM_MODE_NONE ) ) { #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + IF( GE_16( nchan_ism, 3 ) ) /* if 3 or 4 objects */ + { + push_next_indice( hMetaData, sub( 5, nchan_ism ), MASA_HEADER_BITS ); + } + ELSE + { + push_next_indice( hMetaData, 3, MASA_HEADER_BITS ); + } +#else IF( LE_16( nchan_ism, 3 ) ) { push_next_indice( hMetaData, nchan_ism, MASA_HEADER_BITS ); @@ -571,6 +595,7 @@ ivas_error ivas_masa_encode_fx( { push_next_indice( hMetaData, sub( nchan_ism, 1 ), MASA_HEADER_BITS ); } +#endif hQMetaData->metadata_max_bits = sub( hQMetaData->metadata_max_bits, MASA_HEADER_BITS ); move16(); #else @@ -590,10 +615,20 @@ ivas_error ivas_masa_encode_fx( hQMetaData->metadata_max_bits = sub( hQMetaData->metadata_max_bits, MASA_HEADER_BITS ); move16(); } - /* write number of directions */ - push_next_indice( hMetaData, sub( hQMetaData->no_directions, 1 ), 1 ); - hQMetaData->metadata_max_bits = sub( hQMetaData->metadata_max_bits, 1 ); - move16(); +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + test(); + test(); + test(); + IF( !( EQ_32( ivas_format, MASA_ISM_FORMAT ) && EQ_32( ism_mode, ISM_MODE_NONE ) && GT_16( nchan_ism, 2 ) ) ) + { +#endif + /* write number of directions */ + push_next_indice( hMetaData, sub( hQMetaData->no_directions, 1 ), 1 ); + hQMetaData->metadata_max_bits = sub( hQMetaData->metadata_max_bits, 1 ); + move16(); +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + } +#endif /* write subframe mode */ IF( EQ_16( hQMetaData->q_direction[0].cfg.nblocks, 1 ) ) diff --git a/lib_rend/ivas_output_init_fx.c b/lib_rend/ivas_output_init_fx.c index 752928f919833f1533b153ae71a6dce78266237c..b30ce1fd1b24877df94a6311208ff67e29bff0b7 100644 --- a/lib_rend/ivas_output_init_fx.c +++ b/lib_rend/ivas_output_init_fx.c @@ -388,7 +388,12 @@ Word16 ivas_get_nchan_buffers_dec_fx( } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT test(); +#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR + test(); + IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && GT_16( st_ivas->nchan_ism, 0 ) && LT_16( st_ivas->nchan_ism, 5 ) ) /* Last condition needed only in BASOP */ +#else IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && GT_16( st_ivas->nchan_ism, 0 ) ) +#endif { nchan_out_buff = add( st_ivas->nchan_ism, CPE_CHANNELS ); }