Commit 28ea5742 authored by Lauros Pajunen's avatar Lauros Pajunen
Browse files

Merge remote-tracking branch 'origin/main' into RTP_revision

parents 0d4ce37a f49c0411
Loading
Loading
Loading
Loading
Loading
+36 −6
Original line number Diff line number Diff line
@@ -213,6 +213,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
@@ -264,6 +267,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;
@@ -651,7 +657,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 &&
@@ -851,6 +859,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
@@ -3399,6 +3410,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
@@ -3644,9 +3658,14 @@ static ivas_error decodeVoIP(
                &hIvasDec,
                newDecModeInPacket,
                &arg,
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
                renderConfig,
#else
                NULL, /* ToDo : Provide rendererConfig */
#endif
                NULL /* ToDo : Provide LS Custom Data */
            ) ) != IVAS_ERR_OK )
{
            {
                fprintf( stderr, "\nFailed to restart decoder from %d to %d\n", arg.decMode, newDecModeInPacket );
                goto cleanup;
@@ -4726,6 +4745,7 @@ static 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 )
@@ -4742,6 +4762,7 @@ static ivas_error restartDecoder(

        arg->enableHeadRotation = true;
    }
#endif

    if ( arg->voipMode )
    {
@@ -4758,6 +4779,15 @@ static 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 */