Commit c63ab21b authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept NONBE_FIX_1220_OMASA_JBM_EXT_USAN

parent 7a67a85d
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -167,7 +167,6 @@
#define NONBE_1302_FIX_OMASA_JBM_FLUSH                  /* VA: issue 1302: fix OMASA JBM bitrate switching flush in binaural output */
#define NONBE_1302_FIX_OMASA_JBM_FLUSH                  /* VA: issue 1302: fix OMASA JBM bitrate switching flush in binaural output */
#define FIX_1319_STACK_SBA_DECODER                      /* VA: issue 1319: Optimize the definition of buffer lengths in the SBA decoder */
#define FIX_1319_STACK_SBA_DECODER                      /* VA: issue 1319: Optimize the definition of buffer lengths in the SBA decoder */
#define NONBE_FIX_1261_MASA_EXT_META_JBM                /* Nokia: issue #1261: MASA metadata EXT output delay buffer init in JBM */
#define NONBE_FIX_1261_MASA_EXT_META_JBM                /* Nokia: issue #1261: MASA metadata EXT output delay buffer init in JBM */
#define NONBE_FIX_1220_OMASA_JBM_EXT_USAN               /* Nokia: fix issue 1220 OMASA EXT JBM USAN, also fix similar cases of free to avoid future problems */
#define NONBE_FIX_1376_MDCT_CONCEALMENT                 /* FhG: fix concealment artifact in MDCT Stereo with DTX, in case transition frame gets lost */
#define NONBE_FIX_1376_MDCT_CONCEALMENT                 /* FhG: fix concealment artifact in MDCT Stereo with DTX, in case transition frame gets lost */
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */
#define FIX_1377_HANDLE_ERROR_CODE                      /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */
#define FIX_1377_HANDLE_ERROR_CODE                      /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */
+0 −18
Original line number Original line Diff line number Diff line
@@ -1337,12 +1337,8 @@ ivas_error ivas_masa_dec_reconfigure(
    ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
    ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
    last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate;
    last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate;


#ifdef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
    /* Copy state to TC buffer if granularity matches and we are not in OMASA EXT rendering mode */
    /* Copy state to TC buffer if granularity matches and we are not in OMASA EXT rendering mode */
    if ( st_ivas->hSpatParamRendCom != NULL && st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
    if ( st_ivas->hSpatParamRendCom != NULL && st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
#else
    if ( st_ivas->hSpatParamRendCom != NULL && st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity )
#endif
    {
    {
        mvs2s( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS );
        mvs2s( st_ivas->hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS );
        st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes;
        st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpatParamRendCom->nb_subframes;
@@ -1363,7 +1359,6 @@ ivas_error ivas_masa_dec_reconfigure(
            return error;
            return error;
        }
        }
    }
    }
#ifdef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
    else if ( st_ivas->renderer_type == RENDERER_DISABLE || st_ivas->renderer_type == RENDERER_MONO_DOWNMIX || st_ivas->renderer_type == RENDERER_OMASA_MIX_EXT )
    else if ( st_ivas->renderer_type == RENDERER_DISABLE || st_ivas->renderer_type == RENDERER_MONO_DOWNMIX || st_ivas->renderer_type == RENDERER_OMASA_MIX_EXT )
    {
    {
        /* close all unnecessary parametric decoding and rendering */
        /* close all unnecessary parametric decoding and rendering */
@@ -1372,19 +1367,6 @@ ivas_error ivas_masa_dec_reconfigure(
        ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
        ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
        ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
        ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
    }
    }
#else
    else if ( st_ivas->renderer_type == RENDERER_DISABLE || st_ivas->renderer_type == RENDERER_MONO_DOWNMIX )
    {
        if ( st_ivas->hDirAC != NULL )
        {
            /* close all unnecessary parametric decoding and rendering */
            ivas_dirac_dec_close_binaural_data( st_ivas->hDiracDecBin );
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
            ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
        }
    }
#endif
    /* possible reconfigure is done later */
    /* possible reconfigure is done later */


    /*-----------------------------------------------------------------*
    /*-----------------------------------------------------------------*
+0 −18
Original line number Original line Diff line number Diff line
@@ -837,17 +837,10 @@ static ivas_error ivas_mc_dec_reconfig(
            ivas_masa_dec_close( &( st_ivas->hMasa ) );
            ivas_masa_dec_close( &( st_ivas->hMasa ) );
            ivas_qmetadata_close( &st_ivas->hQMetaData );
            ivas_qmetadata_close( &st_ivas->hQMetaData );


#ifndef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
            if ( st_ivas->hDirAC != NULL )
            {
#endif
                ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
                ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
                ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
                ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
                ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
                ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
                vbap_free_data( &( st_ivas->hVBAPdata ) );
                vbap_free_data( &( st_ivas->hVBAPdata ) );
#ifndef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
            }
#endif


            /* init LS conversion if the renderer type asks for it */
            /* init LS conversion if the renderer type asks for it */
            if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hLsSetUpConversion == NULL )
            if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hLsSetUpConversion == NULL )
@@ -927,18 +920,11 @@ static ivas_error ivas_mc_dec_reconfig(
        ivas_masa_dec_close( &( st_ivas->hMasa ) );
        ivas_masa_dec_close( &( st_ivas->hMasa ) );
        ivas_qmetadata_close( &st_ivas->hQMetaData );
        ivas_qmetadata_close( &st_ivas->hQMetaData );


#ifndef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
        if ( st_ivas->hDirAC != NULL )
        {
#endif
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
            ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
            ivas_dirac_dec_close( &( st_ivas->hDirAC ) );


            vbap_free_data( &( st_ivas->hVBAPdata ) );
            vbap_free_data( &( st_ivas->hVBAPdata ) );
#ifndef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
        }
#endif


        if ( last_mc_mode == MC_MODE_MCT )
        if ( last_mc_mode == MC_MODE_MCT )
        {
        {
@@ -1138,11 +1124,7 @@ static ivas_error ivas_mc_dec_reconfig(
                }
                }
            }
            }
        }
        }
#ifdef NONBE_FIX_1220_OMASA_JBM_EXT_USAN
        else if ( st_ivas->renderer_type == RENDERER_DISABLE )
        else if ( st_ivas->renderer_type == RENDERER_DISABLE )
#else
        else if ( st_ivas->renderer_type == RENDERER_DISABLE && st_ivas->hDirAC != NULL )
#endif
        {
        {
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
            ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );