Commit 96795e0f authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

solved merge conflicts

parents 5b65f28e 0a876ebc
Loading
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -208,12 +208,6 @@ if(WIN32)
  target_link_libraries(IVAS_cod Ws2_32)
endif()

add_executable(IVAS_cod_fmtsw apps/encoder_fmtsw.c)
target_link_libraries(IVAS_cod_fmtsw lib_enc lib_util)
if(WIN32)
  target_link_libraries(IVAS_cod_fmtsw Ws2_32)
endif()

add_executable(IVAS_dec apps/decoder.c)
target_link_libraries(IVAS_dec lib_dec lib_util)
if(WIN32)
@@ -238,7 +232,6 @@ target_include_directories(ambi_converter PRIVATE lib_basop lib_util lib_com lib
if(COPY_EXECUTABLES_FROM_BUILD_DIR)
  # Optionally copy executables to the same place where Make puts them (useful for tests that expect executables in specific places)
  add_custom_command(TARGET IVAS_cod POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_cod>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_cod_fmtsw POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_cod_fmtsw>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_dec>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_rend>" "${CMAKE_CURRENT_SOURCE_DIR}/")
  add_custom_command(TARGET ISAR_post_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:ISAR_post_rend>" "${CMAKE_CURRENT_SOURCE_DIR}/")
+2 −7
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ SRC_DIRS = $(sort -u $(SRC_LIBBASOP) $(SRC_LIBCOM) $(SRC_LIBDEBUG) $(SRC_LIBDEC
# Name of CLI binaries
CLI_APIDEC   	?= IVAS_dec
CLI_APIENC   	?= IVAS_cod
CLI_APIENC_FMTSW   	?= IVAS_cod_fmtsw
CLI_APIREND  	?= IVAS_rend
CLI_APIPOSTREND ?= ISAR_post_rend
CLI_AMBICONVERT ?= ambi_converter
@@ -184,7 +183,6 @@ OBJS_LIBUTIL = $(addprefix $(OBJDIR)/,$(SRCS_LIBUTIL:.c=.o))
OBJS_AMBICONVERT = $(OBJDIR)/ambi_convert.o
OBJS_CLI_APIDEC  = $(OBJDIR)/decoder.o
OBJS_CLI_APIENC  = $(OBJDIR)/encoder.o
OBJS_CLI_APIENC_FMTSW  = $(OBJDIR)/encoder_fmtsw.o
OBJS_CLI_APPREND = $(OBJDIR)/renderer.o
OBJS_CLI_APPPOSTREND = $(OBJDIR)/isar_post_rend.o
OBJS_CLI_AMBICONVERT = $(OBJDIR)/ambi_converter.o
@@ -197,7 +195,7 @@ DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBBASOP:.c=.P) $(SRCS_LIBCOM:.c=.P) $(SRCS

.PHONY: all clean

all: $(CLI_APIENC) $(CLI_APIENC_FMTSW) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND)
all: $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND)

$(OBJDIR):
	$(QUIET)mkdir -p $(OBJDIR)
@@ -233,9 +231,6 @@ $(LIB_LIBUTIL): $(OBJS_LIBUTIL) $(OBJS_LIBBASOP) $(OBJS_LIBCOM)
$(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBBASOP) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC) -L. -livasbasop -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC)

$(CLI_APIENC_FMTSW): $(OBJS_CLI_APIENC_FMTSW) $(LIB_LIBBASOP) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC_FMTSW) -L. -livasbasop -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC_FMTSW)

$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBBASOP) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(LIB_LIBISAR)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasbasop -livasdec -livascom -livasutil -livasdebug -llc3plus $(LDLIBS) -o $(CLI_APIDEC)

@@ -254,7 +249,7 @@ clean:
	$(QUIET)$(RM) $(OBJS_LIBENC) $(OBJS_LIBDEC) $(DEPS)
	$(QUIET)$(RM) $(DEPS:.P=.d)
	$(QUIET)test ! -d $(OBJDIR) || rm -rf $(OBJDIR)
	$(QUIET)$(RM) $(CLI_APIENC) $(CLI_APIENC_FMTSW) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND) $(CLI_AMBICONVERT) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(OBJS_LIBBASOP) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND) $(LIB_LIBISAR) $(LIB_LC3PLUS)
	$(QUIET)$(RM) $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND) $(CLI_AMBICONVERT) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(OBJS_LIBBASOP) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND) $(LIB_LIBISAR) $(LIB_LC3PLUS)

$(OBJDIR)/%.o : %.c | $(OBJDIR)
	$(QUIET_CC)$(CC) $(CFLAGS) -c -MD -o $@ $<
+0 −11
Original line number Diff line number Diff line
@@ -24,11 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder", "encoder.vcxproj"
		{63747FE7-94BA-410C-8D7F-EB47555DD994} = {63747FE7-94BA-410C-8D7F-EB47555DD994}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder_fmtsw", "encoder_fmtsw.vcxproj", "{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}"
	ProjectSection(ProjectDependencies) = postProject
		{63747FE7-94BA-410C-8D7F-EB47555DD994} = {63747FE7-94BA-410C-8D7F-EB47555DD994}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer.vcxproj", "{12B4C8A5-1E06-4E30-B443-D1F916F52B47}"
	ProjectSection(ProjectDependencies) = postProject
		{63747FE7-94BA-410C-8D7F-EB47555DD994} = {63747FE7-94BA-410C-8D7F-EB47555DD994}
@@ -111,12 +106,6 @@ Global
		{B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Release|Win32.ActiveCfg = Release|Win32
		{B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Release|Win32.Build.0 = Release|Win32
		{B3FC9DFC-7268-8660-7C0D-B60BAF02C554}.Release|x64.ActiveCfg = Release|Win32
		{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}.Debug|Win32.ActiveCfg = Debug|Win32
		{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}.Debug|Win32.Build.0 = Debug|Win32
		{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}.Debug|x64.ActiveCfg = Debug|Win32
		{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}.Release|Win32.ActiveCfg = Release|Win32
		{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}.Release|Win32.Build.0 = Release|Win32
		{CA7EA15E-09A4-4196-A8EA-2A5F6F84862B}.Release|x64.ActiveCfg = Release|Win32
		{12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Debug|Win32.ActiveCfg = Debug|Win32
		{12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Debug|Win32.Build.0 = Debug|Win32
		{12B4C8A5-1E06-4E30-B443-D1F916F52B47}.Debug|x64.ActiveCfg = Debug|Win32
+32 −6
Original line number Diff line number Diff line
@@ -507,6 +507,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 )
        {
@@ -585,6 +593,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 )
@@ -598,6 +613,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.
@@ -1750,9 +1766,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 )
        {
@@ -1789,11 +1803,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;
@@ -2114,6 +2124,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 )
@@ -2276,6 +2294,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 )
@@ -2289,6 +2314,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 ) );
+0 −6
Original line number Diff line number Diff line
@@ -230,9 +230,7 @@ int main(
    uint16_t rtpEncSeed = RANDOM_INITSEED_ENC;
    uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) << 16 );
    uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpEncSeed );
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
    uint8_t payloadType = DEFAULT_IVAS_PAYLOAD_TYPE; /* Dynamic PT are in range [96, 127] */
#endif

    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
@@ -647,11 +645,7 @@ int main(

    if ( arg.rtpdumpOutput )
    {
#ifdef FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API
        if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, payloadType, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename );
            goto cleanup;
Loading