Commit f49c0411 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

Merge branch '1441-rtp-restart-functionality-breaks-split-rendering-with-rtp-input' into 'main'

Resolve "RTP restart functionality breaks split rendering with rtp input"

See merge request !2391
parents 6a06b484 fe6c4bd9
Loading
Loading
Loading
Loading
Loading
+30 −1
Original line number Diff line number Diff line
@@ -217,6 +217,9 @@ static ivas_error decodeVoIP(
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    IVAS_RENDER_CONFIG_DATA *renderConfig,
#endif
#ifdef DECODER_FORMAT_SWITCHING
    IVAS_DEC_HANDLE *phIvasDec,
#else
@@ -267,6 +270,9 @@ int main(
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA **pAE = NULL;
    uint32_t aeCount = 0;
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    IVAS_RENDER_CONFIG_DATA renderConfig = { 0 };
#endif
#ifdef DEBUGGING
    int32_t noClipping;
    int32_t cnt_frames_limited;
@@ -655,7 +661,9 @@ int main(

    if ( arg.renderConfigEnabled )
    {
#ifndef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
        IVAS_RENDER_CONFIG_DATA renderConfig;
#endif

        /* sanity check */
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
@@ -854,6 +862,9 @@ int main(
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
                            &splitRendBits,
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
                            &renderConfig,
#endif
#ifdef DECODER_FORMAT_SWITCHING
                            &hIvasDec,
#else
@@ -3400,6 +3411,9 @@ static ivas_error decodeVoIP(
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    IVAS_RENDER_CONFIG_DATA *renderConfig,
#endif
#ifdef DECODER_FORMAT_SWITCHING
    IVAS_DEC_HANDLE *phIvasDec,
#else
@@ -3643,7 +3657,11 @@ static ivas_error decodeVoIP(
                &hIvasDec,
                newCodecInPacket,
                &arg,
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
                renderConfig,
#else
                NULL, /* ToDo : Provide rendererConfig */
#endif
                NULL /* ToDo : Provide LS Custom Data */
            );
            if ( error != IVAS_ERR_OK )
@@ -4708,6 +4726,7 @@ ivas_error restartDecoder(
        goto cleanup;
    }

#ifndef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    if ( arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK )
@@ -4724,6 +4743,7 @@ ivas_error restartDecoder(

        arg->enableHeadRotation = true;
    }
#endif

    if ( arg->voipMode )
    {
@@ -4740,6 +4760,15 @@ ivas_error restartDecoder(
        goto cleanup;
    }

#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    /* ISAR frame size is set from command line, not renderer config file.
     * This will be ignored if output format is not split rendering. */
    if ( renderConfig != NULL )
    {
        renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->renderFramesize /* given in number of 5ms subframes */ * 5;
    }
#endif

    if ( arg->renderConfigEnabled && renderConfig != NULL )
    {
        if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, *renderConfig ) ) != IVAS_ERR_OK )
+1 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@
#define ISM_PI_DATA                                    /* Add reading and packing/unpacking of ISM PI data */
#define REVERSE_ISM_PI_DATA                            /* Add reading and packing/unpacking of reverse ISM PI data */
#define DECODER_FORMAT_SWITCHING                       /* Re-initialize the decoder when the format/subformat of the incoming stream is changed */
#define FIX_SPLIT_RENDERING_ON_DECODER_RESTART         /* Re-configure split rendering on decoder restart */

/* ################### Start BE switches ################################# */
/* only BE switches wrt selection floating point code */