diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3ac60dac7eebde8b0aa57989f1d887313b272037..7ba0eecec437e9de5149b763ad5b7ccd9a15be45 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,7 +147,7 @@ stages:
.build-job-linux:
stage: build
- timeout: "2 minutes"
+ timeout: "4 minutes"
tags:
- ivas-linux
diff --git a/Workspace_msvc/lib_debug.vcxproj b/Workspace_msvc/lib_debug.vcxproj
index 59221f7427f81eef55b4fe1fee4bc150630dfdbe..8a14cbdd31a94c0c1a8bdd4e55df18145f74c557 100644
--- a/Workspace_msvc/lib_debug.vcxproj
+++ b/Workspace_msvc/lib_debug.vcxproj
@@ -143,19 +143,16 @@
-
-
-
+
-
-
+
diff --git a/apps/decoder.c b/apps/decoder.c
index f031aca0187a702520912303031f8c28f21c71aa..11d70adf280950564f4c3003f937038c5e128d50 100644
--- a/apps/decoder.c
+++ b/apps/decoder.c
@@ -30,6 +30,10 @@
*******************************************************************************************************/
+#include
+#include
+#include
+#include "options.h"
#include "lib_dec.h"
#include "cmdl_tools.h"
#include "audio_file_writer.h"
@@ -41,25 +45,14 @@
#include "head_rotation_file_reader.h"
#include "jbm_file_writer.h"
#include "evs_rtp_payload.h"
-#include
-#include
-#ifdef WMOPS
-#include "PROM_Size_lib_com.h"
-#include "PROM_Size_lib_dec.h"
-#include "wmops.h"
-#endif
-#ifdef RAM_COUNTING_TOOL
-#include "mem_count.h"
-#else
-#include
-#endif
#ifdef DEBUGGING
#include "debug.h"
#endif
+#include "wmc_auto.h"
#include "render_config_reader.h"
-#define WMC_TOOL_MAN
+#define WMC_TOOL_SKIP
/*------------------------------------------------------------------------------------------*
* Local constants, enums, structures
@@ -137,41 +130,6 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeCha
#endif
-#ifdef WMOPS
-/*------------------------------------------------------------------------------------------*
- * Function to print complexity & memory estimates at the decoder
- *------------------------------------------------------------------------------------------*/
-
-extern int16_t *ptr_base_stack;
-extern int16_t *ptr_base_stack;
-extern int16_t *ptr_max_stack;
-extern int32_t wc_frame;
-extern char location_max_stack[256];
-void print_stack_call_tree( void );
-
-static void print_mem_dec( size_t SRAM_size )
-{
- fprintf( stdout, "\n\n --- Decoder memory usage --- \n\n" );
-
- fprintf( stdout, "PROM size (decoder): %d words (or instructions)\n", PROM_Size_lib_dec );
- fprintf( stdout, "PROM size (common): %d words (or instructions)\n", PROM_Size_lib_com );
- fprintf( stdout, "Stack size (decoder): %ld words in %s() in frame #%d\n", ( ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) ) / sizeof( float ), location_max_stack, wc_frame );
- fprintf( stdout, "Table ROM size (decoder): %ld words\n", ( Const_Data_Size_rom_dec() + Const_Data_Size_ivas_rom_dec() ) / sizeof( float ) );
- fprintf( stdout, "Table ROM size (binaural renderer): %ld words\n", ( Const_Data_Size_ivas_rom_binauralRen() + Const_Data_Size_ivas_rom_TdBinauralR() + Const_Data_Size_ivas_rom_binaural_cr() ) / sizeof( float ) );
- fprintf( stdout, "Table ROM size (common): %ld words\n", ( Const_Data_Size_rom_com() + Const_Data_Size_ivas_rom_com() ) / sizeof( float ) );
-#ifdef RAM_COUNTING_TOOL
- fprintf( stdout, "Static RAM size (decoder): %ld words\n\n", SRAM_size );
-#endif
- print_stack_call_tree();
-
- fprintf( stdout, "Note: this is an optimistic estimate of the memory consumption assuming\n" );
- fprintf( stdout, " that each variable (short, long or float) in the codec requires\n" );
- fprintf( stdout, " 32 bits of memory and may therefore be represented by 1 word.\n" );
- fprintf( stdout, " The following formula is used: sizeof('memory array')/sizeof(float)\n\n" );
-}
-#endif
-
-
/*------------------------------------------------------------------------------------------*
* main()
*
@@ -200,18 +158,12 @@ int main(
#endif
#endif
-#ifdef WMOPS
- size_t SRAM_size = 0;
- reset_stack();
- reset_wmops();
-#endif
-
#ifdef DEBUGGING
dbgargs( &argc, argv );
#endif
-
-#ifdef RAM_COUNTING_TOOL
- mem_count_init( 0, USE_32BITS );
+#ifdef WMOPS
+ reset_wmops();
+ reset_mem( USE_32BITS );
#endif
/*------------------------------------------------------------------------------------------*
@@ -575,15 +527,9 @@ cleanup:
fprintf( stderr, "\nError while closing file: %s\nContinuing...\n\n", arg.inputBitstreamFilename );
}
-#ifdef RAM_COUNTING_TOOL
-#ifdef WMOPS
- SRAM_size =
-#endif
- mem_count_summary( USE_DEFAULT );
-#endif
#ifdef WMOPS
print_wmops();
- print_mem_dec( SRAM_size );
+ print_mem( NULL );
#endif
if ( !arg.quietModeEnabled )
@@ -1672,10 +1618,8 @@ static ivas_error decodeG192(
}
#ifdef WMOPS
update_wmops();
-#endif
-#ifdef DEBUGGING
-#ifdef RAM_ANALYSIS
- mem_analyze();
+#ifdef MEM_COUNT_DETAILS
+ export_mem( "mem_analysis.csv" );
#endif
#endif
}
@@ -2241,10 +2185,8 @@ static ivas_error decodeVoIP(
#ifdef WMOPS
update_wmops();
-#endif
-#ifdef DEBUGGING
-#ifdef RAM_ANALYSIS
- mem_analyze();
+#ifdef MEM_COUNT_DETAILS
+ export_mem( "mem_analysis.csv" );
#endif
#endif
}
diff --git a/apps/encoder.c b/apps/encoder.c
index 0be04d7c8e4b8b476e67a8d3a4e667f66b541db3..c5fab82453a039d709f959088aaef299c1f669e1 100644
--- a/apps/encoder.c
+++ b/apps/encoder.c
@@ -30,6 +30,10 @@
*******************************************************************************************************/
+#include
+#include
+#include
+#include "options.h"
#include "lib_enc.h"
#include "cmdl_tools.h"
#include "audio_file_reader.h"
@@ -37,24 +41,12 @@
#include "jbm_file_reader.h"
#include "masa_file_reader.h"
#include "ism_file_reader.h"
-#include
-#include
-#ifdef WMOPS
-#include "PROM_Size_lib_com.h"
-#include "PROM_Size_lib_enc.h"
-#include "wmops.h"
-#endif
-#ifdef RAM_COUNTING_TOOL
-#include "mem_count.h"
-#else
-#include
-#endif
#ifdef DEBUGGING
#include "debug.h"
#endif
+#include "wmc_auto.h"
-#define WMC_TOOL_MAN
-
+#define WMC_TOOL_SKIP
/*------------------------------------------------------------------------------------------*
* Local constants, enums, structures
@@ -154,40 +146,6 @@ static IVAS_ENC_FORCED_MODE parseForcedMode( char *forcedModeChar );
#endif
-#ifdef WMOPS
-/*------------------------------------------------------------------------------------------*
- * Function to print complexity & memory estimates at the encoder
- *------------------------------------------------------------------------------------------*/
-
-extern int16_t *ptr_base_stack;
-extern int16_t *ptr_base_stack;
-extern int16_t *ptr_max_stack;
-extern int32_t wc_frame;
-extern char location_max_stack[256];
-void print_stack_call_tree( void );
-
-static void print_mem_enc( size_t SRAM_size )
-{
- fprintf( stdout, "\n\n --- Encoder memory usage --- \n\n" );
-
- fprintf( stdout, "PROM size (encoder): %d words (or instructions)\n", PROM_Size_lib_enc );
- fprintf( stdout, "PROM size (common): %d words (or instructions)\n", PROM_Size_lib_com );
- fprintf( stdout, "Stack size (encoder): %ld words in %s() in frame #%d\n", ( ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) ) / sizeof( float ), location_max_stack, wc_frame );
- fprintf( stdout, "Table ROM size (encoder): %ld words\n", ( Const_Data_Size_rom_enc() + Const_Data_Size_ivas_rom_enc() ) / sizeof( float ) );
- fprintf( stdout, "Table ROM size (common): %ld words\n", ( Const_Data_Size_rom_com() + Const_Data_Size_ivas_rom_com() ) / sizeof( float ) );
-#ifdef RAM_COUNTING_TOOL
- fprintf( stdout, "Static RAM size (encoder): %ld words\n\n", SRAM_size );
-#endif
- print_stack_call_tree();
-
- fprintf( stdout, "Note: this is an optimistic estimate of the memory consumption assuming\n" );
- fprintf( stdout, " that each variable (short, long or float) in the codec requires\n" );
- fprintf( stdout, " 32 bits of memory and may therefore be represented by 1 word.\n" );
- fprintf( stdout, " The following formula is used: sizeof('memory array')/sizeof(float)\n\n" );
-}
-#endif
-
-
/*------------------------------------------------------------------------------------------*
* main()
*
@@ -224,18 +182,12 @@ int main(
#endif
#endif
-#ifdef WMOPS
- size_t SRAM_size = 0;
- reset_wmops();
- reset_stack();
-#endif
-
#ifdef DEBUGGING
dbgargs( &argc, argv );
#endif
-
-#ifdef RAM_COUNTING_TOOL
- mem_count_init( 0, USE_32BITS );
+#ifdef WMOPS
+ reset_wmops();
+ reset_mem( USE_32BITS );
#endif
initArgStruct( &arg );
@@ -765,10 +717,8 @@ int main(
#ifdef WMOPS
update_wmops();
-#endif
-#ifdef DEBUGGING
-#ifdef RAM_ANALYSIS
- mem_analyze();
+#ifdef MEM_COUNT_DETAILS
+ export_mem( "mem_analysis.csv" );
#endif
#endif
}
@@ -834,15 +784,9 @@ cleanup:
IVAS_ENC_Close( &hIvasEnc );
-#ifdef RAM_COUNTING_TOOL
-#ifdef WMOPS
- SRAM_size =
-#endif
- mem_count_summary( USE_DEFAULT );
-#endif
#ifdef WMOPS
print_wmops();
- print_mem_enc( SRAM_size );
+ print_mem( NULL );
#endif
#ifdef DEBUGGING
diff --git a/apps/renderer.c b/apps/renderer.c
index 486ed4275728ab0bd99b5510e6c8497f5d92e6dc..6084b9f46a2fa15c99bb6dff7712e878c1f63410 100644
--- a/apps/renderer.c
+++ b/apps/renderer.c
@@ -30,6 +30,13 @@
*******************************************************************************************************/
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "options.h"
#include "audio_file_reader.h"
#include "audio_file_writer.h"
@@ -44,23 +51,7 @@
#include "masa_file_reader.h"
#include "prot.h"
#include "render_config_reader.h"
-#ifdef WMOPS
-#include "PROM_Size_lib_rend.h"
-#include "wmops.h"
-#endif
-#ifdef DEBUGGING
-#include "debug.h"
-#endif
-#ifdef RAM_COUNTING_TOOL
-#include "mem_count.h"
-#endif
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include "wmc_auto.h"
#define RENDERER_MAX_CLI_ARG_LENGTH ( FILENAME_MAX )
@@ -78,37 +69,6 @@ static
#define SEP_FOLDER '/'
#endif
-#ifdef WMOPS
-void print_stack_call_tree( void );
-int Const_Data_Size_ivas_rom_rend( void );
-extern int16_t *ptr_base_stack;
-extern int16_t *ptr_max_stack;
-extern int32_t wc_frame;
-extern char location_max_stack[256];
-
-/*------------------------------------------------------------------------------------------*
- * Function to print complexity & memory estimates
- *------------------------------------------------------------------------------------------*/
-static void print_mem_renderer( size_t SRAM_size )
-{
- fprintf( stdout, "\n\n --- Renderer memory usage --- \n\n" );
-
- fprintf( stdout, "PROM size (renderer): %d words (or instructions)\n", PROM_Size_lib_rend );
- fprintf( stdout, "Stack size: %d words in %s() in frame #%d\n", ( ptr_base_stack - ptr_max_stack ) * sizeof( int16_t ) / sizeof( float ), location_max_stack, wc_frame );
- fprintf( stdout, "Table ROM size(renderer): %d words\n", ( Const_Data_Size_ivas_rom_rend() ) / sizeof( float ) );
- fprintf( stdout, "Table ROM size (binaural renderer): %ld words\n", ( Const_Data_Size_ivas_rom_binauralRen() + Const_Data_Size_ivas_rom_TdBinauralR() + Const_Data_Size_ivas_rom_binaural_cr() ) / sizeof( float ) );
-#ifdef RAM_COUNTING_TOOL
- fprintf( stdout, "Static RAM size: %d words\n\n", SRAM_size );
-#endif
- print_stack_call_tree();
-
- fprintf( stdout, "Note: this is an optimistic estimate of the memory consumption assuming\n" );
- fprintf( stdout, " that each variable (short, long or float) in the codec requires\n" );
- fprintf( stdout, " 32 bits of memory and may therefore be represented by 1 word.\n" );
- fprintf( stdout, " The following formula is used: sizeof('memory array')/sizeof(float)\n\n" );
-}
-#endif
-
typedef struct
{
uint32_t frameCounter;
@@ -571,17 +531,10 @@ int main(
int32_t delayTimeScale = 0;
int16_t i, numChannels;
ivas_error error = IVAS_ERR_OK;
-#ifdef WMOPS
- size_t SRAM_size;
-#endif
#ifdef WMOPS
reset_wmops();
- reset_stack();
-#endif
-
-#ifdef RAM_COUNTING_TOOL
- mem_count_init( 0, USE_32BITS );
+ reset_mem( USE_32BITS );
#endif
for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i )
@@ -809,10 +762,10 @@ int main(
inBufferSize = frameSize_smpls * totalNumInChannels;
outBufferSize = frameSize_smpls * numOutChannels;
- inpInt16Buffer = count_malloc( inBufferSize * sizeof( int16_t ) );
- inFloatBuffer = count_malloc( inBufferSize * sizeof( float ) );
- outInt16Buffer = count_malloc( outBufferSize * sizeof( int16_t ) );
- outFloatBuffer = count_malloc( outBufferSize * sizeof( float ) );
+ inpInt16Buffer = malloc( inBufferSize * sizeof( int16_t ) );
+ inFloatBuffer = malloc( inBufferSize * sizeof( float ) );
+ outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) );
+ outFloatBuffer = malloc( outBufferSize * sizeof( float ) );
inBuffer.config.numSamplesPerChannel = (int16_t) frameSize_smpls;
inBuffer.config.numChannels = (int16_t) totalNumInChannels;
@@ -823,6 +776,7 @@ int main(
outBuffer.data = outFloatBuffer;
#ifdef WMOPS
+ reset_stack();
reset_wmops();
#endif
@@ -1013,6 +967,9 @@ int main(
#ifdef WMOPS
update_wmops();
+#ifdef MEM_COUNT_DETAILS
+ export_mem( "mem_analysis.csv" );
+#endif
#endif
}
@@ -1044,10 +1001,10 @@ int main(
#endif
/* === Close === */
- count_free( inpInt16Buffer );
- count_free( inFloatBuffer );
- count_free( outInt16Buffer );
- count_free( outFloatBuffer );
+ free( inpInt16Buffer );
+ free( inFloatBuffer );
+ free( outInt16Buffer );
+ free( outFloatBuffer );
for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i )
{
MasaFileReader_close( &masaReaders[i] );
@@ -1060,15 +1017,9 @@ int main(
IsmPositionProvider_close( positionProvider );
RenderConfigReader_close( &renderConfigReader );
-#ifdef RAM_COUNTING_TOOL
-#ifdef WMOPS
- SRAM_size =
-#endif
- mem_count_summary( USE_DEFAULT );
-#endif
#ifdef WMOPS
print_wmops();
- print_mem_renderer( SRAM_size );
+ print_mem( NULL );
#endif
return 0;
@@ -1597,7 +1548,7 @@ IsmPositionProvider *IsmPositionProvider_open(
IsmPositionProvider *ipp;
uint16_t i;
- ipp = (IsmPositionProvider *) count_malloc( sizeof( IsmPositionProvider ) );
+ ipp = (IsmPositionProvider *) malloc_( sizeof( IsmPositionProvider ) );
ipp->frameCounter = 0;
ipp->numObjects = 0;
@@ -1714,16 +1665,16 @@ void IsmPositionProvider_close( IsmPositionProvider *positionProvider )
if ( positionProvider->positions[i] != NULL )
{
- count_free( positionProvider->positions[i] );
+ free( positionProvider->positions[i] );
}
if ( positionProvider->positionDurations[i] != NULL )
{
- count_free( positionProvider->positionDurations[i] );
+ free( positionProvider->positionDurations[i] );
}
}
- count_free( positionProvider );
+ free( positionProvider );
return;
}
@@ -1972,8 +1923,8 @@ static void parseIsm(
if ( parseUint32( line, &numberOfObjectPositionsToRead ) == 0 )
{
positionProvider->numPositions[idx] = numberOfObjectPositionsToRead;
- positionProvider->positions[idx] = count_malloc( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) );
- positionProvider->positionDurations[idx] = count_malloc( numberOfObjectPositionsToRead * sizeof( uint16_t ) );
+ positionProvider->positions[idx] = malloc_( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) );
+ positionProvider->positionDurations[idx] = malloc_( numberOfObjectPositionsToRead * sizeof( uint16_t ) );
for ( i = 0; i < numberOfObjectPositionsToRead; ++i )
{
diff --git a/ci/complexity_measurements/genWebpageData_Prom.csh b/ci/complexity_measurements/genWebpageData_Prom.csh
deleted file mode 100755
index d6e716f0c5455228478c620a759148b00a6aacc5..0000000000000000000000000000000000000000
--- a/ci/complexity_measurements/genWebpageData_Prom.csh
+++ /dev/null
@@ -1,220 +0,0 @@
-#!/bin/tcsh
-
-# (C) 2022 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
-# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
-# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
-# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
-# contributors to this repository. All Rights Reserved.
-
-# This software is protected by copyright law and by international treaties.
-# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
-# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
-# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
-# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
-# contributors to this repository retain full ownership rights in their respective contributions in
-# the software. This notice grants no license of any kind, including but not limited to patent
-# license, nor is any license granted by implication, estoppel or otherwise.
-
-# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
-# contributions.
-
-# This software is provided "AS IS", without any express or implied warranties. The software is in the
-# development stage. It is intended exclusively for experts who have experience with such software and
-# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
-# and fitness for a particular purpose are hereby disclaimed and excluded.
-
-# Any dispute, controversy or claim arising under or in relation to providing this software shall be
-# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
-# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
-# the United Nations Convention on Contracts on the International Sales of Goods.
-
-set maxValues = 40
-
-if (${#argv} != 3) then
- echo usage: $0 \ \