Commit 6de6409d authored by vaclav's avatar vaclav
Browse files

formatting, "const", harmonize flags related to the SR code.

parent 5514ac86
Loading
Loading
Loading
Loading
+20 −22
Original line number Diff line number Diff line
@@ -675,21 +675,21 @@ static int16_t get_cldfb_in_flag(
    const IVAS_AUDIO_CONFIG audioConfig,
    IVAS_RENDER_CONFIG_DATA *renderConfig )
{
    int16_t cldfb_in;
    int16_t cldfb_in_flag;

    cldfb_in = 0;
    cldfb_in_flag = 0;
    if ( renderConfig->split_rend_config.rendererSelection == IVAS_SPLIT_REND_RENDERER_SELECTION_FASTCONV )
    {
#ifdef DEBUGGING
        cldfb_in = 1;
        cldfb_in_flag = 1;
#endif
        if ( audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
        {
            cldfb_in = 1;
            cldfb_in_flag = 1;
        }
    }

    return cldfb_in;
    return cldfb_in_flag;
}


@@ -740,7 +740,7 @@ int main(
#ifdef SPLIT_REND_WITH_HEAD_ROT
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS];
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_INPUT_CHANNELS];
    int16_t cldfb_in, CLDFBframeSize_smpls;
    int16_t cldfb_in_flag, CLDFBframeSize_smpls;
    SplitRendBFIFileReader *splitRendBFIReader = NULL;
#endif
    Vector3PairFileReader *referenceVectorReader = NULL;
@@ -1026,7 +1026,7 @@ int main(

#ifdef SPLIT_REND_WITH_HEAD_ROT
    CLDFBframeSize_smpls = 0;
    cldfb_in = 0;
    cldfb_in_flag = 0;
#endif

    if ( args.renderConfigFilePath[0] != '\0' )
@@ -1097,7 +1097,7 @@ int main(
        if ( !is_split_post_rend_mode( &args ) )
        {
            CLDFBframeSize_smpls = frameSize_smpls * 2;
            cldfb_in = get_cldfb_in_flag( args.outConfig.audioConfig, &renderConfig );
            cldfb_in_flag = get_cldfb_in_flag( args.outConfig.audioConfig, &renderConfig );
        }
#endif
    }
@@ -1333,7 +1333,7 @@ int main(
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( cldfb_in )
    if ( cldfb_in_flag )
    {
        if ( ( error = IVAS_REND_openCldfb( cldfbAna, cldfbSyn, totalNumInChannels, numOutChannels, args.sampleRate ) ) != IVAS_ERR_OK )
        {
@@ -1389,7 +1389,7 @@ int main(
    inpInt16Buffer = malloc( inBufferSize * sizeof( int16_t ) );

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( cldfb_in == 0 )
    if ( cldfb_in_flag == 0 )
    {
        inFloatBuffer = malloc( inBufferSize * sizeof( float ) );
        inBuffer.config.numSamplesPerChannel = (int16_t) frameSize_smpls;
@@ -1405,11 +1405,11 @@ int main(
    }
    outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) );

    inBuffer.config.is_cldfb = cldfb_in;
    inBuffer.config.is_cldfb = cldfb_in_flag;
    inBuffer.config.numChannels = (int16_t) totalNumInChannels;
    inBuffer.data = inFloatBuffer;

    outBuffer.config.is_cldfb = cldfb_in;
    outBuffer.config.is_cldfb = cldfb_in_flag;
    outBuffer.config.numChannels = (int16_t) numOutChannels;
    outBuffer.data = outFloatBuffer;

@@ -1821,7 +1821,7 @@ int main(
        /* Convert from float to int and from packed to interleaved.
         * Values in outFloatBuffer are guaranteed to be within range INT16_MIN:INT16_MAX */
#ifdef SPLIT_REND_WITH_HEAD_ROT
        convertOutputBuffer( outFloatBuffer, outBuffer.config.numSamplesPerChannel, num_out_channels, outInt16Buffer, cldfb_in, cldfbSyn );
        convertOutputBuffer( outFloatBuffer, outBuffer.config.numSamplesPerChannel, num_out_channels, outInt16Buffer, cldfb_in_flag, cldfbSyn );
#else
        convertOutputBuffer( outFloatBuffer, outBuffer.config.numSamplesPerChannel, num_out_channels, outInt16Buffer );
#endif
@@ -2063,15 +2063,12 @@ int main(
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( cldfb_in )
    if ( cldfb_in_flag )
    {
        IVAS_REND_closeCldfb( cldfbAna, cldfbSyn );
    }

    if ( hSplitRendFileReadWrite != NULL )
    {
    split_rend_reader_writer_close( &hSplitRendFileReadWrite );
    }
#endif

    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
@@ -3805,7 +3802,7 @@ static void convertInputBuffer(
    float *floatBuffer
#ifdef SPLIT_REND_WITH_HEAD_ROT
    ,
    const int16_t cldfb_in,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbAna
#endif
)
@@ -3813,8 +3810,9 @@ static void convertInputBuffer(
    int16_t chnl, smpl, i;

    i = 0;

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( cldfb_in )
    if ( cldfb_in_flag )
    {
        int16_t slotIdx, numCldfbBands, numFloatPcmSamples;
        float fIn[IVAS_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];
@@ -3892,7 +3890,7 @@ static void convertOutputBuffer(
    int16_t *intBuffer
#ifdef SPLIT_REND_WITH_HEAD_ROT
    ,
    const int16_t cldfb_in,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn
#endif
)
@@ -3903,7 +3901,7 @@ static void convertOutputBuffer(
    i = 0;

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( cldfb_in )
    if ( cldfb_in_flag )
    {
        int16_t slotIdx, numCldfbBands, numPcmSamples, b;
        float fIn[IVAS_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];
+5 −4
Original line number Diff line number Diff line
@@ -367,6 +367,7 @@ typedef enum
#ifndef FIX_747_ISM_TODOS
#define BRATE_ISM_INACTIVE                      2450 /* CoreCoder bitrate in ISM inactive frames */
#endif
/* ISM modes */
typedef enum 
{
    ISM_MODE_NONE,
@@ -375,7 +376,7 @@ typedef enum
    ISM_MASA_MODE_MASA_ONE_OBJ,                 /* MASA ISM mode when one object is encoded separately and remainder using MASA parameters */
    ISM_MASA_MODE_PARAM_ONE_OBJ,                /* MASA ISM mode when one object is encoded separately and remainder using parametric object model */
    ISM_MASA_MODE_DISC,                         /* MASA ISM mode when all objects are encoded separarately */
    ISM_SBA_MODE_DISC                          /* MASA ISM mode when all objects are encoded separarately   */
    ISM_SBA_MODE_DISC                           /* SBA ISM mode when all objects are encoded separarately */
} ISM_MODE;


+4 −3
Original line number Diff line number Diff line
@@ -2427,11 +2427,12 @@ void ivas_dirac_dec_render_sf(
#endif

        /* Perform binaural rendering */
        ivas_binRenderer( st_ivas->hBinRenderer,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                          &st_ivas->hSplitBinRend.splitrend.multiBinPoseData,
        ivas_binRenderer( st_ivas->hBinRenderer, &st_ivas->hSplitBinRend.splitrend.multiBinPoseData, st_ivas->hCombinedOrientationData, subframe_idx, hSpatParamRendCom->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer );
#else
        ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, subframe_idx, hSpatParamRendCom->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer );
#endif
                          st_ivas->hCombinedOrientationData, subframe_idx, hSpatParamRendCom->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer );


#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
+51 −48
Original line number Diff line number Diff line
@@ -72,22 +72,22 @@ static ivas_error ivas_dec_reconfig_split_rend(
)
{
    ivas_error error;
    int16_t cldfb_in, num_ch, ch, isCldfbNeeded, i, pcm_out;
    int16_t cldfb_in_flag, num_ch, ch, isCldfbNeeded, i, pcm_out_flag;
    SPLIT_REND_WRAPPER *hSplitRendWrapper;
#ifndef OSBA_SPLIT_RENDERING
    CLDFB_TYPE cldfbMode;
#endif

    hSplitRendWrapper = &st_ivas->hSplitBinRend.splitrend;
    pcm_out = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
    cldfb_in = 0;
    pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
    cldfb_in_flag = 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;
        cldfb_in_flag = 1;
    }

    ivas_renderSplitGetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &hSplitRendWrapper->multiBinPoseData, st_ivas->hHeadTrackData->sr_pose_pred_axis );
@@ -98,26 +98,27 @@ static ivas_error ivas_dec_reconfig_split_rend(
#else
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
        cldfb_in = 0;
        cldfb_in_flag = 0;
    }
#endif

    if ( st_ivas->renderer_type != RENDERER_DISABLE )
    {
        if ( cldfb_in == 0 )
        if ( cldfb_in_flag == 0 )
        {
            isCldfbNeeded = 1;
#ifndef OSBA_SPLIT_RENDERING
            cldfbMode = CLDFB_ANALYSIS;
#endif
        }
        else if ( st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && cldfb_in )
        else if ( st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && cldfb_in_flag )
        {
            isCldfbNeeded = 1;
#ifndef OSBA_SPLIT_RENDERING
            cldfbMode = CLDFB_SYNTHESIS;
#endif
        }
        else if ( pcm_out && cldfb_in )
        else if ( pcm_out_flag && cldfb_in_flag )
        {
            isCldfbNeeded = 1;
#ifndef OSBA_SPLIT_RENDERING
@@ -143,13 +144,12 @@ static ivas_error ivas_dec_reconfig_split_rend(

        for ( ch = 0; ch < num_ch; ch++ )
        {
            if ( ( error = openCldfb( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ),
#ifndef OSBA_SPLIT_RENDERING
                                      cldfbMode,
            if ( ( error = openCldfb( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ), cldfbMode, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
#else
                                      CLDFB_ANALYSIS,
            if ( ( error = openCldfb( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ), CLDFB_ANALYSIS, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
#endif
                                      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" ) );
            }
@@ -158,9 +158,7 @@ static ivas_error ivas_dec_reconfig_split_rend(
#ifdef OSBA_SPLIT_RENDERING
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        {
            if ( ( error = openCldfb( &( hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] ),
                                      CLDFB_SYNTHESIS,
                                      st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
            if ( ( error = openCldfb( &( hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] ), CLDFB_SYNTHESIS, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -178,6 +176,7 @@ static ivas_error ivas_dec_reconfig_split_rend(
                hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL;
            }
        }

#ifdef OSBA_SPLIT_RENDERING
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        {
@@ -188,6 +187,7 @@ static ivas_error ivas_dec_reconfig_split_rend(
            }
        }
#endif

        free( hSplitRendWrapper->hCldfbHandles );
        hSplitRendWrapper->hCldfbHandles = NULL;
    }
@@ -224,22 +224,22 @@ static ivas_error ivas_dec_init_split_rend(
)
{
    ivas_error error;
    int16_t cldfb_in, pcm_out;
    int16_t cldfb_in_flag, pcm_out_flag;

    pcm_out = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
    cldfb_in = 0;
    pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
    cldfb_in_flag = 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;
        cldfb_in_flag = 1;
    }

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

    if ( cldfb_in == 1 && ( st_ivas->hSplitBinRend.splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) )
    if ( cldfb_in_flag == 1 && ( st_ivas->hSplitBinRend.splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) )
    {
        if ( ( st_ivas->hSplitBinRend.hCldfbDataOut = (IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE) malloc( sizeof( IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA ) ) ) == NULL )
        {
@@ -247,10 +247,7 @@ static ivas_error ivas_dec_init_split_rend(
        }
    }

    if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec,
                                                         &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms,
                                                         ( cldfb_in == 0 ),
                                                         pcm_out ) ) != IVAS_ERR_OK )
    if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, cldfb_in_flag, pcm_out_flag ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -258,11 +255,11 @@ static ivas_error ivas_dec_init_split_rend(
#ifdef OSBA_SPLIT_RENDERING
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
        cldfb_in = 0;
        cldfb_in_flag = 0;
    }
#endif

    error = ivas_split_renderer_open( &st_ivas->hSplitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in, pcm_out, st_ivas->hDecoderConfig->Opt_5ms );
    error = ivas_split_renderer_open( &st_ivas->hSplitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, st_ivas->hDecoderConfig->Opt_5ms );

    return error;
}
@@ -305,6 +302,9 @@ ivas_error ivas_dec_setup(

    ivas_read_format( st_ivas, &num_bits_read );

    /*-------------------------------------------------------------------*
     * Read other signling (ISM/MC mode, number of channels, etc.)
     *-------------------------------------------------------------------*/

    if ( is_DTXrate( ivas_total_brate ) == 0 )
    {
@@ -334,11 +334,11 @@ ivas_error ivas_dec_setup(

            st_ivas->nchan_ism = nchan_ism;

            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                pcm_resolution,
            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#else
            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK )
#endif
                                                data ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -395,11 +395,12 @@ ivas_error ivas_dec_setup(
                        }
                        else
                        {
                            if ( ( error = ivas_masa_dec_reconfigure( st_ivas, nSamplesRendered,

#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                                      pcm_resolution,
                            if ( ( error = ivas_masa_dec_reconfigure( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#else
                            if ( ( error = ivas_masa_dec_reconfigure( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK )
#endif
                                                                      data ) ) != IVAS_ERR_OK )
                            {
                                return error;
                            }
@@ -407,11 +408,12 @@ ivas_error ivas_dec_setup(
                    }
                    else
                    {
                        if ( ( error = ivas_omasa_dec_config( st_ivas, nSamplesRendered,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                              pcm_resolution,
                        if ( ( error = ivas_omasa_dec_config( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#else
                        if ( ( error = ivas_omasa_dec_config( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK )
#endif
                                                              data ) ) != IVAS_ERR_OK )

                        {
                            return error;
                        }
@@ -432,11 +434,11 @@ ivas_error ivas_dec_setup(
                /* reconfigure in case a change of operation mode is detected */
                if ( ( ivas_total_brate > IVAS_SID_5k2 && ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) || ( st_ivas->ini_active_frame == 0 ) )
                {
                    if ( ( error = ivas_omasa_dec_config( st_ivas, nSamplesRendered,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                          pcm_resolution,
                    if ( ( error = ivas_omasa_dec_config( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = ivas_omasa_dec_config( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK )
#endif
                                                          data ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
@@ -478,6 +480,7 @@ ivas_error ivas_dec_setup(
            else
            {
                ivas_sba_config( ivas_total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init );

                /*correct number of CPEs for discrete ISM coding*/
                if ( st_ivas->ini_frame > 0 && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
                {
@@ -508,11 +511,14 @@ ivas_error ivas_dec_setup(
            num_bits_read += MC_LS_SETUP_BITS;

            /* select MC format mode; reconfigure the MC format decoder */
            ivas_mc_dec_config( st_ivas, idx, nSamplesRendered,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                pcm_resolution,
            if ( ( error = ivas_mc_dec_config( st_ivas, idx, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#else
            ivas_mc_dec_config( st_ivas, idx, nSamplesRendered, data );
#endif
                                data );
        }

        /*-------------------------------------------------------------------*
@@ -533,7 +539,6 @@ ivas_error ivas_dec_setup(
                {
                    st_ivas->element_mode_init = 0 + IVAS_CPE_DFT;
                }
                /* (*num_bits_read)++; */
            }
            else
            {
@@ -630,11 +635,11 @@ ivas_error ivas_dec_setup(
                st_ivas->ism_mode = (ISM_MODE) ( idx + 1 );
            }

            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                pcm_resolution,
            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#else
            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK )
#endif
                                                data ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -2165,10 +2170,8 @@ ivas_error ivas_init_decoder(
    /*-----------------------------------------------------------------*
     * Allocate and initialize JBM struct + buffer
     *-----------------------------------------------------------------*/
    if (
        st_ivas->hDecoderConfig->Opt_5ms &&
        st_ivas->hTcBuffer == NULL )

    if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL )
    {
        /* no module has yet open the TC buffer, open a default one */
        n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas );
+8 −9
Original line number Diff line number Diff line
@@ -1193,16 +1193,16 @@ static void ivas_mc_paramupmix_dec_sf(
#endif

        /* Implement binaural rendering */
        ivas_binRenderer( st_ivas->hBinRenderer,

#ifdef SPLIT_REND_WITH_HEAD_ROT
                          &st_ivas->hSplitBinRend.splitrend.multiBinPoseData,
        ivas_binRenderer( st_ivas->hBinRenderer, &st_ivas->hSplitBinRend.splitrend.multiBinPoseData, st_ivas->hCombinedOrientationData, subframeIdx,
                          st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer_subfr, Cldfb_ImagBuffer_subfr );

#else
        ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, subframeIdx,
                          st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer_subfr, Cldfb_ImagBuffer_subfr );

#endif
                          st_ivas->hCombinedOrientationData,
                          subframeIdx,
                          st_ivas->hTcBuffer->subframe_nbslots[subframeIdx],
                          Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural,
                          Cldfb_RealBuffer_subfr,
                          Cldfb_ImagBuffer_subfr );

#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
@@ -1222,7 +1222,6 @@ static void ivas_mc_paramupmix_dec_sf(
        }
#endif


        /* Implement CLDFB synthesis */
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        {
Loading