Commit 855b3826 authored by bayers's avatar bayers
Browse files

fix for #1070, fix missing conversion to HOA3 and correct pointers for RS...

fix for #1070, fix missing conversion to HOA3 and correct pointers for RS flushing for MCT with BINAURAL_ROOM_REVERB and JBM, remove unnecessary change of number of TC buffer channels
parent a9bae169
Loading
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -1665,14 +1665,37 @@ ivas_error ivas_jbm_dec_flush_renderer(
        {
            if ( mc_mode_old == MC_MODE_MCT )
            {
#ifdef FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT
                int16_t crendInPlaceRotation = FALSE;

                if ( st_ivas->transport_config != intern_config_old && ( intern_config_old == IVAS_AUDIO_CONFIG_FOA || intern_config_old == IVAS_AUDIO_CONFIG_HOA2 || intern_config_old == IVAS_AUDIO_CONFIG_HOA3 ) )
                {
                    if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) < ( hIntSetupOld->nchan_out_woLFE + hIntSetupOld->num_lfe ) )
                    {
                        crendInPlaceRotation = TRUE;
                        ivas_mc2sba( st_ivas->hTransSetup, hTcBuffer->tc, p_output, hTcBuffer->n_samples_granularity, hIntSetupOld->ambisonics_order, GAIN_LFE );
                    }
                }
#endif
                if ( renderer_type_old == RENDERER_BINAURAL_MIXER_CONV || renderer_type_old == RENDERER_BINAURAL_MIXER_CONV_ROOM )
                {
#ifdef FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT
#if defined SPLIT_REND_WITH_HEAD_ROT
                    if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, intern_config_old, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                   hIntSetupOld, st_ivas->hEFAPdata, st_ivas->hTcBuffer, crendInPlaceRotation ? p_output : st_ivas->hTcBuffer->tc, p_output, hTcBuffer->n_samples_granularity, st_ivas->hDecoderConfig->output_Fs, 0 ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, intern_config_old, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                   hIntSetupOld, st_ivas->hEFAPdata, st_ivas->hTcBuffer, crendInPlaceRotation ? p_output : st_ivas->hTcBuffer->tc, p_output, hTcBuffer->n_samples_granularity, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )

#endif
#else
#if defined SPLIT_REND_WITH_HEAD_ROT
                    if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, intern_config_old, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                   hIntSetupOld, st_ivas->hEFAPdata, st_ivas->hTcBuffer, hTcBuffer->tc, p_output, hTcBuffer->n_samples_granularity, st_ivas->hDecoderConfig->output_Fs, 0 ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, intern_config_old, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                   hIntSetupOld, st_ivas->hEFAPdata, st_ivas->hTcBuffer, hTcBuffer->tc, p_output, hTcBuffer->n_samples_granularity, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
#endif
#endif
                    {
                        return error;
+0 −7
Original line number Diff line number Diff line
@@ -1344,13 +1344,6 @@ static ivas_error ivas_mc_dec_reconfig(
            tc_nchan_full_new = tc_nchan_allocate_new;
        }

#ifdef FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT
        if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && st_ivas->hDecoderConfig->Opt_Headrotation )
        {
            tc_nchan_allocate_new = HOA3_CHANNELS;
            tc_nchan_full_new = tc_nchan_allocate_new;
        }
#endif
        if ( st_ivas->mc_mode == MC_MODE_PARAMMC && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO )
        {
            tc_nchan_full_new = 0;