Commit 97dc7e0b authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into ci/dmx-comparison-manual-job

parents ad130d5c e43f1385
Loading
Loading
Loading
Loading
Loading
+92 −52
Original line number Diff line number Diff line
@@ -126,6 +126,13 @@ stages:
    echo "Commit time was $CI_COMMIT_TIMESTAMP"
    date | xargs echo "System time is"

.print-common-info-windows: &print-common-info-windows
  - |
    echo "Printing common information for build job."
    echo "Current job is run on commit $CI_COMMIT_SHA"
    echo "Commit time was $CI_COMMIT_TIMESTAMP"
    ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression

.activate-debug-mode-info-if-set: &activate-debug-mode-info-if-set
  - if [ "$BUILD_WITH_DEBUG_MODE_INFO" = "true" ]; then
  -   sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h
@@ -210,6 +217,10 @@ stages:
.activate-Werror-linux: &activate-Werror-linux
  - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile

.activate-WX-windows: &activate-WX-windows
  - (Get-Content -Path "CMakeLists.txt") -replace '# \(add_compile_options\("\/WX"\)\)', '$1' | Set-Content -Path "CMakeLists.txt"
  - Get-ChildItem -Path "Workspace_msvc" -Filter "*.vcxproj" | ForEach-Object { (Get-Content -Path $_.FullName) -replace '<TreatWarningAsError>false', '<TreatWarningAsError>true' | Set-Content -Path $_.FullName }

.rules-pytest-to-ref-short:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare"
@@ -227,17 +238,6 @@ stages:
    - if: $CI_PIPELINE_SOURCE == 'schedule'
      when: never

# TODO: only temporary as long the MR encoder tests should not compare to main
.rules-pytest-to-ref-enc-short-temp:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare"
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
    - if: $CI_PIPELINE_SOURCE == 'schedule'
      when: never

.rules-pytest-to-ref-enc-sort-dmx:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-enc-dmx"
@@ -295,6 +295,13 @@ stages:
  tags:
    - ivas-basop-linux

.build-job-windows:
  stage: build
  needs: []
  timeout: "4 minutes"
  tags:
    - ivas-windows

# template for test jobs on linux that need the TESTV_DIR
.test-job-linux-needs-testv-dir:
  extends: .test-job-linux
@@ -417,6 +424,7 @@ stages:
    IMAGES_ARTIFACT_NAME: "images_$CI_JOB_NAME"
    SUMMARY_HTML_ARTIFACT_NAME: "summary_$CI_JOB_NAME.html"
  script:
    - set -euxo pipefail
    - *print-common-info
    - *update-scripts-repo
    - if [ $USE_LTV -eq 1 ]; then
@@ -464,7 +472,10 @@ stages:
    - diff_sba=0
    - diff_param=0
    - diff_report=0
    # SHORT_TEST_SUITE_ENCODER does not contain test_sba.py. This leads to non-existing output folders being compared and to diff_sba=1. Therefore, this is skipped for the encoder tests
    - if [ "$TEST_SUITE" != "$SHORT_TEST_SUITE_ENCODER" ]; then
    -     python3 scripts/batch_comp_audio.py --tool pyaudio3dtools -sd tests/dut/sba_bs/raw tests/dut_branch/sba_bs/raw || diff_sba=$?
    - fi
    - python3 scripts/batch_comp_audio.py --tool pyaudio3dtools -sd tests/dut/param_file/dec tests/dut_branch/param_file/dec || diff_param=$?
    - diff $CSV_BRANCH $CSV_MAIN || diff_report=$?
    - if [ $diff_param -eq 0 ] && [ $diff_sba -eq 0 ] && [ $diff_report -eq 0 ] && [ $zero_errors_branch -eq 1 ]; then
@@ -484,7 +495,7 @@ stages:

    - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit_code=$EXIT_CODE_NON_BE; fi
    - if [ $zero_errors_branch != 1 ]; then echo "Run errors encountered!"; exit_code=$EXIT_CODE_NON_BE; fi
    - if [ $regressions_found != 0 ]; then
    - if [ $regressions_found != 0 ] && [ "$SKIP_REGRESSION_CHECK" != "true" ]; then
    -    if [ $allow_regressions_flag == 0 ]; then
    -        echo "Detected regression wrt to main, [allow regression] not set!"
    -        exit_code=$EXIT_CODE_FAIL;
@@ -756,44 +767,64 @@ build-codec-linux-debugging-make:
    - *activate-debug-mode-info-if-set
    - make -j

build-codec-windows-msbuild:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web'
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # trigger build job for all MRs
    - if: $CI_PIPELINE_SOURCE == 'schedule'
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
  extends:
    - .build-job-windows
  timeout: "7 minutes"
  tags:
    - ivas-windows
  script:
    - *print-common-info-windows
    - *activate-WX-windows
    - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug

# ---------------------------------------------------------------
# Short test jobs that run in merge request pipelines
# ---------------------------------------------------------------

### jobs that test fx encoder -> flt decoder
# TODO: reenable once encoder tests shall compare to main
# ivas-pytest-compare_to_main-short-enc:
#   extends:
#     - .rules-pytest-to-main-short
#     - .test-job-linux
#   before_script:
#     - USE_LTV=0
#     - DUT_DECODER_PATH=./IVAS_dec_ref
#     - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
#     - LEVEL_SCALING=1.0
#   <<: *ivas-pytest-on-merge-request-anchor

# ivas-pytest-compare_to_main-short-enc-lev-10:
#   extends:
#     - .rules-pytest-to-main-short
#     - .test-job-linux
#   before_script:
#     - USE_LTV=0
#     - DUT_DECODER_PATH=./IVAS_dec_ref
#     - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
#     - LEVEL_SCALING=0.3162
#   <<: *ivas-pytest-on-merge-request-anchor

# ivas-pytest-compare_to_main-short-enc-lev+10:
#   extends:
#     - .rules-pytest-to-main-short
#     - .test-job-linux
#   before_script:
#     - USE_LTV=0
#     - DUT_DECODER_PATH=./IVAS_dec_ref
#     - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
#     - LEVEL_SCALING=3.162
#   <<: *ivas-pytest-on-merge-request-anchor
ivas-pytest-compare_to_main-short-enc:
  extends:
    - .rules-pytest-to-main-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
    - LEVEL_SCALING=1.0
    - SKIP_REGRESSION_CHECK="true"
  <<: *ivas-pytest-on-merge-request-anchor

ivas-pytest-compare_to_main-short-enc-lev-10:
  extends:
    - .rules-pytest-to-main-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
    - LEVEL_SCALING=0.3162
    - SKIP_REGRESSION_CHECK="true"
  <<: *ivas-pytest-on-merge-request-anchor

ivas-pytest-compare_to_main-short-enc-lev+10:
  extends:
    - .rules-pytest-to-main-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
    - LEVEL_SCALING=3.162
    - SKIP_REGRESSION_CHECK="true"
  <<: *ivas-pytest-on-merge-request-anchor

### jobs that test flt encoder -> fx decoder
ivas-pytest-compare_to_main-short-dec:
@@ -839,8 +870,7 @@ ivas-pytest-compare_to_main-short-dec-lev+10:
### jobs that test fx encoder -> flt decoder
ivas-pytest-compare_to_ref-short-enc:
  extends:
    #- .rules-pytest-to-ref-short
    - .rules-pytest-to-ref-enc-short-temp
    - .rules-pytest-to-ref-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -852,8 +882,7 @@ ivas-pytest-compare_to_ref-short-enc:

ivas-pytest-compare_to_ref-short-enc-lev-10:
  extends:
    #- .rules-pytest-to-ref-short
    - .rules-pytest-to-ref-enc-short-temp
    - .rules-pytest-to-ref-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -865,8 +894,7 @@ ivas-pytest-compare_to_ref-short-enc-lev-10:

ivas-pytest-compare_to_ref-short-enc-lev+10:
  extends:
    #- .rules-pytest-to-ref-short
    - .rules-pytest-to-ref-enc-short-temp
    - .rules-pytest-to-ref-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
@@ -919,6 +947,8 @@ ivas-pytest-compare_to_ref-dmx-short-enc-lev+10:
ivas-pytest-enc-msan:
  extends:
    - .test-job-linux
  tags:
    - ivas-basop-linux-fast
  before_script:
    - CLANG_NUM=1
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
@@ -928,6 +958,8 @@ ivas-pytest-enc-msan:
ivas-pytest-enc-asan:
  extends:
    - .test-job-linux
  tags:
    - ivas-basop-linux-fast
  before_script:
    - CLANG_NUM=2
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
@@ -937,6 +969,8 @@ ivas-pytest-enc-asan:
ivas-pytest-enc-usan:
  extends:
    - .test-job-linux
  tags:
    - ivas-basop-linux-fast
  before_script:
    - CLANG_NUM=3
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
@@ -1003,6 +1037,8 @@ ivas-pytest-compare-to-input-short-enc:
ivas-pytest-dec-msan:
  extends:
    - .test-job-linux
  tags:
    - ivas-basop-linux-fast
  before_script:
    - CLANG_NUM=1
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
@@ -1012,6 +1048,8 @@ ivas-pytest-dec-msan:
ivas-pytest-dec-asan:
  extends:
    - .test-job-linux
  tags:
    - ivas-basop-linux-fast
  before_script:
    - CLANG_NUM=2
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
@@ -1021,6 +1059,8 @@ ivas-pytest-dec-asan:
ivas-pytest-dec-usan:
  extends:
    - .test-job-linux
  tags:
    - ivas-basop-linux-fast
  before_script:
    - CLANG_NUM=3
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
+8 −1
Original line number Diff line number Diff line
@@ -405,7 +405,9 @@ static Word16 ISqrt16_common( Word16 m,

    /* handle even exponents */
    if ( s_and( e, 1 ) == 0 )
    {
        m = mult_r( m, 0x5a82 );
    }

    return m;
}
@@ -420,8 +422,11 @@ static Word32 ISqrt32_common( Word32 m,
#endif

    assert( m >= 0x40000000 );

#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    m16 = round_fx_o( m, &Overflow );
#else
    m16 = round_fx( m );
#endif

    /* get table index (upper 6 bits minus 32) */
    /* index = (m16 >> 25) - 32; */
@@ -435,7 +440,9 @@ static Word32 ISqrt32_common( Word32 m,

    /* handle even exponents */
    if ( s_and( e, 1 ) == 0 )
    {
        m = Mpy_32_16_1( m, 0x5a82 );
    }

    return m;
}
+0 −57
Original line number Diff line number Diff line
@@ -83,12 +83,6 @@ ivas_error create_sce_enc(
    const int32_t element_brate                                 /* i  : element bitrate                         */
);

ivas_error create_evs_sce_enc(
    Encoder_Struct *st_ivas,    /* i/o: IVAS encoder structure      */
    const int16_t sce_id,       /* i  : SCE # identifier            */
    const int32_t element_brate /* i  : element bitrate             */
);

ivas_error create_cpe_enc(
    Encoder_Struct *st_ivas,                                    /* i/o: IVAS encoder structure                  */
    const int16_t cpe_id,                                       /* i  : CPE # identifier                        */
@@ -99,15 +93,6 @@ ivas_error create_mct_enc_fx(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);

ivas_error ivas_sba_enc_reconfigure(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);

void destroy_sce_enc(
    SCE_ENC_HANDLE hSCE,                                        /* i/o: SCE encoder structure                   */
    Flag is_evs                                                 /* i  : Flag to indicate EVS encoder            */  
);

void destroy_cpe_enc(
    CPE_ENC_HANDLE hCPE                                         /* i/o: CPE encoder structure                   */
);
@@ -1215,41 +1200,6 @@ void add_HB_to_mono_dmx(
 * Range Coder prototypes
 *----------------------------------------------------------------------------------*/

void rc_uni_enc_init(
    RangeUniEncState *rc_st_enc                                 /* i/o: RC state handle                     */
);

void rc_uni_enc_encode_fast(
    RangeUniEncState *rc_st_enc,                                /* i/o: RC state handle                     */
    const uint16_t cum_freq,                                    /* i  : Cumulative frequency up to symbol   */
    const uint16_t sym_freq,                                    /* i  : Symbol frequency                    */
    const uint16_t tot_shift                                    /* i  : Total frequency as a power of 2     */
);

void rc_uni_enc_encode_symbol_fastS(
    RangeUniEncState *rc_st_enc,                                /* i/o: Encoder state                       */
    const uint16_t symbol,                                      /* i  : Symbol to encode                    */
    const uint16_t cum_freq[],                                  /* i  : Cumulative frequency up to symbol   */
    const uint16_t sym_freq[],                                  /* i  : Symbol frequency                    */
    const uint16_t tot_shift                                    /* i  : Total frequency as a power of 2     */
);

void rc_uni_enc_encode_bits(
    RangeUniEncState *rc_st_enc,                                /* i/o: RC state handle                     */
    const uint16_t value,                                       /* i  : Value to encode                     */
    const int16_t bits                                          /* i  : Number of bits                      */
);

/*! r: Total number of bits produced */
int16_t rc_uni_enc_virtual_finish(
    RangeUniEncState *rc_st_enc                                 /* i  : RC state handle                     */
);

/*! r: Total number of bits produced */
int16_t rc_uni_enc_finish(
    RangeUniEncState *rc_st_enc                                 /* i/o: RC state handle                     */
);

void rc_uni_dec_init(
    RangeUniDecState *rc_st_dec,                                /* i/o: RC state handle                     */
    uint16_t *bit_buffer,                                       /* i  : Bit buffer                          */
@@ -1403,13 +1353,6 @@ void stereo_icBWE_decproc(
 * Stereo classifiers prototypes
 *----------------------------------------------------------------------------------*/

/*! r: element mode */
int16_t select_stereo_mode(
    CPE_ENC_HANDLE hCPE,                                        /* i/o: CPE encoder structure                           */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                                     */
);


void stereo_classifier_features(
    STEREO_CLASSIF_HANDLE hStereoClassif,                       /* i/o: stereo classifier structure                     */
    const int16_t idchan,                                       /* i  : channel ID                                      */
+32 −11
Original line number Diff line number Diff line
@@ -53,6 +53,17 @@ void ivas_masa_dec_close_fx(
    MASA_DECODER_HANDLE *hMasa /* i/o: MASA metadata structure                         */
);

ivas_error create_evs_sce_enc_fx(
    Encoder_Struct *st_ivas,   /* i/o: IVAS encoder structure      */
    const Word16 sce_id,       /* i  : SCE # identifier            */
    const Word32 element_brate /* i  : element bitrate             */
);

void destroy_sce_enc_fx(
    SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure                   */
    Flag is_evs          /* i  : Flag to indicate EVS encoder            */
);

void generate_gridEq_fx(
    SPHERICAL_GRID_DATA *data /* o  : data structure for grid  */
);
@@ -2801,18 +2812,18 @@ Word16 mdct_classifier_ivas_fx(
 * Range Coder prototypes
 *----------------------------------------------------------------------------------*/

void rc_uni_enc_init(
void rc_uni_enc_init_fx(
    RangeUniEncState *rc_st_enc /* i/o: RC state handle                     */
);

void rc_uni_enc_encode_fast(
void rc_uni_enc_encode_fast_fx(
    RangeUniEncState *rc_st_enc, /* i/o: RC state handle                     */
    const UWord16 cum_freq,      /* i  : Cumulative frequency up to symbol   */
    const UWord16 sym_freq,      /* i  : Symbol frequency                    */
    const UWord16 tot_shift      /* i  : Total frequency as a power of 2     */
);

void rc_uni_enc_encode_symbol_fastS(
void rc_uni_enc_encode_symbol_fastS_fx(
    RangeUniEncState *rc_st_enc, /* i/o: Encoder state                       */
    const UWord16 symbol,        /* i  : Symbol to encode                    */
    const UWord16 cum_freq[],    /* i  : Cumulative frequency up to symbol   */
@@ -2821,16 +2832,16 @@ void rc_uni_enc_encode_symbol_fastS(
);

/*! r: Total number of bits produced */
Word16 rc_uni_enc_finish(
Word16 rc_uni_enc_finish_fx(
    RangeUniEncState *rc_st_enc /* i/o: RC state handle                     */
);

/*! r: Total number of bits produced */
Word16 rc_uni_enc_virtual_finish(
Word16 rc_uni_enc_virtual_finish_fx(
    RangeUniEncState *rc_st_enc /* i  : RC state handle                     */
);

void rc_uni_enc_encode_bits(
void rc_uni_enc_encode_bits_fx(
    RangeUniEncState *rc_st_enc, /* i/o: RC state handle                     */
    const UWord16 value,         /* i  : Value to encode                     */
    const Word16 bits            /* i  : Number of bits                      */
@@ -3097,6 +3108,12 @@ void ivas_smc_mode_selection_fx(
    const Word16 flag_spitch    /* i  : flag to indicate very short stable pitch*/
);

/*! r: element mode */
Word16 select_stereo_mode_fx(
    CPE_ENC_HANDLE hCPE,          /* i/o: CPE encoder structure                           */
    const IVAS_FORMAT ivas_format /* i  : IVAS format                                     */
);

void stereo_classifier_features_ivas_fx(
    STEREO_CLASSIF_HANDLE hStereoClassif, /* i/o: stereo classifier structure                     */
    const Word16 idchan,                  /* i  : channel ID                                      */
@@ -4278,7 +4295,7 @@ void stereo_dft_dec_read_BS_fx(
    const Word16 ivas_format               /* i  : ivas format				Q0*/
);

Word16 write_bitstream_adapt_GR(
Word16 write_bitstream_adapt_GR_fx(
    BSTR_ENC_HANDLE hBstr, /* i/o: Encoder bitstream handle                    */
    const Word16 ind,      /* i  : bitstream index                             */
    const Word16 *in,      /* i  : values to be written in bitstream           */
@@ -4304,7 +4321,7 @@ Word16 adapt_GR_ief_fx(
    const Word16 try_diff           /*  i  : diff coding allowed 1/0                          */
);

Word16 adapt_GR_rpg1_ief(
Word16 adapt_GR_rpg1_ief_fx(
    const Word16 *in,       /*  i  : res pred gains input vector                       */
    Word16 *in_diff,        /*  o  : encoded symbols in case of differential encoding  */
    const Word16 *prev,     /*  i  : previous frame data                               */
@@ -4318,14 +4335,14 @@ Word16 adapt_GR_rpg1_ief(
    const Word16 try_diff   /*  i  : diff coding allowed 1/0                           */
);

Word16 write_GR1(
Word16 write_GR1_fx(
    BSTR_ENC_HANDLE hBstr, /* i/o: Encoder bitstream handle    */
    const Word16 ind,      /* i  : bitstream index             */
    const Word16 *in,      /* i  : data to be encoded          */
    const Word16 len       /* i  : input data length           */
);

Word16 write_bitstream_GR(
Word16 write_bitstream_GR_fx(
    BSTR_ENC_HANDLE hBstr, /* i/o: Encoder bitstream handle */
    const Word16 ind,      /* i  : bitstream index          */
    const Word16 *in,      /* i  : input vector             */
@@ -4757,7 +4774,7 @@ void stereo_mdct2dft_update_fx(
    Word32 synth0_fx[]   /* i/o: synthesis @output Fs, ch0    Q11*/
);

Word16 write_GR0(
Word16 write_GR0_fx(
    BSTR_ENC_HANDLE hBstr, /* i/o: Encoder bitstream handle    */
    const Word16 ind,      /* i  : bitstream index             */
    const Word16 *in,      /* i  : data to be encoded          */
@@ -4856,6 +4873,10 @@ ivas_error ivas_cldfb_dec_reconfig_fx(
    const Word16 numCldfbSyntheses_old /* i  : number of CLDFB synthesis instances in previous frame */
);

ivas_error ivas_sba_enc_reconfigure_fx(
    Encoder_Struct *st_ivas /* i/o: IVAS encoder structure                  */
);

Word16 ivas_sba_get_order_fx(
    const Word16 nb_channels, /* i  : Number of ambisonic channels            */
    const Word16 sba_planar   /* i  : SBA planar flag                         */
+5 −1
Original line number Diff line number Diff line
@@ -3836,7 +3836,11 @@ void ivas_compute_spar_params_fx(
            }
            ELSE
            {
#ifdef FIX_11_1_IVAS_SPAR_DEC_UPMIXER_SF_RND_COEFFS
                hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i] = L_shr_r( hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i], sub( tmp, 22 ) ); // q22
#else
                hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i] = L_shr( hSparMd->band_coeffs[b + ( i_ts * IVAS_MAX_NUM_BANDS )].pred_re_fx[i], sub( tmp, 22 ) ); // q22
#endif
                move32();
            }
        }
Loading