Commit 66fbb204 authored by bayers's avatar bayers
Browse files

fixed several bugs, mainly for SBA JBM, ISM JBM

parent 4793a158
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -518,6 +518,9 @@
    <ClCompile Include="..\lib_dec\ivas_ism_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_jbm_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_dec\jbm_jb4_inputbuffer.h">
+1 −1
Original line number Diff line number Diff line
@@ -411,7 +411,7 @@ ivas_error ivas_dec(
                ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame );
            }
#ifdef JBM_TSM_ON_TCS
            else if ( st_ivas->sba_mode == SBA_MODE_SPAR )
            else if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->renderer_type != RENDERER_DISABLE )
            {
                ivas_spar_dec_agc_pca( st_ivas, output, output_frame );
            }
+2 −2
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ static ivas_error ivas_ism_bitrate_switching(
    if ( st_ivas->hDecoderConfig->voip_active )
    {
        /* transfer subframe info from DirAC or ParamMC to central tc buffer */
        if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hDirAC != NULL )
        if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hDirAC != NULL && (st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE) )
        {
            st_ivas->hTcBuffer->nb_subframes = st_ivas->hDirAC->nb_subframes;
            st_ivas->hTcBuffer->subframes_rendered = st_ivas->hDirAC->subframes_rendered;
@@ -311,7 +311,7 @@ static ivas_error ivas_ism_bitrate_switching(
            tc_nchan_allocate_new = 2 * BINAURAL_CHANNELS;
            tc_nchan_full_new = tc_nchan_allocate_new;
        }
        if ( st_ivas->ism_mode == ISM_MODE_PARAM )
        if ( st_ivas->ism_mode == ISM_MODE_PARAM && (st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE) )
        {
            tc_nchan_full_new = 0;
        }
+23 −16
Original line number Diff line number Diff line
@@ -795,9 +795,12 @@ ivas_error ivas_param_ism_dec_open(
    st_ivas->hISMDTX.dtx_flag = 0;

    st_ivas->hDirAC = hDirAC;

    hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL;
    hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL;
#ifdef JBM_TSM_ON_TCS
    if ( st_ivas->hDecoderConfig->voip_active && st_ivas->renderer_type != RENDERER_MONO_DOWNMIX )
    if ( st_ivas->hDecoderConfig->voip_active && st_ivas->hTcBuffer == NULL )
    {
        if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE )
        {
            int16_t nchan_transport = st_ivas->nchan_transport;
            hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) );
@@ -814,8 +817,12 @@ ivas_error ivas_param_ism_dec_open(
        }
        else 
        {
        hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL;
        hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL;
            int16_t nchan_to_allocate = st_ivas->hDecoderConfig->nchan_out;
            if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_BUFFER, nchan_to_allocate, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
    }
#endif

+0 −2
Original line number Diff line number Diff line
@@ -478,9 +478,7 @@ ivas_error ivas_jbm_dec_tc(
    if ( !st_ivas->bfi ) /* do not update if first frame(s) are lost or NO_DATA */
    {
        st_ivas->hDecoderConfig->last_ivas_total_brate = ivas_total_brate;
#ifdef SBA_BR_SWITCHING
        st_ivas->last_active_ivas_total_brate = ( ivas_total_brate <= IVAS_SID_5k2 ) ? st_ivas->last_active_ivas_total_brate : ivas_total_brate;
#endif
    }

    if ( st_ivas->ini_frame < MAX_FRAME_COUNTER && !( st_ivas->bfi && st_ivas->ini_frame == 0 ) ) /* keep "st_ivas->ini_frame = 0" until first good received frame */
Loading