Commit 8a94c59c authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into 798-osba-decoder-crashes-with-output-format-mc-5_1-7_1-5_1_2-and-5_1_4
parents ef0e5899 80973a73
Loading
Loading
Loading
Loading
Loading
+58 −2
Original line number Diff line number Diff line
@@ -732,7 +732,7 @@ ivas-pytest-on-merge-request:
    - non_be_flag=$(grep -c --ignore-case "\[non[ -]*be\]" tmp.txt) || true
    - ref_using_main=$(grep -c --ignore-case "\[ref[ -]*using[ -]*main\]" tmp.txt) || true

    ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there
    ### If ref_using_main is not set, checkout the source branch to use scripts and input from there
    - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi

    ### prepare pytest
@@ -767,6 +767,62 @@ ivas-pytest-on-merge-request:
      junit:
        - report-junit.xml


# Check interop IVAS_cod_test -> IVAS_dec_ref
ivas-interop-on-merge-request:
  extends:
    - .test-job-linux
    - .rules-merge-request
  stage: test
  needs: ["build-codec-linux-cmake"]
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *get-commits-behind-count
    - *check-commits-behind-count-in-compare-jobs
    - *merge-request-comparison-setup-codec
    # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense
    - git checkout $source_branch_commit_sha

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    # write to temporary file as workaround for failures observed with piping echo
    - echo $CI_MERGE_REQUEST_TITLE > tmp.txt
    - non_interop_flag=$(grep -c --ignore-case "\[non[ -]*io\]" tmp.txt) || true

    ### prepare pytest
    # create short test vectors
    - python3 tests/create_short_testvectors.py

    # Run reference creation, using source branch encoder and main decoder (see .merge-request-comparison-setup-codec)
    - exit_code=0
    - exit_code2=0
    # set timeout for individual testcase runs to 60 seconds
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code=$?
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report2.html --self-contained-html --junit-xml=report2-junit.xml --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code2=$?
    - zero_failures=$(cat report-junit.xml report2-junit.xml | grep -c 'failures="0"') || true

    - if [ $zero_failures != 2 ] && [ $non_interop_flag == 0 ]; then echo "Non-interop cases without non-interop flag encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $zero_failures != 2 ] && [ $non_interop_flag == 1 ]; then echo "Non-interop cases with non-interop flag encountered"; exit $EXIT_CODE_NON_BE; fi
    - exit 0

  allow_failure:
    exit_codes:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
      - report.html
      - report2-junit.xml
      - report2.html
    expose_as: "interop test results"
    reports:
      junit:
        - report*-junit.xml

evs-pytest-on-merge-request:
  extends:
    - .test-job-linux
+28 −2
Original line number Diff line number Diff line
@@ -335,11 +335,22 @@ int32_t ivas_interformat_brate(
void ivas_combined_format_brate_sanity(
    const int32_t element_brate, /* i  : element bitrate                */
    const int16_t core,          /* i  : core                           */
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    const int32_t total_brate, /* i  : total bitrate                  */
#endif
    int32_t *core_brate, /* i/o: core bitrate                   */
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    int16_t *inactive_coder_type_flag, /* o  : inactive coder_type flag       */
#endif
    int16_t *diff_nBits /* o  : number of differential bits    */
)
{
    int16_t limit_high, nBits;
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    int32_t brate_diff;

    brate_diff = total_brate - *core_brate;
#endif

    /* sanity check: at lowest IVAS bit-rates and one ISM channel coded by
    low-rate core-coder mode, it can happen that the CPE (MASA) bit-budget
@@ -364,6 +375,21 @@ void ivas_combined_format_brate_sanity(
        }
    }

#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    /*-----------------------------------------------------------------*
     * set inactive coder_type flag in ACELP core
     *-----------------------------------------------------------------*/

    if ( core == ACELP_CORE )
    {
        *inactive_coder_type_flag = 0; /* AVQ by default */
        if ( *core_brate + brate_diff <= MAX_GSC_INACTIVE_BRATE )
        {
            *inactive_coder_type_flag = 1; /* GSC */
        }
    }
#endif

    return;
}

+6 −0
Original line number Diff line number Diff line
@@ -5827,7 +5827,13 @@ int32_t ivas_interformat_brate(
void ivas_combined_format_brate_sanity(
    const int32_t element_brate,                                /* i  : element bitrate                         */
    const int16_t core,                                         /* i  : core                                    */
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    const int32_t total_brate,                                  /* i  : total bitrate                           */
#endif
    int32_t *core_brate,                                        /* i/o: core bitrate                            */
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    int16_t *inactive_coder_type_flag,                          /* o  : inactive coder_type flag                */
#endif
    int16_t *diff_nBits                                         /* o  : number of differential bits             */
);

+3 −2
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@
#define NONBE_CR_FIX_735_SBA_HP20_BRATE_SWITCHING       /* VA: Issue 735: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */
#define NONBE_FIX_588_UPDATE_FASTCONV_SD                      /* FhG: issue 588: update FastConv SD HRTFs in CLDFB domain with new conversion method */
#define NONBE_FIX_778_TNS_UNFIED_STEREO_MSAN                  /* FhG: Issue 778: MSAN error due to uninitialized TNS configuration */
#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ                 /* VA: issue 797:  fix of crash when the separated object is inactive and the MASA metadata is using very few bits */

#define NONBE_FIX_798_OSBA_MC_DEC_CRASH

+4 −0
Original line number Diff line number Diff line
@@ -803,7 +803,11 @@ ivas_error acelp_core_dec(
            {
                decod_tran( st, st->L_frame, tc_subfr, Aq, Es_pred, pitch_buf, voice_factors, exc, exc2, bwe_exc, unbits, sharpFlag, gain_buf );
            }
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) )
#else
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) )
#endif
            {
                /* AUDIO and INACTIVE frames (coded by GSC technology) */
                decod_audio( st, dct_exc_tmp, Aq, &tmp_noise, pitch_buf, voice_factors, exc, exc2, bwe_exc, lsf_new, gain_buf, tdm_lp_reuse_flag, tdm_low_rate_mode, tdm_Pitch_reuse_flag, p_tdm_Pri_pitch_buf );
Loading