Commit 9b628f5a authored by multrus's avatar multrus
Browse files

fix crashes

parent 3d99fac3
Loading
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -897,7 +897,13 @@ ivas_error ivas_dec(
            }
        }
#endif
        else /*EXT output = individual objects + HOA3*/
#ifdef SBA_AND_OBJECTS
        else if ( st_ivas->renderer_type == RENDERER_DIRAC && !st_ivas->sba_dirac_stereo_flag && nchan_out != 1 )
        {
            ivas_sba_upmixer_renderer( st_ivas, output, output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */
        }
#endif
        else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/
        {
#ifdef SBA_AND_OBJECTS
            if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
+4 −0
Original line number Diff line number Diff line
@@ -2116,7 +2116,11 @@ void ivas_dirac_dec_render_sf(
        }

        /* CNG in DirAC, extra CLDFB ana for CNA*/
#ifdef SBA_AND_OBJECTS
        if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && !(st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT) )
#else
        if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->ivas_format != SBA_FORMAT )
#endif
        {
            Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0];

+29 −2
Original line number Diff line number Diff line
@@ -2733,9 +2733,16 @@ void ivas_init_dec_get_num_cldfb_instances(
    int16_t *numCldfbSyntheses /* o  : number of needed CLDFB synthesis instances */
)
{
#ifdef SBA_AND_OBJECTS
    IVAS_FORMAT ivas_format;
#endif
    *numCldfbAnalyses = st_ivas->nchan_transport;
    *numCldfbSyntheses = st_ivas->hDecoderConfig->nchan_out;

#ifdef SBA_AND_OBJECTS
    ivas_format = ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_NONE ) ? SBA_FORMAT : st_ivas->ivas_format; /* treat ISM_SBA_MODE_NONE just like SBA_FORMAT */
#endif

    switch ( st_ivas->renderer_type )
    {
        case RENDERER_BINAURAL_PARAMETRIC:
@@ -2752,7 +2759,7 @@ void ivas_init_dec_get_num_cldfb_instances(
                *numCldfbAnalyses = st_ivas->nchan_transport + 1;
            }
#ifdef SBA_AND_OBJECTS
            if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
            if ( ivas_format == SBA_ISM_FORMAT )
            {
                if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
                {
@@ -2761,7 +2768,11 @@ void ivas_init_dec_get_num_cldfb_instances(
            }
#endif

#ifdef SBA_AND_OBJECTS
            if ( ivas_format == MASA_ISM_FORMAT )
#else
            if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
#endif
            {
                if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
                {
@@ -2783,7 +2794,11 @@ void ivas_init_dec_get_num_cldfb_instances(
            break;
        case RENDERER_NON_DIEGETIC_DOWNMIX:
        case RENDERER_MONO_DOWNMIX:
#ifdef SBA_AND_OBJECTS
            if ( ivas_format == ISM_FORMAT || ivas_format == MASA_ISM_FORMAT )
#else
            if ( st_ivas->ivas_format == ISM_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT )
#endif
            {
                /* CLDFB not used in rendering */
                *numCldfbAnalyses = 0;
@@ -2811,7 +2826,11 @@ void ivas_init_dec_get_num_cldfb_instances(
            break;
        case RENDERER_NON_DIEGETIC_DOWNMIX:
        case RENDERER_MONO_DOWNMIX:
#ifdef SBA_AND_OBJECTS
            if ( ivas_format == ISM_FORMAT )
#else
            if ( st_ivas->ivas_format == ISM_FORMAT )
#endif
            {
                /* CLDFB not used in rendering */
                *numCldfbAnalyses = 0;
@@ -2820,7 +2839,11 @@ void ivas_init_dec_get_num_cldfb_instances(
            break;
#endif
        case RENDERER_DIRAC:
#ifdef SBA_AND_OBJECTS
            if ( ivas_format == SBA_FORMAT )
#else
            if ( st_ivas->ivas_format == SBA_FORMAT )
#endif
            {
                *numCldfbAnalyses = st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans;

@@ -2837,7 +2860,11 @@ void ivas_init_dec_get_num_cldfb_instances(
                    *numCldfbSyntheses = MAX_OUTPUT_CHANNELS;
                }
            }
#ifdef SBA_AND_OBJECTS
            if ( ivas_format != SBA_FORMAT )
#else
            if ( st_ivas->ivas_format != SBA_FORMAT )
#endif
            {
                if ( st_ivas->nchan_transport > 2 && st_ivas->sba_planar )
                {
@@ -2888,7 +2915,7 @@ void ivas_init_dec_get_num_cldfb_instances(
        case RENDERER_OSBA_LS:
#endif
#ifdef SBA_AND_OBJECTS
            if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT )
            if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT )
#else
            if ( st_ivas->ivas_format == SBA_FORMAT )
#endif
+1 −1
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ void ivas_renderer_select(
        }
#ifdef SBA_AND_OBJECTS
        else if ( ( ivas_format == MASA_FORMAT && output_config == AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) ||
                  ( ivas_format == SBA_FORMAT && ( output_config == AUDIO_CONFIG_STEREO || ( output_config == AUDIO_CONFIG_MONO && !(st_ivas->ivas_format == SBA_ISM_FORMAT) ) ) ) )
                  ( ivas_format == SBA_FORMAT && ( output_config == AUDIO_CONFIG_STEREO || output_config == AUDIO_CONFIG_MONO ) ) )
#else
        else if ( ( st_ivas->ivas_format == MASA_FORMAT && output_config == AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) ||
                  ( st_ivas->ivas_format == SBA_FORMAT && ( output_config == AUDIO_CONFIG_STEREO || output_config == AUDIO_CONFIG_MONO ) ) )