Commit ca982110 authored by Jiaquan Huo's avatar Jiaquan Huo
Browse files

Merge branch 'main' into 1102-remove-redundant-sba-ext-output-tests

parents fc14bfbf e72658e9
Loading
Loading
Loading
Loading
Loading
+6 −18
Original line number Diff line number Diff line
@@ -1076,29 +1076,17 @@ check-first-frame-is-sid:
  script:
    - *print-common-info
    - *update-ltv-repo
    # Temporary fix to test only SID start config files in this job
    # this rm makes check-for-testvectors only check for the signals we actually need in this test
    - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json
    - *check-for-testvectors
    - cmake .
    - make -j

    - exit_code_no_sba=0
    - exit_code_hoa=0
    - exit_code_foa=0

    # run all modes and cut bitstream to start with an SID. Use stereo output to limit runtime, test is only about decoding
    - ism_md_cmd="--ism_metadata_files /usr/local/ltv/ltvISM1.csv /usr/local/ltv/ltvISM2.csv /usr/local/ltv/ltvISM3.csv /usr/local/ltv/ltvISM4.csv"
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -vE "FOA|HOA" )
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 200 -U 0:20 --oc stereo $ism_md_cmd --timeout 10 || exit_code_no_sba=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -E "HOA")
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 70:80 --oc stereo --timeout 10 || exit_code_hoa=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep "FOA")
    - scripts/runIvasCodec.py -z console -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 100 -U 75:110 --oc stereo --timeout 10 || exit_code_foa=$?
    - bash ci/run-first-frame-is-sid-test.sh

    - if [ $exit_code_no_sba -ne 0 ] || [ $exit_code_hoa -ne 0 ] || [ $exit_code_foa -ne 0 ]; then exit 1; fi
  artifacts:
    paths:
      - out/logs
      - logs_enc
      - logs_dec_msan
      - logs_dec_asan
      - logs_dec_usan
    when: always
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart"
    expose_as: "logs-sidstart"
+56 −0
Original line number Diff line number Diff line
#! /usr/bin/bash

# build encoder without sanitizers for faster runtime
make clean
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_hoa=$(scripts/runIvasCodec.py -l | grep dtx | grep -E "HOA")
modes_foa=$(scripts/runIvasCodec.py -l | grep dtx | grep "FOA")

# config vars
testcase_timeout=20
bitstream_cut_length=5
common_args="-z console -p scripts/config/ci_linux_sidstart_test.json -s --oc mono --timeout $testcase_timeout --bs_length $bitstream_cut_length"

# first encoder + MSAN decoder
# hack to use the encoder with no sanitizers
mkdir CLANG1
make clean
make IVAS_dec -j CLANG=1
cp IVAS_dec CLANG1/IVAS_dec
cp IVAS_cod_nosan CLANG1/IVAS_cod

exit_code_msan=0
echo "-------------- 1. Encoder + Msan decoder -------------- "
echo "-------------- 1.1 all DTX modes except SBA -------------- "
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=$?
# archive encoder logs separately
mkdir logs_enc logs_dec_msan
mv CLANG1/logs/*.enc.txt logs_enc/
mv CLANG1/logs/*.dec*.txt logs_dec_msan/

# ASAN and USAN can be done in one go and decoder only
# copy encoder output from CLANG1 dir
mkdir CLANG2 CLANG3
cp -r CLANG1/enc CLANG2/enc
cp -r CLANG1/enc CLANG3/enc

exit_code_asan_usan=0
echo "-------------- 2. Asan + Usan decoder -------------- "
echo "-------------- 2.1 all DTX modes except SBA -------------- "
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=$?
mv CLANG2/logs logs_dec_asan
mv CLANG3/logs logs_dec_usan

if [ $exit_code_msan -ne 0 ] || [ $exit_code_asan_usan -ne 0 ]; then echo "There was either a crash or a sanitizer error encountered when decoding a bitstream that starts with an SID. Check the artifacts for the logfiles."; exit 1; fi
+2 −0
Original line number Diff line number Diff line
@@ -179,7 +179,9 @@ typedef enum

typedef enum
{
#ifndef FIX_1101_CLEANING_JBM_CALL
    TC_BUFFER_MODE_NONE = 0,
#endif
    TC_BUFFER_MODE_RENDERER,
    TC_BUFFER_MODE_BUFFER
} TC_BUFFER_MODE;
+4 −0
Original line number Diff line number Diff line
@@ -3039,7 +3039,11 @@ void mctStereoIGF_enc(
    MCT_ENC_HANDLE hMCT,                                        /* i/o: MCT encoder structure                   */
    Encoder_State **sts,                                        /* i/o: encoder state structure                 */
    float *orig_spectrum[MCT_MAX_CHANNELS][NB_DIV],             /* i  : MDCT spectrum for ITF                   */
#ifdef NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC 
    float *powerSpec[MCT_MAX_CHANNELS],                         /* i/o: MDCT^2 + MDST^2 spectrum,or estimate    */
#else
    float powerSpec[MCT_MAX_CHANNELS][L_FRAME48k],              /* i/o: MDCT^2 + MDST^2 spectrum,or estimate    */
#endif
    float *powerSpecMsInv[MCT_MAX_CHANNELS][NB_DIV],            /* i  : same as above but for inverse spect.    */
    float *inv_spectrum[MCT_MAX_CHANNELS][NB_DIV],              /* i  : inverse spectrum                        */
    const int16_t sp_aud_decision0[MCT_MAX_CHANNELS]            /* i  : speech audio decision                   */
+31 −0
Original line number Diff line number Diff line
@@ -456,17 +456,48 @@ void td_stereo_param_updt(
    if ( tdm_use_IAWB_Ave_lpc == 1 )
    {
        mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M );

#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 );
        }
#else
        lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 );
#endif
    }
    else if ( flag_ACELP16k == 1 )
    {
#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
            lsp_convert_poly( tdm_lspQ_PCh, L_FRAME, 0 );
            lsp2lsf( tdm_lspQ_PCh, tdm_lsfQ_PCh, M, INT_FS_12k8 );
        }
        else
        {
            float lsp_temp[M];
            mvr2r( lsp_old_PCh, lsp_temp, M );
            lsp_convert_poly( lsp_temp, L_FRAME, 0 );
            lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 );
        }
#else
        mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
        lsp_convert_poly( tdm_lspQ_PCh, L_FRAME, 0 );
        lsp2lsf( tdm_lspQ_PCh, tdm_lsfQ_PCh, M, INT_FS_12k8 );
#endif
    }
    else
    {
#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
        }
#else
        mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
#endif
        mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M );
    }

Loading