Commit dc2a9320 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] remove standalone renderer binaries and related files

- remove DEC_TO_REND_FLOAT_DUMP and renderer vs decoder test
- update test_renderer.py to run only a subset of tests (first version,
  test_renderer_be_comparison.py already tests exhaustively)
parent 753d3795
Loading
Loading
Loading
Loading
Loading
+1 −25
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ asan-on-merge-request-linux:
    expose_as: "Asan selftest results"

# test external renderer executable
external-renderer-make-pytest:
external-renderer-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -329,8 +329,6 @@ external-renderer-make-pytest:
  stage: test
  script:
    - make -j IVAS_rend
    - make -j unittests
    - make -j --directory scripts/td_object_renderer/object_renderer_standalone
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
@@ -386,28 +384,6 @@ external-renderer-cmake-msan-pytest:
      junit:
        - report-junit.xml

# test external renderer executable with cmake vs decoder renderer
# TODO @tmu @knj @sgi -> converted to script, decide whether to re-enable later
.external-renderer-cmake-vs-decoder-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -DDEC_TO_REND_FLOAT_DUMP=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n 1 -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_vs_decoder.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake vs decoder results"
    reports:
      junit:
        - report-junit.xml

# compare external renderer bitexactness between target and source branch
external-renderer-pytest-on-merge-request:
  extends:
+0 −14
Original line number Diff line number Diff line
@@ -108,10 +108,6 @@ if(WMOPS)
  add_definitions("-DWMOPS=1")
endif()

if(DEC_TO_REND_FLOAT_DUMP)
  add_compile_definitions(DEC_TO_REND_FLOAT_DUMP)
endif()

project(stereo-evs)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # make Visual Studio projects look nicer
include(CTest)
@@ -156,14 +152,6 @@ file(GLOB libUtilSrcs "lib_util/*.c")
file(GLOB libUtilHeaders "lib_util/*.h")
add_library(lib_util ${libUtilSrcs} ${libUtilHeaders})

file(GLOB unitTestCRendSrcs "scripts/ivas_pytests/tests/unit_tests/crend/*.c")
file(GLOB unitTestCRendHeaders "scripts/ivas_pytests/tests/unit_tests/crend/*.h")
add_executable(IVAS_crend_unit_test ${unitTestCRendSrcs} ${unitTestCRendHeaders})
target_link_libraries(IVAS_crend_unit_test lib_rend lib_dec lib_util lib_com lib_debug)

add_executable(renderer_standalone "scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c")
target_link_libraries(renderer_standalone lib_rend lib_dec lib_util lib_com lib_debug)

add_executable(IVAS_cod apps/encoder.c)
target_link_libraries(IVAS_cod lib_enc lib_util)
if(WIN32)
@@ -184,6 +172,4 @@ if(COPY_EXECUTABLES_FROM_BUILD_DIR)
  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_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 IVAS_crend_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:IVAS_crend_unit_test>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/ivas_pytests/tests/unit_tests/crend/")
  add_custom_command(TARGET renderer_standalone POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:renderer_standalone>" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/td_object_renderer/object_renderer_standalone/")
endif()
+1 −28
Original line number Diff line number Diff line
@@ -11,15 +11,6 @@ SRC_APP = apps
BUILD        = build
OBJDIR       = obj

# Dirs for python unittests
UTESTS_SCRIPT_DIR = scripts/ivas_pytests
UTESTS_DIR   = $(UTESTS_SCRIPT_DIR)/tests/unit_tests
UTESTS_CREND_DIR = $(UTESTS_DIR)/crend

# Source paths for python unittests 
SRC_UTESTS = $(UTESTS_CREND_DIR)


SRC_DIRS  = $(sort -u $(SRC_LIBCOM) $(SRC_LIBDEBUG) $(SRC_LIBDEC) $(SRC_LIBENC) $(SRC_LIBREND) $(SRC_LIBUTIL) $(SRC_APP) $(SRC_UTESTS)) 

# Name of CLI binaries
@@ -33,8 +24,6 @@ LIB_LIBENC ?= libivasenc.a
LIB_LIBREND  ?= libivasrend.a
LIB_LIBUTIL  ?= libivasutil.a

CLI_UTESTS_CREND ?= IVAS_crend_unit_test

# Default tool settings
CC        ?= gcc
RM        ?= rm -f
@@ -131,8 +120,6 @@ SRCS_LIBENC = $(foreach DIR,$(SRC_LIBENC),$(patsubst $(DIR)/%,%,$(wildcard $(D
SRCS_LIBREND  = $(foreach DIR,$(SRC_LIBREND),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c)))
SRCS_LIBUTIL  = $(foreach DIR,$(SRC_LIBUTIL),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c)))

SRCS_UTESTS_CREND  = $(foreach DIR,$(UTESTS_CREND_DIR),$(patsubst $(DIR)/%,%,$(wildcard $(DIR)/*.c)))

OBJS_LIBCOM      = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.o))
OBJS_LIBDEBUG    = $(addprefix $(OBJDIR)/,$(SRCS_LIBDEBUG:.c=.o))
OBJS_LIBDEC      = $(addprefix $(OBJDIR)/,$(SRCS_LIBDEC:.c=.o))
@@ -143,11 +130,6 @@ OBJS_CLI_APIDEC = $(OBJDIR)/decoder.o
OBJS_CLI_APIENC  = $(OBJDIR)/encoder.o
OBJS_CLI_APPREND = $(OBJDIR)/renderer.o

OBJS_CLI_UTESTS_CREND = $(addprefix $(OBJDIR)/,$(SRCS_UTESTS_CREND:.c=.o))

OBJS_UTESTS = $(OBJS_CLI_UTESTS_CREND)


DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS_LIBDEC:.c=.P) \
  $(SRCS_LIBENC:.c=.P) $(SRCS_LIBUTIL:.c=.P))

@@ -187,23 +169,14 @@ $(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(L
$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LIBDEC)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -livasdec -livasutil -livasdebug -livascom $(LDLIBS) -o $(CLI_APIREND)

$(CLI_UTESTS_CREND): $(OBJS_CLI_UTESTS_CREND) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG)
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_UTESTS_CREND) -L. -livasdec -livascom -livasutil -livasdebug $(LDLIBS) -o $(UTESTS_CREND_DIR)/$(CLI_UTESTS_CREND)

unittests: $(CLI_UTESTS_CREND)

libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBREND) $(LIB_LIBUTIL)

clean: clean_unittests
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_APIDEC) $(CLI_APIREND) $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBUTIL) $(LIB_LIBREND)

clean_unittests:
	$(QUIET)$(RM) $(OBJS_UTESTS)
	$(QUIET)$(RM) $(UTESTS_CREND_DIR)/$(CLI_UTESTS_CREND)

$(OBJDIR)/%.o : %.c | $(OBJDIR)
	$(QUIET_CC)$(CC) $(CFLAGS) -c -MD -o $@ $<
	@cp $(OBJDIR)/$*.d $(OBJDIR)/$*.P; \
+0 −18
Original line number Diff line number Diff line
@@ -834,10 +834,6 @@ int main(
        fprintf( stderr, "Failed to open file: %s\n", args.outputFilePath );
        exit( -1 );
    }
#ifdef DEC_TO_REND_FLOAT_DUMP
    printf( "Warning: Renderer executable built with DEC_TO_REND_FLOAT_DUMP enabled!\n" );
    printf( "         Float dump file (./float_out.wav) will be forced as input.\n" );
#endif

    inBufferSize = frameSize_smpls * totalNumInChannels;
    outBufferSize = frameSize_smpls * numOutChannels;
@@ -888,20 +884,6 @@ int main(

        /* Convert from int to float and from interleaved to packed */
        convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer );
#ifdef DEC_TO_REND_FLOAT_DUMP
        /* Overwrite from dump file */
        float tmp[960 * 16];
        dbgread( tmp, sizeof( float ), numSamplesRead, "./float_out.raw" );

        /* Conversion from interleaved to packed still necessary */
        for ( int32_t i = 0; i < numSamplesRead / num_in_channels; ++i )
        {
            for ( int32_t c = 0; c < num_in_channels; ++c )
            {
                inFloatBuffer[c * frameSize_smpls + i] = tmp[i * num_in_channels + c];
            }
        }
#endif

#ifndef NOKIA_MASA_EXTERNAL_RENDERER
        for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i )
+0 −10
Original line number Diff line number Diff line
@@ -144,16 +144,6 @@ uint32_t ivas_syn_output(
        }
    }

#ifdef DEC_TO_REND_FLOAT_DUMP
    for ( i = 0; i < output_frame; ++i )
    {
        for ( n = 0; n < n_channels; ++n )
        {
            dbgwrite( &synth[n][i], sizeof( float ), 1, 1, "./float_out.raw" );
        }
    }
#endif

    return noClipping;
}

Loading