Commit bad1fe37 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files
Merge branch 'main' of ssh://forge.3gpp.org:29419/ivas-codec-pc/ivas-codec into external-renderer-delay-alignment
parents e4a6a6f6 d176c83d
Loading
Loading
Loading
Loading
Loading
+36 −49
Original line number Diff line number Diff line
@@ -544,81 +544,68 @@ renderer-smoke-test:
      junit:
        - report-junit.xml

# test renderer executable with cmake + asan
renderer-asan:
.renderer-sanitizer-job:
  extends:
    - .test-job-linux
    - .rules-merge-request-to-main
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=asan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - testcase_timeout=180
    - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py --testcase_timeout=$testcase_timeout

  timeout: "30 minutes"
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
    expose_as: "renderer asan pytest results"
      - report.html
    reports:
      junit:
        - report-junit.xml
  before_script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=$SANITIZER_BUILD_STRING -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    # rename files to fit naming convention
    # en- and decoder needed because of split rendering testcases
    - mv IVAS_cod IVAS_cod_ref
    - mv IVAS_dec IVAS_dec_ref
    - mv IVAS_rend IVAS_rend_ref
    - testcase_timeout=180

# test renderer executable with cmake + asan
renderer-asan:
  extends:
    - .renderer-sanitizer-job
  variables:
    SANITIZER_BUILD_STRING: "asan"
  script:
    - python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout
  artifacts:
    expose_as: "renderer asan result"


# test renderer executable with cmake + msan
renderer-msan:
  extends:
    - .test-job-linux
    - .rules-merge-request-to-main
  needs: ["build-codec-linux-cmake"]
  stage: test
    - .renderer-sanitizer-job
  variables:
    SANITIZER_BUILD_STRING: "msan"
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=msan  -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - testcase_timeout=180
    - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py --testcase_timeout=$testcase_timeout

    - python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
    expose_as: "renderer msan pytest results"
    reports:
      junit:
        - report-junit.xml
    expose_as: "renderer msan result"


# test renderer executable with cmake + usan
renderer-usan:
  extends:
    - .test-job-linux
    - .rules-merge-request-to-main
  needs: ["build-codec-linux-cmake"]
  stage: test
    - .renderer-sanitizer-job
  variables:
    SANITIZER_BUILD_STRING: "usan"
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=usan  -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - testcase_timeout=180
    - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1,log_path=usan_log_catchall python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py --testcase_timeout=$testcase_timeout
    - grep_exit_code=0
    - touch usan_log_empty # Creates an empty file, this is to avoid "grep: usan_log_*: No such file or directory" in case no USAN failures are reported from pytest
    - grep UndefinedBehaviorSanitizer usan_log_* || grep_exit_code=$?
    - if [ $grep_exit_code != 1 ] ; then echo "Run errors in test_renderer.py with Clang undefined-behavior-sanitizer"; exit 1; fi

    - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 -m pytest -q --tb=no -n auto --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py --create_ref --testcase_timeout=$testcase_timeout
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
    expose_as: "renderer usan pytest results"
    reports:
      junit:
        - report-junit.xml
    expose_as: "renderer usan result"


# compare renderer bitexactness between target and source branch
renderer-pytest-on-merge-request:
+2 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_938_COMPILER_WARNING                        /* FhG: Fix compiler warning in ivas_mdct_core_reconstruct() */

#define FIX_1288_SPLIT_REND_XSAN                        /* Dlb: Fix asan, msan and usan issues in split rendering mode*/

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

@@ -176,6 +176,7 @@
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */
#define NONBE_1329_FIX_OSBA_CRASH                       /* FhG: issue 1329: prevent assert when bit budget is low*/
#define NONBE_1339_FIXOSBA_EXT_LOUDNESS                 /* FhG: issue 1339: apply scaling with EXT output in OSBA high-BR mode */

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

+4 −1
Original line number Diff line number Diff line
@@ -2782,8 +2782,11 @@ void ivas_destroy_dec(
    ivas_dirac_dec_close_binaural_data( st_ivas->hDiracDecBin );

    /* Crend handle */
#ifndef FIX_1288_SPLIT_REND_XSAN
    ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ), ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses );

#else
    ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) );
#endif
    /* Reverb handle */
    ivas_reverb_close( &st_ivas->hReverb );

+4 −0
Original line number Diff line number Diff line
@@ -253,7 +253,11 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            }

            /* close the crend binaural renderer */
#ifndef FIX_1288_SPLIT_REND_XSAN
            ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ), ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses );
#else
            ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) );
#endif
        }
    }

+6 −0
Original line number Diff line number Diff line
@@ -1110,6 +1110,12 @@ ivas_error ivas_jbm_dec_render(
                {
                    mvr2r( p_tc[n], p_output[n], *nSamplesRendered );
                }
#ifdef NONBE_1339_FIXOSBA_EXT_LOUDNESS
                for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ )
                {
                    v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered );
                }
#endif
            }
            else
            {
Loading