Commit 6a40e722 authored by vasilache's avatar vasilache
Browse files

Merge branch 'main' into 1231-align-with-basop-for-masa2total-ratios-threshold

parents 45afd0eb a0dcfc66
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2409,7 +2409,9 @@ coverage-test-on-main-scheduled:
  - public_dir="$CI_JOB_NAME-public"

  # if is needed to catch case when no artifact is there (first run), similarly as above
  - if [[ -d $public_dir ]]; then
  # 1. check for public_dir being there as this might not be the case when artifact download failed
  # 2. check for public dir not being empty - handle job failures in prev job that happen after the dir is created. In that case, the empty dir is in the artifacts
  - if [ -d $public_dir ] && [ ! -z "$( ls -A $public_dir )" ]; then
  -   mv $public_dir/* wmops/
  # check here if we have the split-by-levels files present - if not, fake them up with the existing global one
  # this is needed for the first run with split graphs on a branch where the global version did run previously
+8 −3
Original line number Diff line number Diff line
@@ -6,9 +6,10 @@ make -j IVAS_cod
mv IVAS_cod IVAS_cod_nosan

# run all modes and cut bitstream to start with an SID. Use mono output to limit runtime, test is only about decoding the first frame
modes_no_sba=$(scripts/runIvasCodec.py -l | grep dtx | grep -vE "FOA|HOA" )
modes_no_sba=$(scripts/runIvasCodec.py -l | grep dtx | grep -vE "stereo|FOA|HOA" )
modes_hoa=$(scripts/runIvasCodec.py -l | grep dtx | grep -E "HOA")
modes_foa=$(scripts/runIvasCodec.py -l | grep dtx | grep "FOA")
modes_stereo=$(scripts/runIvasCodec.py -l | grep dtx | grep "stereo")

# config vars
testcase_timeout=20
@@ -25,12 +26,14 @@ cp IVAS_cod_nosan CLANG1/IVAS_cod

exit_code_msan=0
echo "-------------- 1. Encoder + Msan decoder -------------- "
echo "-------------- 1.1 all DTX modes except SBA -------------- "
echo "-------------- 1.1 all DTX modes except SBA and stereo -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG1 -m $modes_no_sba -U 0:20 $common_args || exit_code_msan=$?
echo "-------------- 1.2 HOA2 + HOA3 DTX modes -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG1 -m $modes_hoa -U 70:80 $common_args || exit_code_msan=$?
echo "-------------- 1.3 FOA DTX modes -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG1 -m $modes_foa -U 75:110 $common_args || exit_code_msan=$?
echo "-------------- 1.4 stereo DTX modes -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG1 -m $modes_stereo -U 40:60 $common_args || exit_code_msan=$?
# archive encoder logs separately
mkdir logs_enc logs_dec_msan
mv CLANG1/logs/*.enc.txt logs_enc/
@@ -44,12 +47,14 @@ cp -r CLANG1/enc CLANG3/enc

exit_code_asan_usan=0
echo "-------------- 2. Asan + Usan decoder -------------- "
echo "-------------- 2.1 all DTX modes except SBA -------------- "
echo "-------------- 2.1 all DTX modes except SBA and stereo -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG2 CLANG3 --decoder_only -m $modes_no_sba -U 0:20 $common_args || exit_code_asan_usan=$?
echo "-------------- 2.2 HOA2 + HOA3 DTX modes -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG2 CLANG3 --decoder_only -m $modes_hoa -U 70:80 $common_args || exit_code_asan_usan=$?
echo "-------------- 2.3 FOA DTX modes -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG2 CLANG3 --decoder_only -m $modes_foa -U 75:110 $common_args || exit_code_asan_usan=$?
echo "-------------- 2.4 stereo DTX modes -------------- "
scripts/IvasBuildAndRunChecks.py --checks CLANG2 CLANG3 --decoder_only -m $modes_stereo -U 40:60 $common_args || exit_code_asan_usan=$?
mv CLANG2/logs logs_dec_asan
mv CLANG3/logs logs_dec_usan

+5 −0
Original line number Diff line number Diff line
@@ -169,6 +169,11 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_GSC_BSTR                              /* VA: issue 1264: Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA */
#define NONBE_1273_ISM_METADATA_COUNTER                 /* VA: issue 1273: fix counter overflow in ISM metadata encoder */
#define NONBE_1279_COUNTER_OVERFLOW                     /* VA: issue 1279: Avoid possible overflow of counter st->Nb_ACELP_frames */
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD      /* VA/Eri: issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */


#define NONBE_1231_BASOP_819_THRESHOLD_MASA2TOTAL        /* Nokia: add fix for precision limitation in comparison with masa2total energy ratio threshold to be aligned with BASOP*/
/* ##################### End NON-BE switches ########################### */
+7 −0
Original line number Diff line number Diff line
@@ -167,7 +167,14 @@ ivas_error acelp_core_enc(
    {
        st->Nb_ACELP_frames = 0;
    }
#ifdef NONBE_1279_COUNTER_OVERFLOW
    if ( st->Nb_ACELP_frames < MAX16B )
    {
        st->Nb_ACELP_frames++;
    }
#else
    st->Nb_ACELP_frames++;
#endif

    if ( st->L_frame == L_FRAME )
    {
+28 −0
Original line number Diff line number Diff line
@@ -65,6 +65,13 @@

#define MAX_BRATE_DTX_EVS  ACELP_24k40 /* maximum bitrate to which the default DTX is applied in EVS; otherwise DTX is applied only in silence */
#define MAX_BRATE_DTX_IVAS IVAS_80k    /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */

#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
#define DTX_THR_EVS 15 /* lp_noise threshold for DTX at higher bitrates in EVS */ // ToDo: to be removed once EVS is CR fixed
#define DTX_THR     5                                                             /* lp_noise threshold for DTX at higher bitrates */
#endif


/*-------------------------------------------------------------------*
 * Local function prototypes
 *-------------------------------------------------------------------*/
@@ -89,6 +96,15 @@ void dtx(
    DTX_ENC_HANDLE hDtxEnc = st->hDtxEnc;
    int16_t last_br_cng_flag, last_br_flag, br_dtx_flag;
    int32_t total_brate_ref;
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
    int16_t dtx_thr;

    dtx_thr = DTX_THR;
    if ( st->element_mode == EVS_MONO )
    {
        dtx_thr = DTX_THR_EVS; // ToDo: to be removed once EVS is CR fixed
    }
#endif

    total_brate_ref = st->total_brate;

@@ -99,10 +115,18 @@ void dtx(
    }
    else
    {
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
        last_br_cng_flag = st->last_total_brate_cng <= MAX_BRATE_DTX_EVS || st->lp_noise < dtx_thr || ( st->element_mode == IVAS_SCE && st->last_total_brate_cng <= MAX_BRATE_DTX_IVAS );
#else
        last_br_cng_flag = st->last_total_brate_cng <= MAX_BRATE_DTX_EVS || st->lp_noise < 15 || ( st->element_mode == IVAS_SCE && st->last_total_brate_cng <= MAX_BRATE_DTX_IVAS );
#endif
        last_br_flag = ( st->element_mode == EVS_MONO && st->last_total_brate <= MAX_BRATE_DTX_EVS ) ||
                       ( st->element_mode != EVS_MONO && last_ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ||
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
                       st->lp_noise < dtx_thr;
#else
                       st->lp_noise < 15;
#endif
    }

    /* Initialization */
@@ -181,7 +205,11 @@ void dtx(
    {
        br_dtx_flag = ( st->element_mode == EVS_MONO && st->total_brate <= MAX_BRATE_DTX_EVS ) ||
                      ( st->element_mode != EVS_MONO && ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ||
#ifdef NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD
                      st->lp_noise < dtx_thr;
#else
                      st->lp_noise < 15;
#endif
    }

    if ( st->Opt_DTX_ON && vad == 0 &&
Loading