Commit 41922773 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

bitrate switching fixes, MASA ext renderer fixes, clean up

parent 775d29c2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -314,6 +314,12 @@ ivas_error ivas_dec(
#endif
);

#ifdef SPLIT_REND_WITH_HEAD_ROT
ivas_error ivas_dec_init_split_rend(
    Decoder_Struct *st_ivas /* i  : IVAS decoder structure      */
);
#endif

ivas_error ivas_dec_setup(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    uint16_t *nSamplesRendered,                                 /* o  : number of samples flushed from the previous frame (JBM) */
+1 −32
Original line number Diff line number Diff line
@@ -874,43 +874,12 @@ ivas_error ivas_dirac_dec_config(
        {
            if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC )
            {
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
                if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                     ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
                {
                    /* populate pMultiBinPoseData with the additional poses determined from the DoF */
                    ivas_renderSplitGetMultiBinPoseData(
                        &st_ivas->hRenderConfig->split_rend_config,
                        &st_ivas->splitBinRend.splitrend.multiBinPoseData,
                        st_ivas->hHeadTrackData->sr_pose_pred_axis );
                }
#endif
                if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                 ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
            {
                /* TODO: can we keep isRenderingInTd fixed? */
                ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec,
                                                      0,                                                                                       /* isRenderingInTd */
                                                      ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ); /* pcm_out */

                error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                                  &st_ivas->hRenderConfig->split_rend_config,
                                                  st_ivas->hDecoderConfig->output_Fs,
                                                  1,                                                                                       /* is_cldfb_in */
                                                  ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ); /* is_pcm_out */

                if ( error != IVAS_ERR_OK )
                {
                    return error;
                }
            }
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
            if ( st_ivas->hDiracDecBin[0] == NULL )
#else
+180 −122
Original line number Diff line number Diff line
@@ -53,7 +53,159 @@
static ivas_error ivas_read_format( Decoder_Struct *st_ivas, int16_t *num_bits_read );

static ivas_error doSanityChecks_IVAS( Decoder_Struct *st_ivas );
#ifdef SPLIT_REND_WITH_HEAD_ROT
static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas );
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
/*-------------------------------------------------------------------*
 * ivas_dec_reconfig_split_rend()
 *
 * IVAS decoder split rend reconfig
 *-------------------------------------------------------------------*/
static ivas_error ivas_dec_reconfig_split_rend(
    Decoder_Struct *st_ivas /* i  : IVAS decoder structure      */
)
{
    ivas_error error;
    int16_t cldfb_in, num_ch, ch, isCldfbNeeded, i, pcm_out;
    SPLIT_REND_WRAPPER *hSplitRendWrapper;
    CLDFB_TYPE cldfbMode;

    hSplitRendWrapper = &st_ivas->splitBinRend.splitrend;
    pcm_out = ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
    cldfb_in = 0;
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ||
         st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ||
         st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ||
         st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
    {
        cldfb_in = 1;
    }
    ivas_renderSplitGetMultiBinPoseData(
        &st_ivas->hRenderConfig->split_rend_config,
        &hSplitRendWrapper->multiBinPoseData,
        st_ivas->hHeadTrackData->sr_pose_pred_axis );

    isCldfbNeeded = 0;
    cldfbMode = CLDFB_ANALYSIS;
    if ( st_ivas->renderer_type != RENDERER_DISABLE )
    {
        if ( cldfb_in == 0 )
        {
            isCldfbNeeded = 1;
            cldfbMode = CLDFB_ANALYSIS;
        }
        else if ( st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && cldfb_in )
        {
            isCldfbNeeded = 1;
            cldfbMode = CLDFB_SYNTHESIS;
        }
        else if ( pcm_out && cldfb_in )
        {
            isCldfbNeeded = 1;
            cldfbMode = CLDFB_SYNTHESIS;
        }
    }

    if ( isCldfbNeeded == 1 && hSplitRendWrapper->hCldfbHandles == NULL )
    {
        if ( ( hSplitRendWrapper->hCldfbHandles = (CLDFB_HANDLES_WRAPPER_HANDLE) malloc( sizeof( CLDFB_HANDLES_WRAPPER ) ) ) == NULL )
        {
            return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CLDFB handles\n" ) );
        }

        num_ch = MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS;
        for ( ch = 0; ch < num_ch; ch++ )
        {
            hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL;
        }

        num_ch = hSplitRendWrapper->multiBinPoseData.num_poses * BINAURAL_CHANNELS;

        for ( ch = 0; ch < num_ch; ch++ )
        {
            if ( ( error = openCldfb( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ),
                                      cldfbMode,
                                      st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
            {
                return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not open CLDFB handles\n" ) );
            }
        }
    }
    else if ( isCldfbNeeded == 0 && hSplitRendWrapper->hCldfbHandles != NULL )
    {
        num_ch = MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS;
        for ( ch = 0; ch < num_ch; ch++ )
        {
            if ( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] != NULL )
            {
                deleteCldfb( &hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] );
                hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL;
            }
        }
        free( hSplitRendWrapper->hCldfbHandles );
        hSplitRendWrapper->hCldfbHandles = NULL;
    }

    if ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD )
    {
        for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i )
        {
            if ( hSplitRendWrapper->hTdRendHandles[i] != NULL )
            {
                hSplitRendWrapper->hTdRendHandles[i]->HrFiltSet_p = NULL;
                ivas_td_binaural_close( &hSplitRendWrapper->hTdRendHandles[i] );
            }
        }
    }

    return IVAS_ERR_OK;
}

/*-------------------------------------------------------------------*
 * ivas_dec_init_split_rend()
 *
 * IVAS decoder split rend init
 *-------------------------------------------------------------------*/
ivas_error ivas_dec_init_split_rend(
    Decoder_Struct *st_ivas /* i  : IVAS decoder structure      */
)
{
    ivas_error error;
    int16_t cldfb_in, pcm_out;

    pcm_out = ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
    cldfb_in = 0;
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ||
         st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ||
         st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ||
         st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
    {
        cldfb_in = 1;
    }
    ivas_renderSplitGetMultiBinPoseData(
        &st_ivas->hRenderConfig->split_rend_config,
        &st_ivas->splitBinRend.splitrend.multiBinPoseData,
        st_ivas->hHeadTrackData->sr_pose_pred_axis );
    if ( cldfb_in == 1 && ( st_ivas->splitBinRend.splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) )
    {
        if ( ( st_ivas->splitBinRend.hCldfbDataOut = (IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE) malloc( sizeof( IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA ) ) ) == NULL )
        {
            return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for cldfb data out buffer\n" ) );
        }
    }

    ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, ( cldfb_in == 0 ), pcm_out );

    error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                      &st_ivas->hRenderConfig->split_rend_config,
                                      st_ivas->hDecoderConfig->output_Fs,
                                      cldfb_in, pcm_out );

    return error;
}
#endif

/*-------------------------------------------------------------------*
 * ivas_dec_setup()
@@ -313,6 +465,17 @@ ivas_error ivas_dec_setup(
        }
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    /*-----------------------------------------------------------------*
     * reconfig split rendering as renderer might change after bitrate switching
     *-----------------------------------------------------------------*/
    if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
         ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
        ivas_dec_reconfig_split_rend( st_ivas );
    }
#endif

    /*-------------------------------------------------------------------*
     * Initialize decoder in the first good frame based on IVAS format
     * and number of transport channels
@@ -533,7 +696,6 @@ int16_t getNumChanSynthesis(
    return n;
}


/*-------------------------------------------------------------------*
 * copy_decoder_config()
 *
@@ -802,6 +964,21 @@ ivas_error ivas_init_decoder(
        }
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    /*-----------------------------------------------------------------*
     * Initialize split rendering
     *-----------------------------------------------------------------*/
    if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
         ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
        ivas_dec_init_split_rend( st_ivas );
    }
    else
    {
        st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses = 1;
    }
#endif

    /*-----------------------------------------------------------------*
     * Allocate and initialize SCE/CPE and other handles
     *-----------------------------------------------------------------*/
@@ -1280,62 +1457,16 @@ ivas_error ivas_init_decoder(
    /*-------------------------------------------------------------------*
     * Allocate and initialize rendering handles
     *--------------------------------------------------------------------*/

    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            ivas_renderSplitGetMultiBinPoseData(
                &st_ivas->hRenderConfig->split_rend_config,
                &st_ivas->splitBinRend.splitrend.multiBinPoseData,
                st_ivas->hHeadTrackData->sr_pose_pred_axis );
            if ( st_ivas->splitBinRend.splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE )
            {
                if ( ( st_ivas->splitBinRend.hCldfbDataOut = (IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE) malloc( sizeof( IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA ) ) ) == NULL )
                {
                    return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for cldfb data out buffer\n" ) );
                }
            }
        }
#endif
        if ( ( error = ivas_binRenderer_open( st_ivas ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, 0,
                                                  ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );

            error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                              &st_ivas->hRenderConfig->split_rend_config,
                                              hDecoderConfig->output_Fs,
                                              1, ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );

            if ( error != IVAS_ERR_OK )
            {
                return error;
            }
        }
#endif
    }
    /* ParamISM is handled separately from other common config */
    else if ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) )
    {
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            ivas_renderSplitGetMultiBinPoseData(
                &st_ivas->hRenderConfig->split_rend_config,
                &st_ivas->splitBinRend.splitrend.multiBinPoseData,
                st_ivas->hHeadTrackData->sr_pose_pred_axis );
        }
#endif
        if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC )
        {
            if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
@@ -1348,26 +1479,6 @@ ivas_error ivas_init_decoder(
        {
            return error;
        }
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
#ifdef FIX_SPLIT_REND_OPEN_ERROR_HANDLING
            error =
#endif
                ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                          &st_ivas->hRenderConfig->split_rend_config,
                                          hDecoderConfig->output_Fs,
                                          1, ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );

#ifdef FIX_SPLIT_REND_OPEN_ERROR_HANDLING
            if ( error != IVAS_ERR_OK )
            {
                return error;
            }
#endif
        }
#endif
    }
    else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
    {
@@ -1385,29 +1496,6 @@ ivas_error ivas_init_decoder(
            }
        }

#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, 1,
                                                  ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );

            ivas_renderSplitGetMultiBinPoseData(
                &st_ivas->hRenderConfig->split_rend_config,
                &st_ivas->splitBinRend.splitrend.multiBinPoseData,
                st_ivas->hHeadTrackData->sr_pose_pred_axis );

            error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                              &st_ivas->hRenderConfig->split_rend_config,
                                              hDecoderConfig->output_Fs, 0,
                                              ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );

            if ( error != IVAS_ERR_OK )
            {
                return error;
            }
        }
#endif
        if ( st_ivas->hDecoderConfig->voip_active )
        {
            granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES );
@@ -1443,41 +1531,11 @@ ivas_error ivas_init_decoder(
            }
        }

#ifdef SPLIT_REND_WITH_HEAD_ROT
        int16_t num_poses;
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            int16_t pcm_out;
            pcm_out = ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
            ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, 1,
                                                  pcm_out );

            ivas_renderSplitGetMultiBinPoseData(
                &st_ivas->hRenderConfig->split_rend_config,
                &st_ivas->splitBinRend.splitrend.multiBinPoseData,
                st_ivas->hHeadTrackData->sr_pose_pred_axis );

            error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                              &st_ivas->hRenderConfig->split_rend_config,
                                              hDecoderConfig->output_Fs, 0, pcm_out );
            if ( error != IVAS_ERR_OK )
            {
                return error;
            }
            num_poses = st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses;
        }
        else
        {
            num_poses = 1;
        }
#endif

        if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config,
                                            st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                            ,
                                            num_poses
                                            st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses
#endif
                                            ) ) != IVAS_ERR_OK )
        {
@@ -2049,7 +2107,7 @@ void ivas_destroy_dec(
    ivas_rend_closeCrend( &( st_ivas->hCrendWrapper )
#ifdef SPLIT_REND_WITH_HEAD_ROT
                              ,
                          1
                          st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses
#endif
    );

+12 −4
Original line number Diff line number Diff line
@@ -171,7 +171,11 @@ static ivas_error ivas_ism_bitrate_switching(
        /* Deallocate the ParamISM struct */
        ivas_param_ism_dec_close( &( st_ivas->hDirAC ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config );

        if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
             || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
        )
        {
            /* close the parametric binaural renderer */
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
@@ -226,7 +230,7 @@ static ivas_error ivas_ism_bitrate_switching(
            if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                ,
                                                1
                                                st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses
#endif
                                                ) ) != IVAS_ERR_OK )
            {
@@ -245,7 +249,11 @@ static ivas_error ivas_ism_bitrate_switching(
        {
            return error;
        }
        if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
             || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
        )
        {
            /* open the parametric binaural renderer */
            if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
@@ -308,7 +316,7 @@ static ivas_error ivas_ism_bitrate_switching(
            ivas_rend_closeCrend( &( st_ivas->hCrendWrapper )
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                      ,
                                  1
                                  st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses
#endif
            );
        }
+7 −3
Original line number Diff line number Diff line
@@ -1134,7 +1134,11 @@ static ivas_error ivas_mc_dec_reconfig(
        output_config = st_ivas->hDecoderConfig->output_config;

        /* binaural renderers*/
        if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
             || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
        )
        {
            /* remove unneeded binaural renderers */
            if ( st_ivas->hBinRenderer != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) )
@@ -1151,7 +1155,7 @@ static ivas_error ivas_mc_dec_reconfig(
                ivas_rend_closeCrend( &( st_ivas->hCrendWrapper )
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                          ,
                                      1
                                      st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses
#endif
                );
            }
@@ -1225,7 +1229,7 @@ static ivas_error ivas_mc_dec_reconfig(
                if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                    ,
                                                    1
                                                    st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses
#endif
                                                    ) ) != IVAS_ERR_OK )
                {
Loading