Commit fdc8bb20 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

fix 0DOF MASA in ext renderer mode as well

parent b35a9d99
Loading
Loading
Loading
Loading
Loading
+29 −12
Original line number Diff line number Diff line
@@ -3243,7 +3243,12 @@ static DecoderDummy *initDecoderDummy(
    decDummy->splitBinRend.hMultiBinCldfbData = NULL;
    ivas_init_split_rend_handles( &decDummy->splitBinRend.splitrend );
    decDummy->splitBinRend.splitrend = *pSplitRendWrapper;
#ifdef FIX_658_SPLIT_REND_MASA
    if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ||
         outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
#else
    if ( decDummy->splitBinRend.splitrend.multiBinPoseData.num_poses > 1 )
#endif
    {
        if ( ( decDummy->splitBinRend.hMultiBinCldfbData = (IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE) malloc( sizeof( IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA ) ) ) == NULL )
        {
@@ -4160,6 +4165,11 @@ ivas_error IVAS_REND_AddInput(
        {
            cldfb_in = 1;
        }
#ifdef FIX_658_SPLIT_REND_MASA
        ivas_split_rend_choose_default_codec( &hIvasRend->hRendererConfig->split_rend_config.codec,
                                              ( cldfb_in == 0 ),
                                              hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM );
#endif
        if ( ( error = initSplitRend( &hIvasRend->splitRendWrapper,
                                      &hIvasRend->splitRendEncBuffer,
                                      &hIvasRend->hRendererConfig->split_rend_config,
@@ -5014,7 +5024,13 @@ int16_t IVAS_REND_FeedRenderConfig(
    }

    /* Must re-initialize split rendering config in case renderer config is updated after adding renderer inputs */
#ifdef FIX_658_SPLIT_REND_MASA
    /*if its not initialized yet then no need to re-initialize, initialization will happen while adding inputs*/
    if ( hIvasRend->splitRendEncBuffer.data != NULL && hIvasRend->hRendererConfig != NULL )
#endif
    {
        closeSplitRend( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer );
        /* TODO : Do not hard code TDin to 1 here*/
        ivas_split_rend_choose_default_codec( &hIvasRend->hRendererConfig->split_rend_config.codec,
                                              1,
                                              hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM );
@@ -5028,6 +5044,7 @@ int16_t IVAS_REND_FeedRenderConfig(
        {
            return error;
        }
    }
#endif

    return IVAS_ERR_OK;