Commit 98d6a14e authored by vaclav's avatar vaclav
Browse files

fix

parent 658e473f
Loading
Loading
Loading
Loading
Loading
+30 −52
Original line number Diff line number Diff line
@@ -83,18 +83,15 @@ void ivas_renderer_select(
    if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
#ifdef FIX_1419_MONO_STEREO_UMX
        if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT )
        {
        if ( st_ivas->ivas_format == MONO_FORMAT )
        {
            *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX;
            *internal_config = IVAS_AUDIO_CONFIG_MONO;
        }
            else
        else if ( st_ivas->ivas_format == STEREO_FORMAT )
        {
                *renderer_type = RENDERER_DISABLE;
            *internal_config = IVAS_AUDIO_CONFIG_STEREO;
            }
            *renderer_type = RENDERER_DISABLE;
        }
        else if ( st_ivas->ivas_format == ISM_FORMAT )
#else
@@ -270,49 +267,30 @@ void ivas_renderer_select(
     *-----------------------------------------------------------------*/

#ifdef FIX_1419_MONO_STEREO_UMX
    else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT )
    else if ( st_ivas->ivas_format == MONO_FORMAT  )
    {
        *internal_config = ( st_ivas->ivas_format == MONO_FORMAT ) ? IVAS_AUDIO_CONFIG_MONO : IVAS_AUDIO_CONFIG_STEREO;
        *internal_config = MONO_FORMAT;

        switch ( output_config )
        {
            case IVAS_AUDIO_CONFIG_FOA:
            case IVAS_AUDIO_CONFIG_HOA2:
            case IVAS_AUDIO_CONFIG_HOA3:
                if ( st_ivas->ivas_format == MONO_FORMAT )
        if ( output_config == IVAS_AUDIO_CONFIG_STEREO || output_config == IVAS_AUDIO_CONFIG_FOA || output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_HOA3 )
        {
            *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX;
        }
                else
        else if( output_config == IVAS_AUDIO_CONFIG_5_1 || output_config == IVAS_AUDIO_CONFIG_5_1_2 || output_config == IVAS_AUDIO_CONFIG_5_1_4 || output_config == IVAS_AUDIO_CONFIG_7_1 || output_config == IVAS_AUDIO_CONFIG_7_1_4 || output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM )
        {
                    *renderer_type = RENDERER_SBA_LINEAR_ENC;
                }
                break;
            case IVAS_AUDIO_CONFIG_5_1:
            case IVAS_AUDIO_CONFIG_7_1:
            case IVAS_AUDIO_CONFIG_5_1_2:
            case IVAS_AUDIO_CONFIG_5_1_4:
            case IVAS_AUDIO_CONFIG_7_1_4:
            case IVAS_AUDIO_CONFIG_LS_CUSTOM:
                *renderer_type = RENDERER_MC;
                break;
            case IVAS_AUDIO_CONFIG_MONO:
                if ( st_ivas->ivas_format == STEREO_FORMAT )
                {
                    /* stereo to mono downmix */
            *renderer_type = RENDERER_MC;
        }
                break;
            case IVAS_AUDIO_CONFIG_STEREO:
                if ( st_ivas->ivas_format == MONO_FORMAT )
    }
    else if ( st_ivas->ivas_format == STEREO_FORMAT )
    {
                    /* mono to stereo upmix */
                    *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX;
        *internal_config = IVAS_AUDIO_CONFIG_STEREO;

        if ( output_config == IVAS_AUDIO_CONFIG_FOA || output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_HOA3 )
        {
            *renderer_type = RENDERER_SBA_LINEAR_ENC;
        }
                break;
            default:
                /* RENDERER_DISABLE already set by default */
                break;
        else if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_5_1 || output_config == IVAS_AUDIO_CONFIG_5_1_2 || output_config == IVAS_AUDIO_CONFIG_5_1_4 || output_config == IVAS_AUDIO_CONFIG_7_1 || output_config == IVAS_AUDIO_CONFIG_7_1_4 || output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM )
        {
            *renderer_type = RENDERER_MC;
        }
    }
#else