Commit 67d82c2a authored by PLAINSI's avatar PLAINSI
Browse files

Clang and msan fix

parent 31f625e1
Loading
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -1336,20 +1336,35 @@ ivas_error ivas_init_decoder(
            if ( ( st_ivas->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) )
            {
                granularity = NS2SA( output_Fs, CLDFB_SLOT_NS );

                n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );

                if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, MC_PARAMUPMIX_MAX_INPUT_CHANS, MC_PARAMUPMIX_MAX_INPUT_CHANS, granularity ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
            else
            {
                granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES );

                n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );

                if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
#else
            granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES );
#endif

            n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );

            if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -1486,7 +1486,7 @@ int16_t ivas_jbm_dec_get_num_tc_channels(
#ifdef JBM_PARAMUPMIX
        else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
        {
            num_tc = MC_PARAMUPMIX_MAX_INPUT_CHANS;
            num_tc = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS;
        }
#endif
        else if ( st_ivas->mc_mode == MC_MODE_MCMASA )
+9 −9
Original line number Diff line number Diff line
@@ -489,7 +489,7 @@ ivas_error ivas_mc_paramupmix_dec_open(

        buffer_mode = TC_BUFFER_MODE_RENDERER;
        nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas );
        nchan_to_allocate = nchan_tc;
        nchan_to_allocate = MC_PARAMUPMIX_MAX_INPUT_CHANS;
        if ( ( hMCParamUpmix->param_interpolator = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * sizeof( float ) ) ) == NULL )
        {
            return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for interpolator\n" ) );
@@ -503,7 +503,7 @@ ivas_error ivas_mc_paramupmix_dec_open(
        }
        else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
        {
            nchan_to_allocate = 2 * BINAURAL_CHANNELS;
            nchan_to_allocate = MC_PARAMUPMIX_MAX_INPUT_CHANS;
        }
        if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM )
        {