Commit 82b4f423 authored by bayers's avatar bayers
Browse files

Merge branch...

Merge branch '416-ism-bitrate-switching-broken-missing-cldfbs-when-not-starting-with-a-paramism-bitrate' into 'main'

[non-BE] Resolve "ISM bitrate switching broken"

See merge request !566
parents 25523cf8 041e769a
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -158,6 +158,13 @@

#define ERI_FDCNGVQ_LOW_ROM                             /* Eri: Contribution #31 Table ROM saving for IVAS FDCNG-VQ modes       */

#define FIX_401_DIRAC_RENDERER_META_READ_INDICES        /* Nokia: Issue 401: Fix metadata reading indices in DirAC renderer. */
#define FIX_406_IVAS_POSITION                           /* Eri: Issue 406: Unify IVAS_POSITION to use IVAS_VECTOR3 instead */
#define REND_DEBUGGING_REVISION                         /* VA: encapsulate rendering debugging options with DEBUGGING */
#define FIX_416_ISM_BR_SWITCHING                        /* FhG: add missing CLDFB reconfig to ISM BR switching */



/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+18 −0
Original line number Diff line number Diff line
@@ -55,12 +55,19 @@ static ivas_error ivas_ism_bitrate_switching(
    ivas_error error;
    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;
#endif

    error = IVAS_ERR_OK;

    nCPE_old = st_ivas->nCPE;
    nSCE_old = st_ivas->nSCE;

#ifdef FIX_416_ISM_BR_SWITCHING
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
#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 )
    {
        return error;
@@ -221,6 +228,17 @@ static ivas_error ivas_ism_bitrate_switching(
        }
    }

#ifdef FIX_416_ISM_BR_SWITCHING
    /*-----------------------------------------------------------------*
     * CLDFB instances
     *-----------------------------------------------------------------*/

    if ( ( error = ivas_cldfb_dec_reconfig( st_ivas, nchan_transport_old, numCldfbAnalyses_old, numCldfbSyntheses_old ) ) != IVAS_ERR_OK )
    {
        return error;
    }
#endif

    return error;
}