Commit fcbc6192 authored by multrus's avatar multrus
Browse files

Merge branch 'main' into...

Merge branch 'main' into 1481-stereo-dmx-usage-of-basop_util_divide3232_scale_newton-to-calculate-hpha-fad_g_prc_fx
parents eba16468 519d8489
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -48,9 +48,9 @@ variables:
  FAILED_TESTCASES_LIST: "failed-testcases.txt"
  ERRORS_TESTCASES_LIST: "errors-testcases.txt"
  PYTEST_CACHE_ARTIFACT: "pytest_cache.zip"
  FLOAT_REF_COMMIT_FILE: "float-ref-git-sha"
  CUT_COMMIT_FILE: "CuT-git-sha"
  MERGE_TARGET_COMMIT_FILE: "merge-target-git-sha"
  FLOAT_REF_COMMIT_FILE: "float-ref-git-sha.txt"
  CUT_COMMIT_FILE: "CuT-git-sha.txt"
  MERGE_TARGET_COMMIT_FILE: "merge-target-git-sha.txt"
  MANUAL_PIPELINE_TYPE:
    description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec."
    value: 'default'
@@ -171,7 +171,7 @@ stages:
  - git pull origin $FLOAT_REF_BRANCH
  - *activate-debug-mode-info-if-set
  - make clean
  - make -j
  - make -j >> /dev/null
  - mv ./IVAS_cod ./$REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_dec ./$REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_rend ./IVAS_rend_ref
@@ -187,7 +187,7 @@ stages:
  - git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
  - *activate-debug-mode-info-if-set
  - make clean
  - make -j
  - make -j >> /dev/null
  - mv ./IVAS_cod ./$MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_dec ./$MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY
  - mv ./IVAS_rend ./IVAS_rend_merge_target
@@ -202,7 +202,7 @@ stages:
### build dut binaries
  - *activate-debug-mode-info-if-set
  - make clean
  - make -j
  - make -j >> /dev/null

.build-and-create-float-ref-outputs: &build-and-create-float-ref-outputs
  - *build-float-ref-and-dut-binaries
@@ -509,7 +509,7 @@ stages:
    - *build-float-ref-binaries
    - *build-merge-target-binaries
    - make clean
    - make -j
    - make -j >> /dev/null
    - *check-up-to-date-in-comparison-jobs

    - exit_code_target=0
@@ -660,7 +660,7 @@ stages:
    - git checkout $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
    - git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
    - make clean
    - make -j
    - make -j >> /dev/null
    # need to restore cache again
    - *overwrite-pytest-cache-with-artifact
    - python3 -m pytest --tb=no -q $TEST_SUITE -v --keep_files --create_cut --html=$HTML_REPORT_MAIN --self-contained-html --junit-xml=$XML_REPORT_MAIN $comp_args --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || true
@@ -759,7 +759,7 @@ stages:
    -   make_args="$make_args IGNORELIST=1"
    - fi
    - make clean
    - make -j $make_args
    - make -j $make_args >> /dev/null
    - testcase_timeout_arg="--testcase_timeout $TESTCASE_TIMEOUT_LTV_SANITIZERS"
    # disable per-testcase timeout for msan to evaluate what is going on that it takes so long
    - if [[ $CLANG_NUM = 1 ]]; then
@@ -1536,7 +1536,7 @@ coverage-test-on-main-scheduled:
    - *copy-ltv-files-to-testv-dir
    - *build-float-ref-binaries
    # Build DuT binaries with GCOV
    - make clean
    - make clean >> /dev/null
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy to ensure instrumented renderer is run in the first pytest call

@@ -1594,7 +1594,7 @@ be-2-evs-26444:
    - *print-common-info
    - *update-scripts-repo
    - sed -i".bak" "s/\(#define EVS_FLOAT\)/\/\/\1/" lib_com/options.h
    - make -j
    - make -j  >> /dev/null

    # copy over to never change the testvector dir
    - cp -r $EVS_BE_TEST_DIR_BASOP ./evs_be_test
@@ -1658,7 +1658,7 @@ voip-be-on-merge-request:
  script:
    - *print-common-info
    - make clean
    - make -j
    - make -j >> /dev/null
    - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py


+32 −8
Original line number Diff line number Diff line
@@ -901,7 +901,7 @@ void cldfbAnalysis_ts_fx_fixed_q(
    const Word16 *ptr_pf_fx;
    Word16 ptr_pf_sf;
    Word32 *timeBuffer_fx, buffer_fx[( CLDFB_NO_CHANNELS_MAX * CLDFB_NO_COL_MAX ) + ( 9 * CLDFB_NO_CHANNELS_MAX )];
    Word16 offset, frameSize;
    Word16 offset, frameSize, gb, hr, shift;

    offset = sub( h_cldfb->p_filter_length, h_cldfb->no_channels );
    frameSize = i_mult( h_cldfb->no_channels, h_cldfb->no_col );
@@ -1071,10 +1071,33 @@ void cldfbAnalysis_ts_fx_fixed_q(
        *q_cldfb = sub( *q_cldfb, 2 );
        move16();

        gb = find_guarded_bits_fx( M1 );
        hr = L_norm_arr( iBuffer_fx, M1 );

        IF( LT_16( hr, gb ) )
        {
            scale_sig32( iBuffer_fx, M1, sub( hr, gb ) );
        }

        /* FFT of DCT IV */
        fft_cldfb_fx( iBuffer_fx, M2 );

        /* post modulation of DCT IV */
        IF( LT_16( hr, gb ) )
        {
            shift = sub( gb, hr );
            FOR( k = 0; k < M2; k++ )
            {
                /* do it inplace */
                /*cplxMult(&imagBuffer[2*k],&imagBuffer[M1-1-(2*k)],iBuffer[2*k],iBuffer[2*k+1],rot_vctr_re[k],rot_vctr_im[k]);*/
                imagBuffer_fx[2 * k] = L_shl( Msub_32_32( Mpy_32_32( iBuffer_fx[2 * k], rot_vctr_re_fx[k] ), iBuffer_fx[2 * k + 1], rot_vctr_im_fx[k] ), shift );                  // q - 5
                imagBuffer_fx[( M1 - 1 ) - ( k * 2 )] = L_shl( Madd_32_32( Mpy_32_32( iBuffer_fx[2 * k], rot_vctr_im_fx[k] ), iBuffer_fx[2 * k + 1], rot_vctr_re_fx[k] ), shift ); // q - 5
                move32();
                move32();
            }
        }
        ELSE
        {
            FOR( k = 0; k < M2; k++ )
            {
                /* do it inplace */
@@ -1084,6 +1107,7 @@ void cldfbAnalysis_ts_fx_fixed_q(
                move32();
                move32();
            }
        }

        IF( EQ_32( h_cldfb->prototype, CLDFB_PROTOTYPE_5_00MS ) )
        {
+15 −27
Original line number Diff line number Diff line
@@ -177,9 +177,10 @@ void pre_echo_att_ivas_fx(
    move16();
    Word16 ratio_fx;
    Word16 attack_pos_fx, i;
    Word32 L_tmp, L_tmp1;
    Word16 tmp, n1, n2, exp, frac1, frac2;
    Word32 L_tmp;
    Word16 tmp, tmp_e;
    Word32 etmp1_fx;
    Word16 etmp_e;
    Word16 att_len;

    test();
@@ -220,32 +221,19 @@ void pre_echo_att_ivas_fx(
        IF( GT_32( etmp_fx, *Last_frame_ener_fx ) && attack_pos_fx > 0 )
        {
            /* Find the average energy before the attack */
            L_tmp = sum32_fx( finc_fx, attack_pos_fx );                  /*Q1 */
            L_tmp1 = L_shr( L_mult( attack_pos_fx, attack_pos_fx ), 1 ); /*Q0 */
            tmp = round_fx( Isqrt( L_tmp1 ) );                           /*Q15 */
            L_tmp = L_shr( L_tmp, 2 );                                   /*Q1 ; ATT_SEG_LEN=4 */
            etmp_fx = Mult_32_16( L_tmp, tmp );                          /*Q1 */
            etmp_fx = sum32_fx( finc_fx, attack_pos_fx );
            etmp_e = sub( 31, add( shl( Q_new, 1 ), 1 ) );
            etmp_fx = L_add( etmp_fx, L_shr( 21474836 /*0.01 in Q31*/, etmp_e ) ); /* etmp = etmp + 0.01;   (exp = etmp_e) */
            etmp_fx = L_deposit_h( BASOP_Util_Divide3232_Scale( etmp_fx, L_mult0( attack_pos_fx, ATT_SEG_LEN ), &tmp_e ) );
            tmp_e = add( tmp_e, sub( etmp_e, 31 ) );
            etmp_e = tmp_e;
            move16();

            etmp_fx = L_shr( etmp_fx, add( 1 - 4, shl( Q_new, 1 ) ) ); /* makes etmp i nQ4 as *Last_frame_ener_fx */
            /* Find the correction factor and apply it before the attack */
                                                                       /*   ratio = (float)sqrt(*Last_frame_ener/etmp);*/
                                                                       /*         = isqrt(etmp/(*Last_frame_ener))			*/
            etmp_fx = L_max( etmp_fx, 1 );
            *Last_frame_ener_fx = L_max( *Last_frame_ener_fx, 1 );
            move32();
            n1 = norm_l( etmp_fx );
            n2 = norm_l( *Last_frame_ener_fx );

            n1 = sub( n1, 1 );
            exp = sub( n1, n2 );

            frac1 = round_fx( L_shl( etmp_fx, n1 ) );
            frac2 = round_fx_sat( L_shl_sat( *Last_frame_ener_fx, n2 ) );
            L_tmp = L_mult0( 128, div_s( frac1, frac2 ) ); /* s = gain_out / gain_in */
            L_tmp = L_shr( L_tmp, exp );                   /* add exponent */

            L_tmp = Isqrt( L_tmp );
            ratio_fx = round_fx( L_shl( L_tmp, 9 ) );
            tmp = BASOP_Util_Divide3232_Scale( *Last_frame_ener_fx, etmp_fx, &tmp_e ); /* numerator Q = 2 * Q_new + 1;  denominator Q = 31 - tmp_e */
            tmp_e = add( tmp_e, sub( sub( 31, etmp_e ), add( shl( Q_new, 1 ), 1 ) ) ); /* tmp_e = tmp_e + (31 - tmp_e) - (2 * Q_new + 1) */
            tmp = Sqrt16( tmp, &tmp_e );
            ratio_fx = shr( tmp, sub( 2, tmp_e ) ); /* Q13 */

            /* Pre-echo atttenuation should never increase the energy */
            ratio_fx = s_min( ratio_fx, 8192 /* 1 in Q13 */ ); /* Q13 */
+1 −1
Original line number Diff line number Diff line
@@ -1034,7 +1034,7 @@ void computeDiffuseness_fixed(
        exp1 = sub( 31, q_intensity_slow );
        tmp = Sqrt32( p_tmp[i], &exp1 );

        tmp = BASOP_Util_Divide3232_Scale_cadence( tmp, L_add( energy_slow[i], EPSILLON_FX ), &exp2 );
        tmp = BASOP_Util_Divide3232_Scale_newton( tmp, L_add( energy_slow[i], EPSILLON_FX ), &exp2 );
        q_tmp = add( sub( 31, exp2 ), sub( sub( 31, exp1 ), q_ene ) );

        IF( LT_16( q_tmp, Q30 ) )
+3 −3
Original line number Diff line number Diff line
@@ -314,9 +314,9 @@ Word16 quantize_phi_enc_fx(
    Word32 temp_res;
    Word16 temp_e;

    delta_phi_fx = BASOP_Util_Divide3232_Scale_cadence( 360, n, &temp_e );
    delta_phi_fx = BASOP_Util_Divide3232_Scale_newton( 360, n, &temp_e );
    delta_phi_fx = L_shl( delta_phi_fx, sub( temp_e, 9 ) );
    inv_delta_phi_fx = BASOP_Util_Divide3232_Scale_cadence( n, 360, &temp_e );
    inv_delta_phi_fx = BASOP_Util_Divide3232_Scale_newton( n, 360, &temp_e );

    IF( EQ_16( n, 1 ) )
    {
@@ -661,7 +661,7 @@ Word16 quantize_phi_chan_compand_fx(

    /* quantize companded value */
    // delta_phi = 360.0f / (float) n;
    delta_phi = BASOP_Util_Divide3232_Scale_cadence( 360, n, &tmp_e );
    delta_phi = BASOP_Util_Divide3232_Scale_newton( 360, n, &tmp_e );
    delta_phi = L_shr( delta_phi, sub( 9, tmp_e ) ); // Q22
    // id_phi = (int16_t) round_f( ( phi / (float) delta_phi ) );
    id_phi = BASOP_Util_Divide3232_Scale( phi, delta_phi, &tmp_e ); // Q15
Loading