Commit b4e1f04f authored by norvell's avatar norvell
Browse files

Revert .gitlab-ci.yml and only activate linux build for all MR pipelines

parents 738cd4cb 96d3f651
Loading
Loading
Loading
Loading
Loading
+127 −39
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ variables:
  EXIT_CODE_NON_BE: 123
  EXIT_CODE_FAIL: 1
  LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv"
  LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv"
  SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection"
  TEST_SUITE: ""
  DUT_ENCODER_PATH: "./IVAS_cod"
@@ -40,6 +41,8 @@ variables:
      - 'sanitizer-stv'
      - 'pytest-renderer'
      - 'complexity'
      - 'coverage'
      - 'voip-be-test'


default:
@@ -85,6 +88,9 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity'
      variables:
        IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test'
      variables:
        IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch
      variables:
        IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH'        
@@ -111,10 +117,9 @@ stages:
    echo "Commit time was $CI_COMMIT_TIMESTAMP"
    date | xargs echo "System time is"

.build-reference-and-dut-binaries: &build-reference-and-dut-binaries
.build-reference-binaries: &build-reference-binaries
- current_commit_sha=$(git rev-parse HEAD)
### build reference binaries
  - echo "building reference branch $REFERENCE_BRANCH"
- git checkout $REFERENCE_BRANCH
- git pull
- make clean
@@ -122,10 +127,15 @@ stages:
- mv ./IVAS_cod ./$REF_ENCODER_PATH
- mv ./IVAS_dec ./$REF_DECODER_PATH
- mv ./IVAS_rend ./IVAS_rend_ref

  ### build test binaries
### Return to current branch
- git restore .
- git checkout $current_commit_sha


.build-reference-and-dut-binaries: &build-reference-and-dut-binaries
### build reference binaries
  - *build-reference-binaries
### build dut binaries
  - make clean
  - make -j

@@ -174,25 +184,25 @@ stages:
  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'
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
    - if: $CI_PIPELINE_SOURCE == 'schedule'
      when: never

.rules-pytest-to-ref-short-dec:
.rules-pytest-to-input-short:
  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"
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-to-input"
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
    - if: $CI_PIPELINE_SOURCE == 'schedule'
      when: never

.rules-pytest-to-input-short:
# 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-to-input"
    - 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'
@@ -200,7 +210,7 @@ stages:

.rules-pytest-to-main-short:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
    - 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

@@ -213,6 +223,15 @@ stages:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      when: never

.rules-coverage:
  rules:
    - if: $COVERAGE_TEST # Set by scheduled pipeline
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "coverage"
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      when: never

.rules-pytest-saturation-smoke-test:
  rules:
    - if: $PYTEST_SMOKE_TEST # Set by scheduled pipeline
@@ -635,7 +654,7 @@ build-codec-linux-make:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web'
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
    - 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
@@ -714,7 +733,6 @@ ivas-pytest-compare_to_main-short-dec:
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
    - rm -rf tests/dut tests/ref
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" == "$REFERENCE_BRANCH" ]; then REFERENCE_BRANCH=main; fi
  <<: *ivas-pytest-on-merge-request-anchor

ivas-pytest-compare_to_main-short-dec-lev-10:
@@ -727,7 +745,6 @@ ivas-pytest-compare_to_main-short-dec-lev-10:
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
    - rm -rf tests/dut tests/ref
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" == "$REFERENCE_BRANCH" ]; then REFERENCE_BRANCH=main; fi
  <<: *ivas-pytest-on-merge-request-anchor

ivas-pytest-compare_to_main-short-dec-lev+10:
@@ -740,7 +757,6 @@ ivas-pytest-compare_to_main-short-dec-lev+10:
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
    - rm -rf tests/dut tests/ref
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" == "$REFERENCE_BRANCH" ]; then REFERENCE_BRANCH=main; fi
  <<: *ivas-pytest-on-merge-request-anchor

# ---------------------------------------------------------------
@@ -750,38 +766,38 @@ 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-short
    - .rules-pytest-to-ref-enc-short-temp
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "main" ]; then REFERENCE_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
  <<: *ivas-pytest-anchor

ivas-pytest-compare_to_ref-short-enc-lev-10:
  extends:
    - .rules-pytest-to-ref-short
    #- .rules-pytest-to-ref-short
    - .rules-pytest-to-ref-enc-short-temp
    - .test-job-linux    
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "main" ]; then REFERENCE_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
  <<: *ivas-pytest-anchor

ivas-pytest-compare_to_ref-short-enc-lev+10:
  extends:
    - .rules-pytest-to-ref-short
    #- .rules-pytest-to-ref-short
    - .rules-pytest-to-ref-enc-short-temp
    - .test-job-linux    
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./$REF_DECODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "main" ]; then REFERENCE_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
  <<: *ivas-pytest-anchor

ivas-pytest-enc-msan:
@@ -811,38 +827,35 @@ ivas-pytest-enc-usan:
### jobs that test flt encoder -> fx decoder
ivas-pytest-compare_to_ref-short-dec:
  extends:
    - .rules-pytest-to-ref-short-dec
    - .rules-pytest-to-ref-short
    - .test-job-linux    
  before_script:
    - USE_LTV=0
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "main" ]; then REFERENCE_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
  <<: *ivas-pytest-anchor
  
ivas-pytest-compare_to_ref-short-dec-lev-10:
  extends:
    - .rules-pytest-to-ref-short-dec
    - .rules-pytest-to-ref-short
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "main" ]; then REFERENCE_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
  <<: *ivas-pytest-anchor
  
ivas-pytest-compare_to_ref-short-dec-lev+10:
  extends:
    - .rules-pytest-to-ref-short-dec
    - .rules-pytest-to-ref-short
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - DUT_ENCODER_PATH=./$REF_ENCODER_PATH
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
    - if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "main" ]; then REFERENCE_BRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
  <<: *ivas-pytest-anchor

ivas-pytest-compare-to-input-short-dec:
@@ -1003,6 +1016,60 @@ ivas-smoke-test-saturation:
      - smoke_test_output_hrtf.txt
    expose_as: "saturation smoke test results"


# GCOV/LCOV coverage analysis of self_test suite
coverage-test-on-main-scheduled:
  extends:
    - .test-job-linux
    - .rules-coverage
  stage: test
  timeout: 3 hours
  script:
    - *print-common-info
    - *update-scripts-repo    
    - *update-ltv-repo
    - *copy-ltv-files-to-testv-dir
    - *build-reference-binaries
    # Build DuT binaries with GCOV
    - make clean
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy to ensure instrumented renderer is run in the first pytest call

    - testcase_timeout=$TESTCASE_TIMEOUT_LTV
    - exit_code_dec=0
    - exit_code_enc=0
    - python3 -m pytest --tb=no tests/codec_be_on_mr_nonselection tests/renderer --update_ref 1 -v --create_ref --html=report-dec.html --self-contained-html --junit-xml=report-junit-dec.xml -n auto --testcase_timeout $testcase_timeout --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $DUT_DECODER_PATH  || exit_code_dec=$?
    - lcov -c -d obj -o coverage_dec_rend.info # extract coverage of decoder/renderer

    - python3 -m pytest --tb=no tests/codec_be_on_mr_nonselection --encoder_only -v  --html=report-enc.html --self-contained-html --junit-xml=report-junit-enc.xml -n auto --testcase_timeout $testcase_timeout --dut_encoder_path $DUT_ENCODER_PATH || exit_code_enc=$?
    - lcov -c -d obj -o coverage_enc_dec_rend.info # extract coverage of encoder/decoder/renderer

    # remove apps and lib_util files from coverage
    - lcov -r coverage_dec_rend.info "*apps*" -o coverage_dec_rend.info
    - lcov -r coverage_dec_rend.info "*lib_util*" -o coverage_dec_rend.info
    - lcov -r coverage_enc_dec_rend.info "*apps*" -o coverage_enc_dec_rend.info
    - lcov -r coverage_enc_dec_rend.info "*lib_util*" -o coverage_enc_dec_rend.info

    - commit_sha=$(git rev-parse HEAD)
    - genhtml coverage_enc_dec_rend.info -o coverage_enc_dec_rend -t "Coverage on main enc/dec/rend @ $commit_sha"
    - genhtml coverage_dec_rend.info -o coverage_dec_rend -t "Coverage on main -- dec/rend @ $commit_sha"
  artifacts:
    name: "main-coverage-sha-$CI_COMMIT_SHORT_SHA"
    when: always
    expire_in: 1 week
    paths:
      - coverage_enc_dec_rend.info
      - coverage_dec_rend.info
      - coverage_enc_dec_rend
      - coverage_dec_rend
      - report-dec.html
      - report-enc.html
    expose_as: "Coverage result"
    reports:
      junit:
        - report-junit-dec.xml
        - report-junit-enc.xml

# ---------------------------------------------------------------
# EVS 26.444 test job
# ---------------------------------------------------------------
@@ -1057,6 +1124,27 @@ ivas-pytest-renderer:
  <<: *ivas-pytest-anchor


# ---------------------------------------------------------------
# Various other tests
# ---------------------------------------------------------------

# TODO: actually run on MR once main problems are fixed
voip-be-on-merge-request:
  extends:
    - .test-job-linux-needs-testv-dir
  rules:
    # - 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 == 'web' && $MANUAL_PIPELINE_TYPE == "voip-be-test"
  stage: test
  needs: ["build-codec-linux-make"]
  timeout: "10 minutes"
  script:
    - *print-common-info
    - make clean
    - make -j
    - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py


# ---------------------------------------------------------------
# Complexity measurement jobs
# ---------------------------------------------------------------
@@ -1438,7 +1526,7 @@ pages:
    - *update-scripts-repo
    - python3 ci/setup_pages.py
    - ls
    - ls public
    - ls -lh public
  artifacts:
    paths:
      - public
+9 −9
Original line number Diff line number Diff line
@@ -67,21 +67,21 @@ int16_t get_next_coeff_mapped_ivas(
}
#else
Word16 get_next_coeff_mapped_ivas(
    Word16 ii[2],             /* i/o: coefficient indexes       */
    Word32 *pp,               /* o  : peak(1)/hole(0) indicator */
    Word16 *idx,              /* o  : index in unmapped domain  */
    Word16 ii[2],             /* i/o: coefficient indexes			Q0*/
    Word32 *pp,               /* o  : peak(1)/hole(0) indicator		Q0*/
    Word16 *idx,              /* o  : index in unmapped domain		Q0*/
    CONTEXT_HM_CONFIG *hm_cfg /* i  : HM configuration				  */
)
{
    UWord32 p;

    p = s_and( sub( ii[1], hm_cfg->numPeakIndices ), sub( hm_cfg->indexBuffer[ii[1]], hm_cfg->indexBuffer[ii[0]] ) );
    p = UL_lshr( p, sub( sizeof( p ) * 8, 1 ) );
    *pp = p;
    p = s_and( sub( ii[1], hm_cfg->numPeakIndices ), sub( hm_cfg->indexBuffer[ii[1]], hm_cfg->indexBuffer[ii[0]] ) ); /* Q0 */
    p = UL_lshr( p, sub( sizeof( p ) * 8, 1 ) );                                                                      /* Q0 */
    *pp = p;                                                                                                          /* Q0 */
    move32();
    *idx = ii[p];
    *idx = ii[p]; /* Q0 */
    move16();
    ii[p] = add( ii[p], 1 );
    ii[p] = add( ii[p], 1 ); /* Q0 */
    move16();

    return hm_cfg->indexBuffer[*idx];
+28 −22
Original line number Diff line number Diff line
@@ -11,15 +11,15 @@

/* Returns: index of next coefficient */
Word16 get_next_coeff_mapped(
    Word16 ii[2],             /* i/o: coefficient indexes       */
    Word16 *pp,               /* o  : peak(1)/hole(0) indicator */
    Word16 *idx,              /* o  : index in unmapped domain  */
    Word16 ii[2],             /* i/o: coefficient indexes			Q0*/
    Word16 *pp,               /* o  : peak(1)/hole(0) indicator		Q0*/
    Word16 *idx,              /* o  : index in unmapped domain		Q0*/
    CONTEXT_HM_CONFIG *hm_cfg /* i  : HM configuration				  */
)
{
    Word16 p;

    p = s_and( sub( ii[1], hm_cfg->numPeakIndices ), sub( hm_cfg->indexBuffer[ii[1]], hm_cfg->indexBuffer[ii[0]] ) );
    p = s_and( sub( ii[1], hm_cfg->numPeakIndices ), sub( hm_cfg->indexBuffer[ii[1]], hm_cfg->indexBuffer[ii[0]] ) ); /* Q0 */
    if ( p > 0 )
    {
        p = 0;
@@ -30,63 +30,69 @@ Word16 get_next_coeff_mapped(
        p = 1;
        move16();
    }
    *pp = p;
    *pp = p; /* Q0 */
    move16();
    *idx = ii[p];
    *idx = ii[p]; /* Q0 */
    move16();
    ii[p] = add( ii[p], 1 );
    ii[p] = add( ii[p], 1 ); /* Q0 */
    move16();
    return hm_cfg->indexBuffer[*idx];
}

/* Returns: index of next coefficient */
Word16 get_next_coeff_unmapped(
    Word16 ii[2],             /* i/o: coefficient indexes       */
    Word16 *pp,               /* o  : peak(1)/hole(0) indicator */
    Word16 *idx,              /* o  : index in unmapped domain  */
    Word16 ii[2],             /* i/o: coefficient indexes			Q0*/
    Word16 *pp,               /* o  : peak(1)/hole(0) indicator		Q0*/
    Word16 *idx,              /* o  : index in unmapped domain		Q0*/
    CONTEXT_HM_CONFIG *hm_cfg /* i  : HM configuration				  */
)
{
    (void) pp;
    (void) hm_cfg;

    *idx = ii[0];
    *idx = ii[0]; /* Q0 */
    move16();
    ii[0] = add( ii[0], 1 );
    ii[0] = add( ii[0], 1 ); /* Q0 */
    move16();
    return *idx;
}

Word16 update_mixed_context( Word16 ctx, Word16 a )
Word16 update_mixed_context(
    Word16 ctx, /* Q0 */
    Word16 a    /* Q0 */
)
{
    Word32 t32;
    Word16 t = 0; /* initialize just to avoid compiler warning */

    t32 = L_mac0( 1 - 13, s_and( a, ~1 ), add( shr( a, 2 ), 1 ) );
    t32 = L_mac0( 1 - 13, s_and( a, ~1 ), add( shr( a, 2 ), 1 ) ); /* Q0 */
    if ( t32 <= 0 )
    {
        t = extract_l( t32 );
        t = extract_l( t32 ); /* Q0 */
    }
    a = shr( a, 3 );
    if ( t32 > 0 )
    {
        t = s_min( a, 2 );
        t = s_min( a, 2 ); /* Q0 */
    }
    return add( shl( s_and( ctx, 0xf ), 4 ), add( t, 13 ) );
}

#ifdef IVAS_FLOAT_FIXED
Word32 update_mixed_context_ivas_fx( Word32 ctx, Word16 a )
Word32 update_mixed_context_ivas_fx(
    Word32 ctx, /* Q0 */
    Word16 a    /* Q0 */
)
{
    Word32 t32;

    t32 = L_mac0( 1 - 13, s_and( a, ~1 ), add( shr( a, 2 ), 1 ) );
    t32 = L_mac0( 1 - 13, s_and( a, ~1 ), add( shr( a, 2 ), 1 ) ); /* Q0 */

    a = shr( a, 3 );
    a = shr( a, 3 ); /* Q0 */

    IF( t32 > 0 )
    {
        t32 = L_min( a, 2 );
        t32 = L_min( a, 2 ); /* Q0 */
    }
    return L_add( L_shl( L_and( ctx, 0xf ), 4 ), L_add( t32, 13 ) );
}
+4 −1
Original line number Diff line number Diff line
@@ -39,7 +39,10 @@ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y )
 *
 * \return r*c
 */
Word32 mul_sbc_14bits( Word32 r, Word16 c )
Word32 mul_sbc_14bits(
    Word32 r, /* Q0 */
    Word16 c  /* Q0 */
)
{
    Word32 ret;

+73 −71

File changed.

Preview size limit exceeded, changes collapsed.

Loading