Commit 009aa8ee authored by eichenseer's avatar eichenseer
Browse files

Re-add hDirAC to ivas_param_ism_dec_open(): must be initialized for ivas_dirac_dec_set_md_map().

parent 4c758550
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2022,6 +2022,7 @@ ivas_error ivas_param_ism_dec_open(
)
{
    int16_t i;
    DIRAC_DEC_HANDLE hDirAC;
    PARAM_ISM_DEC_HANDLE hParamIsmDec;
    IVAS_OUTPUT_SETUP hOutSetup;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
@@ -2037,6 +2038,11 @@ ivas_error ivas_param_ism_dec_open(
     * prepare library opening
     *-----------------------------------------------------------------*/

    if ( ( hDirAC = (DIRAC_DEC_HANDLE) malloc( sizeof( DIRAC_DEC_DATA ) ) ) == NULL )
    {
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) );
    }

    if ( ( hParamIsmDec = (PARAM_ISM_DEC_HANDLE) malloc( sizeof( PARAM_ISM_DEC_DATA ) ) ) == NULL )
    {
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ParamISM\n" ) );
@@ -2068,6 +2074,7 @@ ivas_error ivas_param_ism_dec_open(
     *-----------------------------------------------------------------*/

    hSpatParamRendCom->slot_size = (int16_t) ( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX );
    hDirAC->hConfig = NULL;
    set_s( hSpatParamRendCom->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS );
    set_s( hSpatParamRendCom->subframe_nbslots, JBM_CLDFB_SLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS );
    hSpatParamRendCom->nb_subframes = DEFAULT_JBM_SUBFRAMES_5MS;
@@ -2143,6 +2150,7 @@ ivas_error ivas_param_ism_dec_open(
    hSpatParamRendCom->dirac_md_buffer_length = MAX_PARAM_SPATIAL_SUBFRAMES;
    hSpatParamRendCom->dirac_bs_md_write_idx = 0;
    hSpatParamRendCom->dirac_read_idx = 0;
    hDirAC->spar_to_dirac_write_idx = 0;

#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
    if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
@@ -2164,6 +2172,7 @@ ivas_error ivas_param_ism_dec_open(
    st_ivas->hISMDTX.dtx_flag = 0;

    st_ivas->hParamIsmDec = hParamIsmDec;
    st_ivas->hDirAC = hDirAC;
    st_ivas->hSpatParamRendCom = hSpatParamRendCom;

    if ( st_ivas->hDecoderConfig->Opt_5ms )