Commit 0fd20754 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge from main

parents 2c7c499a c823b5b2
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ stages:

.build-job-linux:
  stage: build
  timeout: "2 minutes"
  timeout: "4 minutes"
  tags:
    - ivas-linux

@@ -928,10 +928,13 @@ coverage-test-on-main-scheduled:
  script:
    - *print-common-info
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run external renderer script  
    - python3 tests/create_short_testvectors.py
    - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest -q -n auto tests/renderer/test_renderer_be_comparison.py
    - lcov -c -d obj -o coverage.info
    - genhtml coverage.info -o coverage
  artifacts:
+2 −5
Original line number Diff line number Diff line
@@ -143,19 +143,16 @@
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\lib_debug\debug.c" />
    <ClCompile Include="..\lib_debug\memory.c" />
    <ClCompile Include="..\lib_debug\mem_count.c" />
    <ClCompile Include="..\lib_debug\snr.c" />
    <ClCompile Include="..\lib_debug\sba_debug.c" />
    <ClCompile Include="..\lib_debug\wmops.c" />
    <ClCompile Include="..\lib_debug\wmc_auto.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_debug\debug.h" />
    <ClInclude Include="..\lib_debug\deb_out.h" />
    <ClInclude Include="..\lib_debug\errorhnd.h" />
    <ClInclude Include="..\lib_debug\mem_count.h" />
    <ClInclude Include="..\lib_debug\sba_debug.h" />
    <ClInclude Include="..\lib_debug\wmops.h" />
    <ClInclude Include="..\lib_debug\wmc_auto.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@
      <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
      <OmitFramePointers>false</OmitFramePointers>
      <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
      <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <StringPooling>true</StringPooling>
      <ExceptionHandling />
+14 −72
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@

*******************************************************************************************************/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#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 <stdio.h>
#include <string.h>
#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 <stdlib.h>
#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
    }
+12 −68
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@

*******************************************************************************************************/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#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 <stdio.h>
#include <string.h>
#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 <stdlib.h>
#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
Loading