Commit 8a7c3f6d authored by norvell's avatar norvell
Browse files

Merge with main

parents 25781b8e 2b04dcec
Loading
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -167,6 +167,10 @@ stages:
  - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)[[:space:]]*\*\//\1/g" ./lib_com/options.h
  - sed -i.bak -e "s/\/\/[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)/\1/g"        ./lib_com/options.h

.disable-limiter: &disable-limiter
# automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment
  - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h

.get-commits-behind-count: &get-commits-behind-count
  - echo $CI_COMMIT_SHA
  - echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
@@ -523,6 +527,54 @@ codec-usan:
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
  <<: *sanitizer-selftest-anchor

# compare bit-exactness between 5ms and 20 on the branch
pytest-compare-20ms-and-5ms-rendering:
  extends:
    - .test-job-linux
    - .rules-merge-request
  stage: test
  needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"]
  script:
    - *print-common-info
    - *disable-limiter
    - make clean
    - make -j
    ### prepare pytest
    - cp IVAS_cod IVAS_cod_ref
    - cp IVAS_dec IVAS_dec_ref
    # create short test vectors
    - python3 tests/create_short_testvectors.py
    # create references
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref_part2
    ### run pytest
    - exit_code=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only || exit_code5=$?
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only || exit_code10=$?
    - zero_errors5=$(cat report-junit-5ms.xml | grep -c 'errors="0"') || true
    - zero_errors10=$(cat report-junit-10ms.xml | grep -c 'errors="0"') || true
    - zero_errors=1
    - if [ $zero_errors5 != 1 ]; then echo "run error in with 5ms rendering encountered"; zero_errors=0 ; fi
    - if [ $zero_errors10 != 1 ]; then echo "run error in with 10ms rendering encountered"; zero_errors=0 ; fi
    - if [ $zero_errors != 1 ]; then exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code5 -eq 1 ]; then echo "Non-bitexact cases encountered with 5ms rendering!"; exit_code=1; fi
    - if [ $exit_code10 -eq 1 ]; then echo "Non-bitexact cases encountered with 10ms rendering!"; exit_code=1; fi
    - if [ $exit_code -eq 1 ]; then exit $EXIT_CODE_FAIL; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    expose_as: "pytest 5ms and 10ms vs 20ms results"
    paths:
      - report-junit-5ms.xml
      - report-5ms.html
      - report-junit-10ms.xml
      - report-10ms.html
    reports:
      junit:
        - report-junit-5ms.xml
        - report-junit-10ms.xml

# test renderer executable
renderer-smoke-test:
  extends:
@@ -1988,6 +2040,8 @@ coverage-test-on-main-scheduled:
    - python3 tests/create_short_testvectors.py
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 5 --decoder_only
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 10 --decoder_only
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_ref
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_cut    
    - lcov -c -d obj -o coverage_stv.info # extract coverage of short test vectors here
+2 −1
Original line number Diff line number Diff line
@@ -3499,12 +3499,13 @@ ivas_error ivas_cldfb_dec_reconfig(
    const int16_t numCldfbSyntheses_old                         /* i  : number of CLDFB synthesis instances in previous frame */
);

#ifndef FIX_993_REMOVE_SBA_GET_ORDER
/*! r: Ambisonic (SBA) order */
int16_t ivas_sba_get_order(
    const int16_t nb_channels,                                  /* i  : Number of ambisonic channels            */
    const int16_t sba_planar                                    /* i  : SBA planar flag                         */
);

#endif
/*! r: Ambisonic (SBA) order used for analysis and coding */
int16_t ivas_sba_get_analysis_order(
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                      */
+6 −2
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ void ivas_sba_config(
    int16_t *element_mode          /* o  : element mode of the core coder           */
)
{
#ifndef FIX_993_REMOVE_SBA_GET_ORDER
    if ( ( sba_order < 0 ) && ( nb_channels < 0 ) )
    {
        assert( 0 && "Either order or number of channels must be positive" );
@@ -77,6 +78,9 @@ void ivas_sba_config(
        nb_channels = ivas_sba_get_nchan( sba_order, sba_planar );
    }
    else
#else
    if ( nb_channels > 0 )
#endif
    {
        if ( sba_planar )
        {
@@ -117,7 +121,7 @@ void ivas_sba_config(
    return;
}


#ifndef FIX_993_REMOVE_SBA_GET_ORDER
/*-------------------------------------------------------------------*
 * ivas_sba_get_order()
 *
@@ -147,7 +151,7 @@ int16_t ivas_sba_get_order(

    return ( sba_order );
}

#endif

/*-------------------------------------------------------------------*
 * ivas_sba_get_analysis_order()
+3 −0
Original line number Diff line number Diff line
@@ -146,6 +146,7 @@

/* keep as part of options.h */
#define BASOP_NOGLOB                                    /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */
/*#define DISABLE_LIMITER */                            /* test switch for testing BE between 5ms and 20ms rendering                                                  */ 

/* ################## Start DEVELOPMENT switches ######################### */

@@ -157,6 +158,7 @@

#define FIX_998_UNUSED_FUNCTION                         /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ 
#define FIX_1009_ISM_NONDIEGETIC_PANNING                /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan      */
#define FIX_993_REMOVE_SBA_GET_ORDER                    /* VA: issue 993: remove unused function ivas_sba_get_order() */

/* #################### End BE switches ################################## */

@@ -170,6 +172,7 @@
#define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO              /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */
#define NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING       /* FhG: issue 987: solution b: downmix HOA3 to stereo a input for the reverberator */
#define NONBE_FIX_1006_PAST_DMX_NRG_ERROR                     /* Eri/FhG: Issue 1006: Bug fix in ivas_stereo_dft_dec not replicated in ivas_stereo_dft_dec_dmx */
#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO                 /* Eri: Issue 1010: Division by zero in Stereo CNG */

/* ##################### End NON-BE switches ########################### */

+8 −0
Original line number Diff line number Diff line
@@ -2947,7 +2947,11 @@ void stereo_dft_dec_smooth_parameters(
        if ( hStereoDft->frame_sid_nodata )
        {
            /* set new xfade target if new itd received */
#ifdef NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO
            if ( hStereoDft->ipd_xfade_counter < STEREO_DFT_ITD_CNG_XFADE )
#else
            if ( hStereoDft->gipd[k + k_offset] != hStereoDft->ipd_xfade_target )
#endif
            {
                if ( ( hStereoDft->gipd[k + k_offset] - hStereoDft->ipd_xfade_prev ) > EVS_PI )
                {
@@ -2993,7 +2997,11 @@ void stereo_dft_dec_smooth_parameters(
        if ( hStereoDft->frame_sid_nodata )
        {
            /* set new xfade target if new itd received */
#ifdef NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO
            if ( hStereoDft->itd_xfade_counter < STEREO_DFT_ITD_CNG_XFADE )
#else
            if ( hStereoDft->itd[k + k_offset] != hStereoDft->itd_xfade_target )
#endif
            {
                hStereoDft->itd_xfade_target = hStereoDft->itd[k + k_offset];
                hStereoDft->itd_xfade_step = ( hStereoDft->itd_xfade_target - hStereoDft->itd_xfade_prev ) / ( STEREO_DFT_ITD_CNG_XFADE - hStereoDft->itd_xfade_counter );
Loading