Loading apps/decoder.c +34 −16 Original line number Diff line number Diff line Loading @@ -623,6 +623,14 @@ int main( goto cleanup; } #ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } #endif aeCount = RenderConfigReader_getAcousticEnvironmentCount( renderConfigReader ); if ( aeCount > 0 ) { Loading Loading @@ -702,6 +710,13 @@ int main( if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID ); goto cleanup; } #else if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) Loading @@ -715,6 +730,7 @@ int main( fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID ); goto cleanup; } #endif } /* ISAR frame size is set from command line, not renderer config file. Loading Loading @@ -2070,9 +2086,7 @@ static ivas_error initOnFirstGoodFrame( uint16_t rtpDecSeed = RANDOM_INITSEED_DEC; uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) << 16 ); uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpDecSeed ); #ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API uint8_t payloadType = DEFAULT_IVAS_PAYLOAD_TYPE; /* Dynamic PT are in range [96, 127] */ #endif if ( ( error = IVAS_DEC_GetDelay( hIvasDec, delayNumSamples_temp, &delayTimeScale_temp ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2109,11 +2123,7 @@ static ivas_error initOnFirstGoodFrame( /* Split Rendering RTPDump Output file */ #ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), payloadType, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: Can't open SR output bitstream file for RTP output %s \n\n", arg.outputWavFilename ); return error; Loading Loading @@ -2445,6 +2455,14 @@ static ivas_error decodeG192( fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); goto cleanup; } #ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } #endif } for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) Loading Loading @@ -2644,6 +2662,13 @@ static ivas_error decodeG192( arg.aeSequence.selected = 0; } arg.aeSequence.frameCounter = 0; #ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.aeSequence.pID[arg.aeSequence.selected], &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get acoustic environment with ID %d\n\n", arg.aeSequence.pID[arg.aeSequence.selected] ); goto cleanup; } #else if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.aeSequence.pID[arg.aeSequence.selected], &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) Loading @@ -2657,6 +2682,7 @@ static ivas_error decodeG192( fprintf( stderr, "Failed to get acoustic environment with ID %d\n\n", arg.aeSequence.pID[arg.aeSequence.selected] ); goto cleanup; } #endif if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3992,17 +4018,9 @@ static ivas_error decodeVoIP( } else if ( decodedGoodFrame ) { #ifdef FIX_1515_ISAR_FRAME_SIZES_IN_RTP srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->isar_frame_size_ms; #else srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms; #endif srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD; #ifdef FIX_1515_ISAR_FRAME_SIZES_IN_RTP srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->isar_frame_size_ms; #else srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms; #endif if ( ( error = IVAS_RTP_WriteNextFrame( &srRtp, splitRendBits->bits_buf, &srInfo, (int16_t) splitRendBits->bits_written, false, false ) ) != IVAS_ERR_OK ) { Loading Loading
apps/decoder.c +34 −16 Original line number Diff line number Diff line Loading @@ -623,6 +623,14 @@ int main( goto cleanup; } #ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } #endif aeCount = RenderConfigReader_getAcousticEnvironmentCount( renderConfigReader ); if ( aeCount > 0 ) { Loading Loading @@ -702,6 +710,13 @@ int main( if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID ); goto cleanup; } #else if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) Loading @@ -715,6 +730,7 @@ int main( fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID ); goto cleanup; } #endif } /* ISAR frame size is set from command line, not renderer config file. Loading Loading @@ -2070,9 +2086,7 @@ static ivas_error initOnFirstGoodFrame( uint16_t rtpDecSeed = RANDOM_INITSEED_DEC; uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) << 16 ); uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpDecSeed ); #ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API uint8_t payloadType = DEFAULT_IVAS_PAYLOAD_TYPE; /* Dynamic PT are in range [96, 127] */ #endif if ( ( error = IVAS_DEC_GetDelay( hIvasDec, delayNumSamples_temp, &delayTimeScale_temp ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2109,11 +2123,7 @@ static ivas_error initOnFirstGoodFrame( /* Split Rendering RTPDump Output file */ #ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), payloadType, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: Can't open SR output bitstream file for RTP output %s \n\n", arg.outputWavFilename ); return error; Loading Loading @@ -2445,6 +2455,14 @@ static ivas_error decodeG192( fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); goto cleanup; } #ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } #endif } for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) Loading Loading @@ -2644,6 +2662,13 @@ static ivas_error decodeG192( arg.aeSequence.selected = 0; } arg.aeSequence.frameCounter = 0; #ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.aeSequence.pID[arg.aeSequence.selected], &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get acoustic environment with ID %d\n\n", arg.aeSequence.pID[arg.aeSequence.selected] ); goto cleanup; } #else if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.aeSequence.pID[arg.aeSequence.selected], &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) Loading @@ -2657,6 +2682,7 @@ static ivas_error decodeG192( fprintf( stderr, "Failed to get acoustic environment with ID %d\n\n", arg.aeSequence.pID[arg.aeSequence.selected] ); goto cleanup; } #endif if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3992,17 +4018,9 @@ static ivas_error decodeVoIP( } else if ( decodedGoodFrame ) { #ifdef FIX_1515_ISAR_FRAME_SIZES_IN_RTP srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->isar_frame_size_ms; #else srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms; #endif srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD; #ifdef FIX_1515_ISAR_FRAME_SIZES_IN_RTP srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->isar_frame_size_ms; #else srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms; #endif if ( ( error = IVAS_RTP_WriteNextFrame( &srRtp, splitRendBits->bits_buf, &srInfo, (int16_t) splitRendBits->bits_written, false, false ) ) != IVAS_ERR_OK ) { Loading