Loading .gitlab-ci.yml +27 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ variables: - 'pytest-renderer' - 'complexity' - 'coverage' - 'voip-be-test' default: interruptible: true # Make all jobs by default interruptible Loading Loading @@ -86,6 +88,9 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' variables: IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test' variables: IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch variables: IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' Loading Loading @@ -1028,6 +1033,7 @@ coverage-test-on-main-scheduled: # Build DuT binaries with GCOV - make clean - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy to ensure instrumented renderer is run in the first pytest call - testcase_timeout=$TESTCASE_TIMEOUT_LTV - exit_code_dec=0 Loading Loading @@ -1118,6 +1124,27 @@ ivas-pytest-renderer: <<: *ivas-pytest-anchor # --------------------------------------------------------------- # Various other tests # --------------------------------------------------------------- # TODO: actually run on MR once main problems are fixed voip-be-on-merge-request: extends: - .test-job-linux-needs-testv-dir rules: # - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "voip-be-test" stage: test needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - *print-common-info - make clean - make -j - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py # --------------------------------------------------------------- # Complexity measurement jobs # --------------------------------------------------------------- Loading lib_com/basop_util.c +38 −0 Original line number Diff line number Diff line Loading @@ -804,6 +804,44 @@ Word16 getScaleFactor32( /* o: measured headroom in range [ return i; } Word16 getScaleFactor32_copy( /* o: measured headroom in range [0..31], 0 if all x[i] == 0 */ const Word32 *x, /* i: array containing 32-bit data */ const Word32 len_x ) /* i: length of the array to scan */ { Word32 i; Word16 i_min, i_max; Word32 x_min, x_max; x_max = 0; move32(); x_min = 0; move32(); FOR( i = 0; i < len_x; i++ ) { if ( x[i] >= 0 ) x_max = L_max( x_max, x[i] ); if ( x[i] < 0 ) x_min = L_min( x_min, x[i] ); } i_max = 0x20; move16(); i_min = 0x20; move16(); if ( x_max != 0 ) i_max = norm_l( x_max ); if ( x_min != 0 ) i_min = norm_l( x_min ); i_max = s_and( s_min( i_max, i_min ), 0x1F ); return i_max; } Word16 normalize16( Word16 mantissa, Word16 *pexponent ) { Word16 tmp; Loading lib_com/basop_util.h +3 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,9 @@ Word16 getScaleFactor32( const Word32 *x, /* i : array containing 32-bit data */ const Word16 len_x ); /* i : length of the array to scan */ Word16 getScaleFactor32_copy( /* o: measured headroom in range [0..31], 0 if all x[i] == 0 */ const Word32 *x, /* i: array containing 32-bit data */ const Word32 len_x ); /* i: length of the array to scan */ /** * \brief normalize mantissa and update the exponent accordingly. Loading lib_com/bits_alloc.c +1 −12 Original line number Diff line number Diff line Loading @@ -42,15 +42,14 @@ #include "ivas_rom_com.h" #include "wmc_auto.h" #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * Local function prototypes *--------------------------------------------------------------------*/ static int16_t BITS_ALLOC_adjust_acelp_fixed_cdk( const int16_t bits_frame, int16_t *fixed_cdk_index, const int16_t nb_subfr ); #ifndef IVAS_FLOAT_FIXED static int16_t allocate_unused( const int32_t core_brate, const int16_t coder_type, const int16_t unused_bits, const int16_t nb_prm, const int16_t subfr, const int16_t prm_type, int16_t *prm_bit_mode ); #endif typedef enum { Loading Loading @@ -358,7 +357,6 @@ static int16_t BITS_ALLOC_adjust_acelp_fixed_cdk( * Selection of fixed innovation codebook bitbudget table *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED static int16_t fcb_table( const int16_t n, const int16_t L_subfr ) Loading @@ -373,7 +371,6 @@ static int16_t fcb_table( return ( out ); } #endif /*-------------------------------------------------------------------* * acelp_FCB_allocator() Loading @@ -381,7 +378,6 @@ static int16_t fcb_table( * Routine to allocate fixed innovation codebook bit-budget *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED static ivas_error acelp_FCB_allocator( int16_t *nBits, /* i/o: available bit-budget */ int16_t fixed_cdk_index[], /* o : codebook index */ Loading Loading @@ -512,7 +508,6 @@ static ivas_error acelp_FCB_allocator( return error; } #endif /*-------------------------------------------------------------------* Loading @@ -523,7 +518,6 @@ static ivas_error acelp_FCB_allocator( * - per channel bitrate minimum is 13250 kbps for ACELP@16kHz *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED ivas_error config_acelp1_IVAS( const int16_t enc_dec, /* i : encoder/decoder flag */ const int32_t total_brate, /* i : total bitrate */ Loading Loading @@ -1341,7 +1335,6 @@ ivas_error config_acelp1_IVAS( return error; } #endif /*-------------------------------------------------------------------* * allocate_unused() Loading @@ -1349,7 +1342,6 @@ ivas_error config_acelp1_IVAS( * Allocate unused bits *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED static int16_t allocate_unused( const int32_t core_brate, const int16_t coder_type, Loading Loading @@ -1426,7 +1418,6 @@ static int16_t allocate_unused( return bit_added + max_bit_per_pos; } #endif /*-------------------------------------------------------------------* Loading @@ -1436,8 +1427,6 @@ static int16_t allocate_unused( *--------------------------------------------------------------------*/ /*! r: ACELP16k flag */ #ifndef IVAS_FLOAT_FIXED int16_t set_ACELP_flag_IVAS( const int16_t element_mode, /* i : element mode */ const int32_t element_brate, /* i : element bitrate */ Loading lib_com/cng_exc.c +2 −1 Original line number Diff line number Diff line Loading @@ -478,7 +478,7 @@ void cng_params_postupd( * * update CNG parameters *-------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void cng_params_upd( const float lsp_new[], /* i : LSP parameters */ const float exc2[], /* i : current enhanced excitation */ Loading Loading @@ -581,6 +581,7 @@ void cng_params_upd( return; } #endif /*---------------------------------------------------------------------* Loading Loading
.gitlab-ci.yml +27 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ variables: - 'pytest-renderer' - 'complexity' - 'coverage' - 'voip-be-test' default: interruptible: true # Make all jobs by default interruptible Loading Loading @@ -86,6 +88,9 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity' variables: IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test' variables: IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch variables: IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' Loading Loading @@ -1028,6 +1033,7 @@ coverage-test-on-main-scheduled: # Build DuT binaries with GCOV - make clean - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy to ensure instrumented renderer is run in the first pytest call - testcase_timeout=$TESTCASE_TIMEOUT_LTV - exit_code_dec=0 Loading Loading @@ -1118,6 +1124,27 @@ ivas-pytest-renderer: <<: *ivas-pytest-anchor # --------------------------------------------------------------- # Various other tests # --------------------------------------------------------------- # TODO: actually run on MR once main problems are fixed voip-be-on-merge-request: extends: - .test-job-linux-needs-testv-dir rules: # - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "voip-be-test" stage: test needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - *print-common-info - make clean - make -j - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py # --------------------------------------------------------------- # Complexity measurement jobs # --------------------------------------------------------------- Loading
lib_com/basop_util.c +38 −0 Original line number Diff line number Diff line Loading @@ -804,6 +804,44 @@ Word16 getScaleFactor32( /* o: measured headroom in range [ return i; } Word16 getScaleFactor32_copy( /* o: measured headroom in range [0..31], 0 if all x[i] == 0 */ const Word32 *x, /* i: array containing 32-bit data */ const Word32 len_x ) /* i: length of the array to scan */ { Word32 i; Word16 i_min, i_max; Word32 x_min, x_max; x_max = 0; move32(); x_min = 0; move32(); FOR( i = 0; i < len_x; i++ ) { if ( x[i] >= 0 ) x_max = L_max( x_max, x[i] ); if ( x[i] < 0 ) x_min = L_min( x_min, x[i] ); } i_max = 0x20; move16(); i_min = 0x20; move16(); if ( x_max != 0 ) i_max = norm_l( x_max ); if ( x_min != 0 ) i_min = norm_l( x_min ); i_max = s_and( s_min( i_max, i_min ), 0x1F ); return i_max; } Word16 normalize16( Word16 mantissa, Word16 *pexponent ) { Word16 tmp; Loading
lib_com/basop_util.h +3 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,9 @@ Word16 getScaleFactor32( const Word32 *x, /* i : array containing 32-bit data */ const Word16 len_x ); /* i : length of the array to scan */ Word16 getScaleFactor32_copy( /* o: measured headroom in range [0..31], 0 if all x[i] == 0 */ const Word32 *x, /* i: array containing 32-bit data */ const Word32 len_x ); /* i: length of the array to scan */ /** * \brief normalize mantissa and update the exponent accordingly. Loading
lib_com/bits_alloc.c +1 −12 Original line number Diff line number Diff line Loading @@ -42,15 +42,14 @@ #include "ivas_rom_com.h" #include "wmc_auto.h" #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * Local function prototypes *--------------------------------------------------------------------*/ static int16_t BITS_ALLOC_adjust_acelp_fixed_cdk( const int16_t bits_frame, int16_t *fixed_cdk_index, const int16_t nb_subfr ); #ifndef IVAS_FLOAT_FIXED static int16_t allocate_unused( const int32_t core_brate, const int16_t coder_type, const int16_t unused_bits, const int16_t nb_prm, const int16_t subfr, const int16_t prm_type, int16_t *prm_bit_mode ); #endif typedef enum { Loading Loading @@ -358,7 +357,6 @@ static int16_t BITS_ALLOC_adjust_acelp_fixed_cdk( * Selection of fixed innovation codebook bitbudget table *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED static int16_t fcb_table( const int16_t n, const int16_t L_subfr ) Loading @@ -373,7 +371,6 @@ static int16_t fcb_table( return ( out ); } #endif /*-------------------------------------------------------------------* * acelp_FCB_allocator() Loading @@ -381,7 +378,6 @@ static int16_t fcb_table( * Routine to allocate fixed innovation codebook bit-budget *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED static ivas_error acelp_FCB_allocator( int16_t *nBits, /* i/o: available bit-budget */ int16_t fixed_cdk_index[], /* o : codebook index */ Loading Loading @@ -512,7 +508,6 @@ static ivas_error acelp_FCB_allocator( return error; } #endif /*-------------------------------------------------------------------* Loading @@ -523,7 +518,6 @@ static ivas_error acelp_FCB_allocator( * - per channel bitrate minimum is 13250 kbps for ACELP@16kHz *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED ivas_error config_acelp1_IVAS( const int16_t enc_dec, /* i : encoder/decoder flag */ const int32_t total_brate, /* i : total bitrate */ Loading Loading @@ -1341,7 +1335,6 @@ ivas_error config_acelp1_IVAS( return error; } #endif /*-------------------------------------------------------------------* * allocate_unused() Loading @@ -1349,7 +1342,6 @@ ivas_error config_acelp1_IVAS( * Allocate unused bits *--------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED static int16_t allocate_unused( const int32_t core_brate, const int16_t coder_type, Loading Loading @@ -1426,7 +1418,6 @@ static int16_t allocate_unused( return bit_added + max_bit_per_pos; } #endif /*-------------------------------------------------------------------* Loading @@ -1436,8 +1427,6 @@ static int16_t allocate_unused( *--------------------------------------------------------------------*/ /*! r: ACELP16k flag */ #ifndef IVAS_FLOAT_FIXED int16_t set_ACELP_flag_IVAS( const int16_t element_mode, /* i : element mode */ const int32_t element_brate, /* i : element bitrate */ Loading
lib_com/cng_exc.c +2 −1 Original line number Diff line number Diff line Loading @@ -478,7 +478,7 @@ void cng_params_postupd( * * update CNG parameters *-------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void cng_params_upd( const float lsp_new[], /* i : LSP parameters */ const float exc2[], /* i : current enhanced excitation */ Loading Loading @@ -581,6 +581,7 @@ void cng_params_upd( return; } #endif /*---------------------------------------------------------------------* Loading