Commit 564d8d4a authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into 632-ubsan-offset-to-null-pointer-proto_diffuse_buffer_f-in-dirac-rendering

parents 3e652b3f ad6cde4c
Loading
Loading
Loading
Loading
Loading
+79 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ variables:
    options:
      - 'default'
      - 'test-be-release'
      - 'test-long-self-test'


default:
@@ -46,6 +47,9 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-be-release'
      variables:
        IVAS_PIPELINE_NAME: 'Test BE to release pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-long-self-test'
      variables:
        IVAS_PIPELINE_NAME: 'Test long self-test against main pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'trigger'

stages:
@@ -174,6 +178,8 @@ stages:
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'test-long-self-test' # Skip all the normal jobs when testing manually against release codec
      when: never
    - when: on_success

.rules-merge-request:
@@ -385,6 +391,7 @@ codec-smoke-test:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - smoke_test_output.txt
      - smoke_test_output_plc.txt
@@ -409,6 +416,7 @@ codec-msan:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - test_output.txt
@@ -431,6 +439,7 @@ codec-asan:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - test_output.txt
@@ -454,6 +463,7 @@ codec-usan:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
    expose_as: "usan selftest results"
@@ -859,7 +869,7 @@ clang-format-check:
    expire_in: 1 day
    paths:
      - tmp-formatting-fix/
    when: on_failure
    when: always
    name: "$ARTIFACT_BASE_NAME"
    expose_as: "formatting patch"

@@ -896,7 +906,7 @@ check-first-frame-is-sid:
  artifacts:
    paths:
      - out/logs
    when: on_failure
    when: always
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart"
    expose_as: "logs-sidstart"
    expire_in: "5 days"
@@ -1087,6 +1097,73 @@ test-be-to-release:
      - logs/
    expose_as: "test-be-to-release results"


test-long-self-test:
  tags:
    - ivas-linux-fast
  stage: compare
  resource_group: ivas-long-self-test-resource
  timeout: "50 minutes"
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-long-self-test'
  script:
    - *print-common-info
    - *update-ltv-repo

    ### build branch binaries
    - cmake . -Bbuild-test
    - cmake --build build-test -- -j
    - mv build-test/IVAS_cod ./IVAS_cod
    - mv build-test/IVAS_dec ./IVAS_dec

    ### store the current commit hash
    - source_branch_commit_sha=$(git rev-parse HEAD)

    ### switch to main
    - git checkout main

    ### build main (ref) binaries
    - cmake . -Bbuild-ref
    - cmake --build build-ref -- -j
    - mv build-ref/IVAS_cod ./IVAS_cod_ref
    - mv build-ref/IVAS_dec ./IVAS_dec_ref

    ### Switch back to branch, this could probably be removed later
    - git checkout $source_branch_commit_sha

    ### prepare pytest

    # Copy test vectors from LTV to TESTV
    - cp "$LTV_DIR"/*.wav scripts/testv/
    - cp "$LTV_DIR"/*.met scripts/testv/
    - cp "$LTV_DIR"/*.csv scripts/testv/

    # create references
    - exit_code_ref=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_ltv.prm || exit_code_ref=$?

    ### run pytest self-test using long test vectors
    - exit_code=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --param_file scripts/config/self_test_ltv.prm --html=report-ltv.html --self-contained-html --junit-xml=report-junit-ltv.xml || exit_code=$?
    - zero_errors=$(cat report-junit-ltv.xml | grep -c 'errors="0"') || true

    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - exit 0


  artifacts:
    name: "test-long-self-test--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 4 mos
    paths:
      - report-junit-ltv.xml
      - report-ltv.html
    expose_as: "test-long-self-test results"
    reports:
      junit:
        - report-junit-ltv.xml


# ---------------------------------------------------------------
# Scheduled jobs on main
# ---------------------------------------------------------------
+25 −0
Original line number Diff line number Diff line
<!--- Basic information that is useful -->
- Related issues:
- Requested reviewers: 

### Reason why this change is needed

* This may be a direct copy from the issue.

### Description of the change

* Describe what is done.

### Affected operating points

* Describe here as well as possible what operating points are affected and how
* In minimum, there should be a status for bitstream compatibility and output bit exactness
* For bitstream compatibility, the following levels are helpful for describing encoder
  1. Produced bitstream is BE compared to previous state.
  2. Produced bitstream is non-BE but it is fully backwards compatible for decoding. Decoded output may differ.
  3. Produced bitstream is non-BC. Old decoder cannot decode the produced bitstream correctly.
* For output difference, use BE or non-BE. Additionally, amount of difference can be presented.


<!--- By default, no labels are added as they often come from the issue. Add labels if there is no issue for this. -->
+2 −0
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@
#define FIX_730_DPID_NOT_SET_CORRECTLY                  /* Eri: issue 730: write dpid read from file in correct index, print informative error message when DPID specified is not found. */

#define FIX_RAM_COUNTING_5MS_RENDERING                  /* FhG: fix for correct RAM reporting with 5ms rendering */
#define FIX_786_ERROR_ISM_METADATA_READ                 /* VA: fix error reading past the last line of .csv metadata files */

#define FIX_632_USAN_ERROR_NULL_POINTER                /* FhG: issue 632 USAN offset to null pointer proto_diffuse_buffer_f in dirac rendering*/
/* #################### End BE switches ################################## */
@@ -177,6 +178,7 @@
#define NONBE_FIX_770_PLANAR_SBA_JBM                          /* FhG  : Issue #770: Crash in planar FOA decoding with JBM caused by uninitialized value */
#define NONBE_FIX_760_COHERENCE_MASA                          /* Nokia: Issue 760: fixes decoder crash for some cases when all energy ratios are 1 */
#define NONBE_FIX_752_OSBA_MISCONFIG_MCT                      /* FhG: issue 752: misconfiguration of MCT causes crashes for coding with sampling rate under 48kHz at 256kbps*/
#define NONBE_FIX_780_ISM_STARTS_WITH_SID                     /* VA: issue 780: fix Crash in ISM decoding when bitstream starts with an SID and output_config is not EXT */

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

+3 −0
Original line number Diff line number Diff line
@@ -623,6 +623,9 @@ ivas_error ivas_dec_setup(
            st_ivas->nchan_ism = nchan_ism;

            /* read ism_mode */
#ifdef NONBE_FIX_780_ISM_STARTS_WITH_SID
            st_ivas->ism_mode = ISM_MODE_DISC;
#endif
            if ( nchan_ism > 2 )
            {
                k -= nchan_ism; /* SID metadata flags */
+14 −0
Original line number Diff line number Diff line
@@ -113,6 +113,19 @@ ivas_error IsmFileReader_readNextFrame(

    file = self->file;

#ifdef FIX_786_ERROR_ISM_METADATA_READ
    while ( fgets( char_buff, META_LINE_LENGTH, file ) == NULL )
    {
        if ( feof( self->file ) )
        {
            rewind( self->file );
        }
        else
        {
            return IVAS_ERR_FAILED_FILE_READ;
        }
    }
#else
    while ( feof( self->file ) )
    {
        rewind( self->file );
@@ -122,6 +135,7 @@ ivas_error IsmFileReader_readNextFrame(
    {
        return IVAS_ERR_FAILED_FILE_READ;
    }
#endif

    char_ptr = strtok( char_buff, "," );
    i = 0;
Loading