Commit aacab870 authored by vaclav's avatar vaclav
Browse files

enable EXT output in MC format

parent d03b80a8
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1154,6 +1154,10 @@ ivas_error ivas_init_decoder(
        {
            hDecoderConfig->nchan_out = CPE_CHANNELS;
        }
        else if ( st_ivas->ivas_format == MC_FORMAT )
        {
            hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config );
        }
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
#else
        if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
@@ -1180,7 +1184,19 @@ ivas_error ivas_init_decoder(

    st_ivas->intern_config = output_config;

#ifdef FIX_1052_EXT_OUTPUT
    if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->ivas_format == MC_FORMAT )
    {
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->transport_config );
        st_ivas->intern_config = st_ivas->transport_config;
    }
    else
    {
        ivas_output_init( &( st_ivas->hOutSetup ), output_config );
    }
#else
    ivas_output_init( &( st_ivas->hOutSetup ), output_config );
#endif

    if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
    {
+4 −0
Original line number Diff line number Diff line
@@ -397,7 +397,11 @@ ivas_error ivas_masa_decode(

        hMasa->config.coherencePresent = !hQMetaData->all_coherence_zero;

#ifdef FIX_1052_EXT_OUTPUT
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) )
#else
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#endif
        {
            index_16bits( hQMetaData, hMasa->data.sph_grid16 );
        }
+4 −0
Original line number Diff line number Diff line
@@ -148,7 +148,11 @@ ivas_error ivas_param_mc_dec_open(
    hParamMC->hoa_encoder = NULL;

    /* determine the synthesis config */
#ifdef FIX_1052_EXT_OUTPUT
    if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD || st_ivas->transport_config == output_config || output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#else
    if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD || st_ivas->transport_config == output_config )
#endif
    {
        hParamMC->synthesis_conf = PARAM_MC_SYNTH_DIRECT;
    }
+13 −0
Original line number Diff line number Diff line
@@ -673,6 +673,15 @@ ivas_error ivas_mc_dec_config(
        {
            st_ivas->transport_config = signaled_config;
        }
#ifdef FIX_1052_EXT_OUTPUT
        else if ( st_ivas->transport_config != signaled_config )
        {
#ifdef DEBUGGING
            fprintf( stderr, "\nError: Switching of MC configurations is not supported!\n" );
#endif
            return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "wrong MC configuration signalled!" );
        }
#endif

        /* select MC format mode */
        st_ivas->mc_mode = ivas_mc_mode_select( ivas_mc_map_output_config_to_mc_ls_setup( signaled_config ), st_ivas->hDecoderConfig->ivas_total_brate );
@@ -680,7 +689,11 @@ ivas_error ivas_mc_dec_config(
        /* MC format switching */
        if ( st_ivas->ini_frame != 0 )
        {
#ifdef FIX_1052_EXT_OUTPUT
            if ( st_ivas->hDecoderConfig->last_ivas_total_brate != st_ivas->hDecoderConfig->ivas_total_brate || last_mc_mode != st_ivas->mc_mode )
#else
            if ( 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
            {
#ifdef SPLIT_REND_WITH_HEAD_ROT
                if ( ( error = ivas_mc_dec_reconfig( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
+11 −0
Original line number Diff line number Diff line
@@ -436,7 +436,11 @@ void ivas_renderer_select(
    else if ( st_ivas->ivas_format == MC_FORMAT )
    {
        *internal_config = transport_config;
#ifdef FIX_1052_EXT_OUTPUT
        if ( st_ivas->mc_mode == MC_MODE_MCT && *internal_config != output_config && output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
#else
        if ( st_ivas->mc_mode == MC_MODE_MCT && *internal_config != output_config )
#endif
        {
            if ( output_config != IVAS_AUDIO_CONFIG_FOA && output_config != IVAS_AUDIO_CONFIG_HOA2 && output_config != IVAS_AUDIO_CONFIG_HOA3 )
            {
@@ -475,7 +479,14 @@ void ivas_renderer_select(
        }
        else if ( st_ivas->mc_mode == MC_MODE_MCMASA )
        {
#ifdef FIX_1052_EXT_OUTPUT
            if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
            {
                *internal_config = output_config;
            }
#else
            *internal_config = output_config;
#endif

            /* No rendering for 1TC to Mono or Stereo and 2TC to Stereo */
            if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO )
Loading