Commit 18801a18 authored by bayers's avatar bayers
Browse files

another fix for ISM bitrate switching, get the correct number of old CLDFB instances

parent 98a326b7
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static ivas_error ivas_ism_bitrate_switching(
    int32_t element_brate_tmp[MAX_NUM_OBJECTS];
    int16_t nSCE_old, nCPE_old;
#ifdef FIX_416_ISM_BR_SWITCHING
    int16_t numCldfbAnalyses_old, numCldfbSyntheses_old;
    int16_t numCldfbAnalyses_old, numCldfbSyntheses_old, ism_mode;
#endif

    error = IVAS_ERR_OK;
@@ -65,7 +65,11 @@ static ivas_error ivas_ism_bitrate_switching(
    nSCE_old = st_ivas->nSCE;

#ifdef FIX_416_ISM_BR_SWITCHING
    /* we have to temporarily set the ism mode back to the old one, otherwise this can give wrong results*/
    ism_mode = st_ivas->ism_mode;
    st_ivas->ism_mode = last_ism_mode;
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
    st_ivas->ism_mode = ism_mode;
#endif

    if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK )