Commit 23c52551 authored by sbsarac's avatar sbsarac
Browse files

Merge branch 'main' into 1053-reverb-reconfiguration-runtime-aeid-file-tests

parents 73cf0e4d c72b24f2
Loading
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -227,12 +227,12 @@ stages:
    - if [ $CLANG_NUM -eq 1 ]; then sanitizer_type="MemorySanitizer"; elif [ $CLANG_NUM -eq 2 ]; then sanitizer_type="AddressSanitizer"; elif [ $CLANG_NUM -eq 3 ]; then sanitizer_type="UndefinedBehaviorSanitizer"; else echo "Wrong CLANG_NUM $CLANG_NUM given!"; exit 1; fi

    # run encoder and decoder with 20ms renderer framesize first, use reference creation mode
    - python3 -m pytest $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$?
    - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$?
    # for 10ms and 5ms renderer framesize, we only need to run the decoder part as renderer framesize is a decoder-only option
    # set tolerance very high do ignore any BE differences due to the different renderer framesizes, those can appear due to the limiter being active
    # we are only interested in runtime errors from the sanitizers and ignore the diffs
    - python3 -m pytest $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$?
    - python3 -m pytest $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$?
    - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$?
    - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$?

    - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi

@@ -561,7 +561,7 @@ codec-msan:
  before_script:
    - CLANG_NUM=1
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test.prm"
  <<: *sanitizer-selftest-anchor

# code selftest testvectors with address-sanitizer binaries
@@ -571,7 +571,7 @@ codec-asan:
  before_script:
    - CLANG_NUM=2
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test.prm"
  <<: *sanitizer-selftest-anchor

# code selftest testvectors with undefined-behaviour-sanitizer binaries
@@ -583,7 +583,7 @@ codec-usan:
  before_script:
    - CLANG_NUM=3
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test.prm"
  <<: *sanitizer-selftest-anchor

# compare bit-exactness between 5ms and 20 on the branch
@@ -1661,13 +1661,13 @@ ltv-msan:
    - .sanitizer-selftest-ltv
  rules:
    - if: $SANITIZER_SCHEDULE_E
  timeout: 3 hour
  timeout: 4 hour
  tags:
    - ivas-linux-fast
  before_script:
    - CLANG_NUM=1
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/test_param_file_ltv.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm"
  <<: *sanitizer-selftest-anchor

# code selftest long testvectors with address-sanitizer binaries
@@ -1677,14 +1677,14 @@ ltv-asan:
  rules:
    - if: $SANITIZER_SCHEDULE_E
      when: delayed
      start_in: 3 hours
      start_in: 4 hours
  tags:
    - ivas-linux-fast
  timeout: 3 hour
  before_script:
    - CLANG_NUM=2
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/test_param_file_ltv.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm"
  <<: *sanitizer-selftest-anchor

# code selftest long testvectors with undefined-behaviour-sanitizer binaries
@@ -1694,14 +1694,14 @@ ltv-usan:
  rules:
    - if: $SANITIZER_SCHEDULE_E
      when: delayed
      start_in: 6 hours
      start_in: 7 hours
  tags:
    - ivas-linux-fast
  timeout: 3 hour
  before_script:
    - CLANG_NUM=3
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/test_param_file_ltv.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm"
  <<: *sanitizer-selftest-anchor

.sanitizer-test-template:
+6 −1
Original line number Diff line number Diff line
@@ -1458,12 +1458,17 @@ typedef enum
/*----------------------------------------------------------------------------------*
 * Amplitude Panning (EFAP, VBAP) constants
 *----------------------------------------------------------------------------------*/

#ifndef FIX_1050_EFAP_ALLOC
#define PANNING_AZI_RESOLUTION                  2
#define PANNING_ELE_RESOLUTION                  5
#endif

#define EFAP_MAX_CHAN_NUM                       5                           /* Maximum number of channels that constitute a polygon, 4 or 5 */
#ifdef FIX_1050_EFAP_ALLOC
#define EFAP_MAX_POLY_SET                       54                          /* Upper bound on number of polygons; found to be 54 in the worst case for a speaker setup of 16.0 */
#else
#define EFAP_MAX_POLY_SET                       50                          /* Upper bound on number of polygons; with a Speaker setup of 16.0, we obtain 44 polygons/triangles in the matlab implementation. */
#endif

#define EFAP_MODE_EFAP                          0                           /* EFAP Panning */
#define EFAP_MODE_EFIP                          1                           /* EFIP Panning */
+2 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@
#define FIX_989_TD_REND_ROM                             /* Eri: Clean-up for TD renderer and completion of ROM generation tool */

#define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR          /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/
#define FIX_1050_EFAP_ALLOC                             /* FhG: issue 1050: reduction of memory allocated to EFAP handle */

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

@@ -190,6 +191,7 @@
#define NONBE_FIX_1087_OOB_SBA_DTX_RS                   /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */
#define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS            /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */
#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR            /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
#define NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO    /* FhG: avoid sidegain DFT-Stereo param to be larger than 1 when converting from Dirac parameters */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+7 −0
Original line number Diff line number Diff line
@@ -66,7 +66,14 @@ ivas_error ivas_ism_renderer_open(
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISM renderer\n" ) );
    }

#ifdef FIX_1050_EFAP_ALLOC
    if ( st_ivas->hIntSetup.is_loudspeaker_setup &&
         st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO &&
         st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL &&
         st_ivas->hEFAPdata == NULL )
#else
    if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL && st_ivas->hEFAPdata == NULL )
#endif
    {
        if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK )
        {
+13 −0
Original line number Diff line number Diff line
@@ -395,10 +395,23 @@ static void map_params_dirac_to_stereo(
                }
            }

#ifdef NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO
            /* Clamp values here. [-1, 1] is the allowed range, but due to precision issues they can be slightly off which can cause problems later. */
            side_gain[b] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b] = max( min( side_gain[b], 1 ), -1 );
            side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b + STEREO_DFT_BAND_MAX] = max( min( side_gain[b + STEREO_DFT_BAND_MAX], 1 ), -1 );
            /* for residual prediction gain, allowed range is [0, 1]*/
            res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b] = max( min( res_pred_gain[b], 1 ), 0 );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = max( min( res_pred_gain[b + STEREO_DFT_BAND_MAX], 1 ), 0 );
#else
            side_gain[b] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] );
            res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] );
#endif
        }
    }

Loading