diff --git a/lib_com/options.h b/lib_com/options.h index e940ae943df4b16fd3b5bf2ac119f32d0891322b..76c8aa71cf65ae9a9adbb0b9e4d88fdc38efdb3c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,6 +95,10 @@ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nokia: issue #984: complete the OMASA EXT output implementation */ #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 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 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 */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 7d623dc8c372410834a9a0eca346b1516ff53d9f..9b45dc013675f6cc15d32829605bb53c84145708 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1270,7 +1270,19 @@ ivas_error ivas_init_decoder_fx( #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT test(); #endif +#ifdef FIX_1052_EXT_OUTPUT + IF( EQ_32( st_ivas->ivas_format, STEREO_FORMAT ) ) + { + hDecoderConfig->nchan_out = CPE_CHANNELS; + } + ELSE IF( EQ_32( st_ivas->ivas_format, MC_FORMAT ) ) + { + hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config ); + } + ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) +#else IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) +#endif { hDecoderConfig->nchan_out = audioCfg2channels( IVAS_AUDIO_CONFIG_HOA3 ); move16(); @@ -1302,7 +1314,22 @@ ivas_error ivas_init_decoder_fx( st_ivas->intern_config = output_config; move32(); + +#ifdef FIX_1052_EXT_OUTPUT + IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, MC_FORMAT ) ) + { + ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->transport_config ); + st_ivas->intern_config = st_ivas->transport_config; + move32(); + } + ELSE + { + ivas_output_init( &( st_ivas->hOutSetup ), output_config ); + } +#else ivas_output_init( &( st_ivas->hOutSetup ), output_config ); +#endif + test(); IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) ) { @@ -3822,11 +3849,26 @@ static ivas_error doSanityChecks_IVAS( test(); test(); test(); +#ifdef FIX_1052_EXT_OUTPUT + test(); + IF( NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else IF( NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) ) +#endif { return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Wrong output configuration specified for Stereo!" ); } } +#ifdef FIX_1052_EXT_OUTPUT + /* Verify output configuration for other formats */ + ELSE + { + IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_INVALID ) ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" ); + } + } +#else ELSE IF( EQ_32( st_ivas->ivas_format, ISM_FORMAT ) ) { /* Verify ISM output configuration */ @@ -3859,6 +3901,7 @@ static ivas_error doSanityChecks_IVAS( return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for Multi-channel" ); } } +#endif IF( ( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) && NE_32( output_Fs, 48000 ) ) { diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index f3f15daeaf2475e533ccf66bc991de97be146c5e..20f0f1de22b16e7bb27c5d23e82c7affcccbf7de 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -1336,11 +1336,16 @@ ivas_error ivas_jbm_dec_tc_fx( test(); test(); test(); +#ifdef FIX_1052_EXT_OUTPUT test(); /* Delay the separated channel to sync with CLDFB delay of the DirAC synthesis, and synthesize the LFE signal. */ IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) || - EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || - EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || ( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && st_ivas->hOutSetup.num_lfe > 0 ) ) + EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || ( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && st_ivas->hOutSetup.num_lfe > 0 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else + /* Delay the separated channel to sync with CLDFB delay of the DirAC synthesis, and synthesize the LFE signal. */ + IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) || + EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || ( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && st_ivas->hOutSetup.num_lfe > 0 ) ) +#endif { ivas_lfe_synth_with_filters_fx( st_ivas->hMasa->hMasaLfeSynth, p_output_fx, output_frame, n, LFE_CHANNEL ); } diff --git a/lib_dec/ivas_masa_dec_fx.c b/lib_dec/ivas_masa_dec_fx.c index f669707103cb2e903cd3de398d3e58e092475a2e..a6ab0ab416ee5f07e6d70c1d31d61ef54886af23 100644 --- a/lib_dec/ivas_masa_dec_fx.c +++ b/lib_dec/ivas_masa_dec_fx.c @@ -532,7 +532,13 @@ ivas_error ivas_masa_decode_fx( hMasa->config.coherencePresent = !hQMetaData->all_coherence_zero; move16(); +#ifdef FIX_1052_EXT_OUTPUT + test(); + test(); + IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && ( EQ_32( ivas_format, MASA_FORMAT ) || EQ_32( ivas_format, MASA_ISM_FORMAT ) ) ) +#else IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#endif { index_16bits_fx( hQMetaData, hMasa->data.sph_grid16 ); } @@ -825,7 +831,13 @@ ivas_error ivas_masa_dec_open_fx( move16(); /* Create spherical grid only for external output */ +#ifdef FIX_1052_EXT_OUTPUT + test(); + test(); + IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && ( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) ) +#else IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#endif { IF( ( hMasa->data.sph_grid16 = (SPHERICAL_GRID_DATA *) malloc( sizeof( SPHERICAL_GRID_DATA ) ) ) == NULL ) { @@ -1366,13 +1378,25 @@ static ivas_error init_lfe_synth_data_fx( test(); test(); test(); +#ifdef FIX_1052_EXT_OUTPUT + test(); IF( st_ivas->hOutSetup.separateChannelEnabled && ( EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || + EQ_16( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_FOA ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA2 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA3 ) || ( EQ_16( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && ( st_ivas->hOutSetup.num_lfe > 0 ) ) ) ) +#else + IF( st_ivas->hOutSetup.separateChannelEnabled && + ( EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1 ) || + EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || + EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || + EQ_16( output_config, IVAS_AUDIO_CONFIG_FOA ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA2 ) || + EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA3 ) || + ( EQ_16( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && ( st_ivas->hOutSetup.num_lfe > 0 ) ) ) ) +#endif { Word16 bufferSize; Word16 i; diff --git a/lib_dec/ivas_mc_param_dec_fx.c b/lib_dec/ivas_mc_param_dec_fx.c index f47db8689ba3d7c38a14cd0f06832687c7031168..230c210b76eb405e184962180855d12fc95c1082 100644 --- a/lib_dec/ivas_mc_param_dec_fx.c +++ b/lib_dec/ivas_mc_param_dec_fx.c @@ -165,7 +165,11 @@ ivas_error ivas_param_mc_dec_open_fx( test(); test(); test(); +#ifdef FIX_1052_EXT_OUTPUT + IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) || EQ_32( st_ivas->transport_config, output_config ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) || EQ_32( st_ivas->transport_config, output_config ) ) +#endif { hParamMC->synthesis_conf = PARAM_MC_SYNTH_DIRECT; move32(); diff --git a/lib_dec/ivas_mct_dec_fx.c b/lib_dec/ivas_mct_dec_fx.c index 1fcdbff848069ea789a52af1a7adf910bdfacf65..cb9e372680112ade1e7a6520b61381835066f674 100644 --- a/lib_dec/ivas_mct_dec_fx.c +++ b/lib_dec/ivas_mct_dec_fx.c @@ -849,7 +849,11 @@ ivas_error ivas_mc_dec_config_fx( IF( st_ivas->ini_frame != 0 ) { test(); +#ifdef FIX_1052_EXT_OUTPUT + IF( NE_32( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->hDecoderConfig->ivas_total_brate ) || last_mc_mode != st_ivas->mc_mode ) +#else IF( NE_32( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->hDecoderConfig->ivas_total_brate ) || st_ivas->transport_config != signaled_config || last_mc_mode != st_ivas->mc_mode ) +#endif { IF( st_ivas->hRenderConfig ) { diff --git a/lib_dec/ivas_out_setup_conversion_fx.c b/lib_dec/ivas_out_setup_conversion_fx.c index bc96bf46c537fdf2b13e514c86046b8ebb7c4d52..05226af32dfa4811b67cdba46b585912c1e072e6 100644 --- a/lib_dec/ivas_out_setup_conversion_fx.c +++ b/lib_dec/ivas_out_setup_conversion_fx.c @@ -276,9 +276,6 @@ static ivas_error get_ls_conversion_matrix_fx( Word16 index; Word32 value; const LS_CONVERSION_MATRIX_FX *conversion_matrix_fx; - ivas_error error; - - error = IVAS_ERR_OK; conversion_matrix_fx = NULL; @@ -319,7 +316,7 @@ static ivas_error get_ls_conversion_matrix_fx( } } } - return error; + return IVAS_ERR_OK; } ELSE { @@ -333,7 +330,7 @@ static ivas_error get_ls_conversion_matrix_fx( hLsSetUpConversion->dmxMtx_fx[k][k] = ONE_IN_Q30; move32(); } - return error; + return IVAS_ERR_OK; } ELSE { @@ -360,13 +357,15 @@ static ivas_error get_ls_conversion_matrix_fx( move32(); } } - return error; + return IVAS_ERR_OK; } } } return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "The conversion matrix between these formats is not defined!\n" ); } + + /*------------------------------------------------------------------------- * ivas_ls_setup_conversion_open() * @@ -381,8 +380,10 @@ ivas_error ivas_ls_setup_conversion_open_fx( Word16 chIdx, inChannels, outChannels; Word16 output_frame; Word32 output_Fs; - Word16 nchan_out; Word16 paramUpmixMonoStereo; +#ifdef FIX_1052_EXT_OUTPUT + ivas_error error; +#endif test(); test(); @@ -399,7 +400,7 @@ ivas_error ivas_ls_setup_conversion_open_fx( } output_Fs = st_ivas->hDecoderConfig->output_Fs; move32(); - nchan_out = st_ivas->hDecoderConfig->nchan_out; + outChannels = st_ivas->hDecoderConfig->nchan_out; move16(); output_frame = (Word16) ( output_Fs / FRAMES_PER_SEC ); @@ -409,10 +410,8 @@ ivas_error ivas_ls_setup_conversion_open_fx( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LS configuration Conversion Handle \n" ) ); } - assert( LE_16( nchan_out, MAX_OUTPUT_CHANNELS ) ); + assert( LE_16( outChannels, MAX_OUTPUT_CHANNELS ) ); - outChannels = nchan_out; - move16(); IF( EQ_32( st_ivas->renderer_type, RENDERER_MC_PARAMMC ) ) { inChannels = add( st_ivas->hTransSetup.nchan_out_woLFE, st_ivas->hTransSetup.num_lfe ); @@ -511,16 +510,37 @@ ivas_error ivas_ls_setup_conversion_open_fx( { IF( EQ_16( paramUpmixMonoStereo, TRUE ) ) { +#ifdef FIX_1052_EXT_OUTPUT + IF( ( error = get_ls_conversion_matrix_fx( hLsSetUpConversion, IVAS_AUDIO_CONFIG_5_1_2, st_ivas->hDecoderConfig->output_config ) ) != IVAS_ERR_OK ) + { + return error; + } +#else get_ls_conversion_matrix_fx( hLsSetUpConversion, IVAS_AUDIO_CONFIG_5_1_2, st_ivas->hDecoderConfig->output_config ); +#endif } ELSE { +#ifdef FIX_1052_EXT_OUTPUT + IF( ( error = get_ls_conversion_matrix_fx( hLsSetUpConversion, st_ivas->transport_config, st_ivas->hDecoderConfig->output_config ) ) != IVAS_ERR_OK ) + { + return error; + } +#else get_ls_conversion_matrix_fx( hLsSetUpConversion, st_ivas->transport_config, st_ivas->hDecoderConfig->output_config ); +#endif } } ELSE { +#ifdef FIX_1052_EXT_OUTPUT + IF( ( error = get_ls_conversion_matrix_fx( hLsSetUpConversion, st_ivas->intern_config, st_ivas->hDecoderConfig->output_config ) ) != IVAS_ERR_OK ) + { + return error; + } +#else get_ls_conversion_matrix_fx( hLsSetUpConversion, st_ivas->intern_config, st_ivas->hDecoderConfig->output_config ); +#endif } } @@ -761,9 +781,7 @@ void ivas_ls_setup_conversion_process_mdct_fx( move32(); test(); - IF( - NE_16( chInIdx, LFE_CHANNEL ) && - NE_16( mct_chan_mode[chInIdx], MCT_CHAN_MODE_IGNORE ) ) + IF( NE_16( chInIdx, LFE_CHANNEL ) && NE_16( mct_chan_mode[chInIdx], MCT_CHAN_MODE_IGNORE ) ) { /* Step 1: Compute the target energy and DMX signal (possible since we have all signals in TCX20 resolution) */ IF( dmxCoeff ) @@ -911,9 +929,7 @@ void ivas_ls_setup_conversion_process_mdct_fx( FOR( chInIdx = 0; chInIdx < inChannels; chInIdx++ ) { test(); - IF( - NE_16( chInIdx, LFE_CHANNEL ) && - NE_16( mct_chan_mode[chInIdx], MCT_CHAN_MODE_IGNORE ) ) + IF( NE_16( chInIdx, LFE_CHANNEL ) && NE_16( mct_chan_mode[chInIdx], MCT_CHAN_MODE_IGNORE ) ) { IF( EQ_16( transform_type[chInIdx][0], TCX_20 ) ) { diff --git a/lib_dec/ivas_output_config_fx.c b/lib_dec/ivas_output_config_fx.c index c5a01180d1cde7832e64b28d8d246052488ae96f..de1066cd51a49bbd3dd69d7e3e43d3121b1ca469 100644 --- a/lib_dec/ivas_output_config_fx.c +++ b/lib_dec/ivas_output_config_fx.c @@ -278,7 +278,12 @@ void ivas_renderer_select( ELSE IF( EQ_32( st_ivas->ivas_format, STEREO_FORMAT ) ) { test(); +#ifdef FIX_1052_EXT_OUTPUT + test(); + IF( NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else IF( NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) ) +#endif { *renderer_type = RENDERER_MC; move16(); @@ -505,8 +510,14 @@ void ivas_renderer_select( { *internal_config = transport_config; move16(); + + test(); +#ifdef FIX_1052_EXT_OUTPUT test(); + IF( EQ_32( st_ivas->mc_mode, MC_MODE_MCT ) && NE_32( *internal_config, output_config ) && NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else IF( EQ_32( st_ivas->mc_mode, MC_MODE_MCT ) && NE_32( *internal_config, output_config ) ) +#endif { test(); test(); @@ -525,7 +536,13 @@ void ivas_renderer_select( { *internal_config = transport_config; move16(); + +#ifdef FIX_1052_EXT_OUTPUT + test(); + IF( NE_32( *internal_config, output_config ) && NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else IF( NE_32( *internal_config, output_config ) ) +#endif { test(); test(); @@ -557,8 +574,16 @@ void ivas_renderer_select( } ELSE IF( EQ_32( st_ivas->mc_mode, MC_MODE_MCMASA ) ) { +#ifdef FIX_1052_EXT_OUTPUT + if ( NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) + { + *internal_config = output_config; + move16(); + } +#else *internal_config = output_config; move16(); +#endif /* No rendering for 1TC to Mono or Stereo and 2TC to Stereo */ test(); diff --git a/lib_rend/ivas_output_init_fx.c b/lib_rend/ivas_output_init_fx.c index 5c19acb5fc00de4a18d30664cf1c7bfdc8a9734d..fba20ff701032afa686c4c165bf88ca0348631f0 100644 --- a/lib_rend/ivas_output_init_fx.c +++ b/lib_rend/ivas_output_init_fx.c @@ -449,7 +449,11 @@ Word16 ivas_get_nchan_buffers_dec( { nchan_out_buff = s_max( nchan_out_buff, add( st_ivas->hOutSetup.nchan_out_woLFE, st_ivas->hOutSetup.num_lfe ) ); } +#ifdef FIX_1052_EXT_OUTPUT + ELSE IF( NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) +#else ELSE +#endif { nchan_out_buff = s_max( audioCfg2channels( st_ivas->transport_config ), audioCfg2channels( st_ivas->intern_config ) ); nchan_out_buff = s_max( nchan_out_buff, audioCfg2channels( output_config ) );