Commit c1ad9087 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge branch 'main' into b_20230817_jbm-for-osba

parents 88561c32 e579181d
Loading
Loading
Loading
Loading
Loading
+83 −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,77 @@ 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'
  allow_failure:
    exit_codes:
      - 123
  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
    - if [ $exit_code -eq 1 ]; then echo "Non-bitexact cases encountered!"; exit $EXIT_CODE_NON_BE; 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. -->
+22 −5
Original line number Diff line number Diff line
@@ -4532,8 +4532,11 @@ void ivas_spar_update_md_hist(
);

int16_t ivas_spar_chk_zero_coefs(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    Decoder_Struct *st_ivas                                    /* i/o: IVAS decoder handle                     */
#ifndef NONBE_FIX_698_SBA_MSAN
    ,
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
#endif
);

void ivas_spar_smooth_md_dtx(
@@ -4939,9 +4942,7 @@ void ivas_copy_band_coeffs_idx_to_arr(

void ivas_clear_band_coeffs( 
    ivas_band_coeffs_t *pband_coeffs,
    const uint16_t num_bands,
    const uint16_t num_ts

    const uint16_t num_bands
);

void ivas_clear_band_coeff_idx( 
@@ -5305,6 +5306,18 @@ void ivas_mc2sba(
    const float gain_lfe                                        /* i  : gain for LFE, 0=ignore LFE                      */
);

#ifdef NONBE_FIX_727_MC_PARAMUPMIX_HEADROTATION
void ivas_param_mc_mc2sba_cldfb(
    IVAS_OUTPUT_SETUP hTransSetup,                                                /* i  : transported MC Format                                       */
    float *hoa_encoder,                                                           /* i  : HOA3 encoder for the transported MC format                  */
    const int16_t slot_idx,                                                       /* i  : current slot in the subframe                                */
    float Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: Contains the MC signals (on input) and the HOA3 (on output) */
    float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: Contains the MC signals (on input) and the HOA3 (on output) */
    const int16_t nBands,                                                         /* i  : number of synth CLDFB bands                                 */
    const float gain_lfe                                                          /* i  : gain applied to LFE                                        */
);
#endif

void ivas_ism2sba(
    float *buffer_td[],                                         /* i/o: TD signal buffers                               */
    ISM_RENDERER_HANDLE hIsmRendererData,                       /* i/o: renderer data                                   */
@@ -5661,6 +5674,10 @@ void ivas_osba_enc(
    const ISM_MODE ism_mode,                                    /* i  : ISM mode                                  */
    const int16_t sba_analysis_order,                           /* i  : SBA order evaluated in DirAC/SPAR encoder */
    const int32_t input_Fs                                      /* i  : input sampling rate                       */
#ifdef FIX_732_PLANAR_SBA_OSBA
    ,
    const int16_t sba_planar /* i : planar SBA flag*/
#endif
);

ivas_error ivas_masa_ism_data_open(
+1 −3
Original line number Diff line number Diff line
@@ -1464,9 +1464,7 @@ const int16_t pr_pd_idx_pairs[3][3][2] = { { { 1, 1 },{ 2, 2 },{ 3, 3 } },{ { 1,
const int16_t remix_order_set[1][DIRAC_MAX_ANA_CHANS] = { /* WYZX --> WYXZ... */
    { 0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10 }
};
#ifdef SPAR_HOA_DBG
const int16_t keep_planar[IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS] = { 1, 1, 1, 1, 1, 1 };
#endif
const int16_t HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15};
const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 10, 10, 10, 10};
const int16_t HOA_keep_ind_spar512[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4,  5, 6, 7, 8, 9, 10};
+0 −3
Original line number Diff line number Diff line
@@ -180,9 +180,6 @@ extern const ivas_huff_models_t ivas_huff_drct_r_consts[TOTAL_DRCT_QUANT_STRATS]
extern const ivas_huff_models_t ivas_huff_decd_r_consts[TOTAL_DECD_QUANT_STRATS];
extern const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN];
extern const int16_t remix_order_set[1][DIRAC_MAX_ANA_CHANS];
#ifdef SPAR_HOA_DBG
extern const int16_t keep_planar[IVAS_SPAR_MAX_CH - FOA_CHANNELS];
#endif
extern const int16_t HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN];
extern const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH];
extern const int16_t HOA_keep_ind_spar512[IVAS_SPAR_MAX_CH];
Loading