Commit b5648b80 authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

Merge branch 'main' into '1771-operator-i_mult-i_mult_o-i_mult_sat-use-all-wrong-multiplication'

# Conflicts:
#   lib_com/basop32.c
parents 43e927f7 c7a85855
Loading
Loading
Loading
Loading
Loading
+61 −1
Original line number Diff line number Diff line
variables:
  # note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this
  # see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information
  IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 41186736915f5c0a857ac92e8ab438c434e5247d
  IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF a31272de16bd1b556269a50bc179321a60f2a500

include:
  - local: .gitlab-ci/variables.yml
@@ -62,6 +62,9 @@ workflow:
    - 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 == 'web' && $MANUAL_PIPELINE_TYPE == 'renderer-framesize-be'
      variables:
        IVAS_PIPELINE_NAME: 'Renderer framesize BE test on $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'peaq-enc-passthrough'
      variables:
        IVAS_PIPELINE_NAME: 'PEAQ encoder pass-through test: $CI_COMMIT_BRANCH'
@@ -1060,6 +1063,63 @@ check-regressions-short-dec--10db:
    DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
    MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"

check-be-between-renderer-framesizes:
  extends:
    - .test-job-linux
    # - .rules-pytest-to-main-short
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "renderer-framesize-be"
  stage: test
  needs: ["build-codec-linux-make"]
  script:
    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-limiter.sh
    - make clean
    - make -j
    - echo "$SHORT_TEST_SUITE"

    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/build-float-ref-and-dut-binaries.sh
    - python3 ci/remove_unsupported_testcases.py $PRM_FILES

    - exit_code=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection --tb=no -v --ref_encoder_path ./IVAS_cod_ref --ref_decoder_path ./IVAS_dec --update_ref 1 --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml || exit_code=$?

    - exit_code5=0
    - exit_code10=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection --tb=no -v --ref_encoder_path ./IVAS_cod_ref --ref_decoder_path ./IVAS_dec --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only || exit_code5=$?
    - python3 -m pytest tests/codec_be_on_mr_nonselection --tb=no -v --ref_encoder_path ./IVAS_cod_ref --ref_decoder_path ./IVAS_dec --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only || exit_code10=$?

    - zero_errors5=$(cat report-junit-5ms.xml | grep -c 'errors="0"') || true
    - zero_errors10=$(cat report-junit-10ms.xml | grep -c 'errors="0"') || true
    - zero_errors=1

    - *print-results-banner
    - echo "!! Encoder command lines are in the 20ms log files only !!!"
    - if [ $exit_code -ne 0 ]; then echo "20 ms framesize run already failed with errors."; zero_errors=0; fi
    - if [ $zero_errors5 != 1 ]; then echo "run error with 5ms rendering encountered"; zero_errors=0 ; fi
    - if [ $zero_errors10 != 1 ]; then echo "run error with 10ms rendering encountered"; zero_errors=0 ; fi
    - if [ $zero_errors != 1 ]; then exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code5 -ne 0 ]; then echo "Non-bitexact cases encountered with 5ms rendering!"; exit_code=1; fi
    - if [ $exit_code10 -ne 0 ]; then echo "Non-bitexact cases encountered with 10ms rendering!"; exit_code=1; fi
    - if [ $exit_code -ne 0 ]; then exit $EXIT_CODE_FAIL; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    expose_as: "pytest 5ms and 10ms vs 20ms results"
    paths:
      - report-junit-5ms.xml
      - report-5ms.html
      - report-junit-10ms.xml
      - report-10ms.html
      - report-junit-20ms.xml
      - report-20ms.html
    reports:
      junit:
        - report-junit-5ms.xml
        - report-junit-10ms.xml
        - report-junit-20ms.xml


# ---------------------------------------------------------------
# Short test jobs for running from web interface or schedule
# ---------------------------------------------------------------
+1 −0
Original line number Diff line number Diff line
@@ -63,4 +63,5 @@ variables:
      - 'complexity'
      - 'coverage'
      - 'voip-be-test'
      - 'renderer-framesize-be'
      - 'peaq-enc-passthrough'
+5 −1
Original line number Diff line number Diff line
@@ -197,7 +197,11 @@ void E_UTIL_deemph2( Word16 shift, Word16 *x, const Word16 mu, const Word16 L, W
    {
        FOR( i = 0; i < L; i++ )
        {
#ifdef ISSUE_1772_replace_shr_o
            L_tmp = L_msu_o( Mpy_32_16_1( L_tmp, mu ), shr_sat( x[i], shift ), -32768 /*1.0f in Q15*/, &Overflow ); /*Qx-shift+16*/
#else
            L_tmp = L_msu_o( Mpy_32_16_1( L_tmp, mu ), shr_o( x[i], shift, &Overflow ), -32768 /*1.0f in Q15*/, &Overflow ); /*Qx-shift+16*/
#endif
            x[i] = round_fx_o( L_tmp, &Overflow ); /*Qx-shift*/
            move16();
        }
+27 −3
Original line number Diff line number Diff line
@@ -614,13 +614,21 @@ void ivas_fb_mixer_get_windowed_fr_fx(
    Word16 n_new_samples;
    Word32 fr_in_block_fx[L_FRAME48k * 2];
    const Word16 *win_ptr_fx;

#ifdef OPT_MCT_ENC_V1_BE
    Word16 two_mdft_len = shl( mdft_len, 1 );
    Word16 tmp = sub( shl( mdft_len, 1 ), length );
    Word16 gb_neg = negate( gb );

    n_old_samples = s_min( ( sub( hFbMixer->fb_cfg->prior_input_length, hFbMixer->fb_cfg->windowed_fr_offset ) ), two_mdft_len );
    offset = sub( tmp, hFbMixer->ana_window_offset );
    rev_offset = sub( two_mdft_len, hFbMixer->ana_window_offset );
#else
    n_old_samples = s_min( ( sub( hFbMixer->fb_cfg->prior_input_length, hFbMixer->fb_cfg->windowed_fr_offset ) ), ( shl( mdft_len, 1 ) ) );
    n_new_samples = s_max( 0, sub( shl( length, 1 ), n_old_samples ) );
    offset = sub( sub( shl( mdft_len, 1 ), length ), hFbMixer->ana_window_offset );
    rev_offset = sub( shl( mdft_len, 1 ), hFbMixer->ana_window_offset );
#endif
    set32_fx( fr_in_block_fx, 0, offset );

    n_new_samples = s_max( 0, sub( shl( length, 1 ), n_old_samples ) );
    FOR( ch_idx = 0; ch_idx < nchan_fb_in; ch_idx++ )
    {
        Copy32( &hFbMixer->ppFilterbank_prior_input_fx[ch_idx][offset + hFbMixer->fb_cfg->windowed_fr_offset], &fr_in_block_fx[offset], sub( n_old_samples, offset ) ); // Qx
@@ -628,25 +636,41 @@ void ivas_fb_mixer_get_windowed_fr_fx(

        win_ptr_fx = hFbMixer->pAna_window_fx; /*Q15*/

#ifdef OPT_MCT_ENC_V1_BE
        FOR( j = offset; j < tmp; j++ )
#else
        FOR( j = offset; j < sub( shl( mdft_len, 1 ), length ); j++ )
#endif
        {
            fr_in_block_fx[j] = Mpy_32_16_1( fr_in_block_fx[j], ( *( win_ptr_fx++ ) ) ); // Qx + 15 - 15 = Qx
            move32();
        }

#ifdef OPT_MCT_ENC_V1_BE
        FOR( j = rev_offset; j < two_mdft_len; j++ )
#else
        FOR( j = rev_offset; j < shl( mdft_len, 1 ); j++ )
#endif
        {
            fr_in_block_fx[j] = Mpy_32_16_1( fr_in_block_fx[j], ( *( --win_ptr_fx ) ) ); // Qx + 15 - 15 = Qx
            move32();
        }

#ifdef OPT_MCT_ENC_V1_BE
        scale_sig32( fr_in_block_fx, two_mdft_len, gb_neg );
#else
        FOR( Word16 i = 0; i < shl( mdft_len, 1 ); i++ )
        {
            fr_in_block_fx[i] = L_shr( fr_in_block_fx[i], gb ); // Qx - gb
            move32();
        }
#endif

#ifdef OPT_MCT_ENC_V1_BE
        ivas_mdft_fx( fr_in_block_fx, frame_f_real_fx[ch_idx], frame_f_imag_fx[ch_idx], two_mdft_len, mdft_len );
#else
        ivas_mdft_fx( fr_in_block_fx, frame_f_real_fx[ch_idx], frame_f_imag_fx[ch_idx], shl( mdft_len, 1 ), mdft_len );
#endif
    }

    return;
+14 −1
Original line number Diff line number Diff line
@@ -1575,7 +1575,12 @@ void ivas_mdct_core_tns_ns_fx(
    Word32 *x_fx[CPE_CHANNELS][NB_DIV],                          /* o  : synthesis @internal_FS                 */
    Word32 Aq_fx[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* o  : LP coefficients                        */
    const Word16 MCT_flag,                                       /* i  : hMCT handle allocated (1) or not (0)   */
    Word16 x_e[CPE_CHANNELS][NB_DIV] );
#ifdef OPT_SBA_DEC_V2_NBE
    Word16 x_e
#else  /* OPT_SBA_DEC_V2_NBE */
    Word16 x_e[CPE_CHANNELS][NB_DIV]
#endif /* OPT_SBA_DEC_V2_NBE */
);

void decoder_tcx_imdct_fx(
    Decoder_State *st,         /* i/o: coder memory state                      */
@@ -1936,9 +1941,17 @@ void ivas_mdct_core_invQ_fx(
    Word16 fUseTns[CPE_CHANNELS][NB_DIV],              /* i  : flag TNS enabled                       */
    STnsData tnsData[CPE_CHANNELS][NB_DIV],            /* i  : TNS parameter                          */
    Word32 *x_0[CPE_CHANNELS][NB_DIV],                 /* i/o: signal buffer                          */
#ifdef OPT_SBA_DEC_V2_NBE
    Word16 x_0_e,
#else                                /* OPT_SBA_DEC_V2_NBE */
    Word16 x_0_e[CPE_CHANNELS][NB_DIV],
#endif                               /* OPT_SBA_DEC_V2_NBE */
    Word32 *x[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer                          */
#ifdef OPT_SBA_DEC_V2_NBE
    Word16 x_e,
#else  /* OPT_SBA_DEC_V2_NBE */
    Word16 x_e[CPE_CHANNELS][NB_DIV],
#endif /* OPT_SBA_DEC_V2_NBE */
    Word16 x_len[CPE_CHANNELS][NB_DIV],
    Word16 Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* i  : LP coefficients                        */
    Word16 ms_mask[NB_DIV][MAX_SFB],                          /* i  : M/S mask                               */
Loading