Commit bac3be25 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Merge remote-tracking branch 'origin/main' into 3gpp_issue_1348_fix

# Conflicts:
#	lib_com/options.h
parents 8ddf7cff cf34e040
Loading
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


+4 −2
Original line number Diff line number Diff line
@@ -439,6 +439,7 @@ static Word16 fcb_table(
 * Routine to allocate fixed innovation codebook bit-budget
 *--------------------------------------------------------------------*/

#ifndef REMOVE_EVS_DUPLICATES
static ivas_error acelp_FCB_allocator(
    Word16 *nBits,            /* i/o: available bit-budget    */
    Word16 fixed_cdk_index[], /* o  : codebook index       Q0 */
@@ -599,7 +600,7 @@ static ivas_error acelp_FCB_allocator(

    return error;
}

#endif
static ivas_error acelp_FCB_allocator_ivas(
    Word16 *nBits,            /* i/o: available bit-budget    */
    Word16 fixed_cdk_index[], /* o  : codebook index       Q0 */
@@ -761,6 +762,7 @@ static ivas_error acelp_FCB_allocator_ivas(
 *   - per channel bitrate minimum is 13250 kbps for ACELP@16kHz
 *--------------------------------------------------------------------*/

#ifndef REMOVE_EVS_DUPLICATES
ivas_error config_acelp1(
    const Word16 enc_dec,                  /* i  : encoder/decoder flag            */
    const Word32 total_brate,              /* i  : total bitrate                   */
@@ -1885,7 +1887,7 @@ ivas_error config_acelp1(
 *   - should be in range of <6700; 24350> for ACELP@12.8kHz
 *   - per channel bitrate minimum is 13250 kbps for ACELP@16kHz
 *--------------------------------------------------------------------*/

#endif
ivas_error config_acelp1_IVAS(
    const Word16 enc_dec,                  /* i  : encoder/decoder flag            */
    const Word32 total_brate,              /* i  : total bitrate                   */
+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 ) )
        {
+54 −16
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@
/* RETURN ARGUMENTS :													  */
/* _ None																  */
/*========================================================================*/

#ifndef REMOVE_EVS_DUPLICATES
void Inac_swtch_ematch_fx(
    Word16 exc2[],             /* i/o: CELP/GSC excitation buffer       Q_exc*/
    Word16 dct_exc_tmp[],      /* i  : GSC excitation in DCT domain          */
@@ -155,8 +157,7 @@ void Inac_swtch_ematch_fx(

    return;
}


#endif
void Inac_switch_ematch_ivas_fx(
    Word16 exc2[],                         /* i/o: CELP/GSC excitation buffer       Q_exc*/
    Word16 dct_exc_tmp[],                  /* i  : GSC excitation in DCT domain          */
@@ -250,6 +251,21 @@ void Inac_switch_ematch_ivas_fx(
            exp = sub( exp, 14 );
            IF( LT_16( i, 2 ) )
            {
#ifdef REMOVE_EVS_DUPLICATES
                IF( EQ_16( element_mode, EVS_MONO ) )
                {
                    FOR( j = 0; j < 8; j++ )
                    {
                        L_tmp = L_mult( *pt_exc, ftmp );
                        L_tmp = L_shl_sat( L_tmp, add( exp, 15 ) ); /* Q(Q_exc) -> Q(15+Q_exc)*/
                        *pt_exc = round_fx_sat( L_tmp );            /*Q_exc - 1*/
                        move16();
                        pt_exc++;
                    }
                }
                ELSE
#endif
                {
                    FOR( j = 0; j < 8; j++ )
                    {
                        L_tmp = L_mult0( *pt_exc, ftmp );
@@ -259,8 +275,24 @@ void Inac_switch_ematch_ivas_fx(
                        pt_exc++;
                    }
                }
            }
            ELSE
            {
#ifdef REMOVE_EVS_DUPLICATES
                IF( EQ_16( element_mode, EVS_MONO ) )
                {
                    FOR( j = 0; j < 16; j++ )
                    {
                        L_tmp = L_mult( *pt_exc, ftmp );
                        L_tmp = L_shl_sat( L_tmp, add( exp, 15 ) ); /* Q(Q_exc) -> Q(15+Q_exc)*/
                        *pt_exc = round_fx_sat( L_tmp );            /*Q_exc - 1*/
                        move16();
                        pt_exc++;
                    }
                }
                ELSE
#endif
                {
                    FOR( j = 0; j < 16; j++ )
                    {
                        L_tmp = L_mult0( *pt_exc, ftmp );
@@ -271,10 +303,16 @@ void Inac_switch_ematch_ivas_fx(
                    }
                }
            }
        }

        /* Going back to time */
#ifdef REMOVE_EVS_DUPLICATES
        IF( GT_16( element_mode, EVS_MONO ) )
#endif
        {
            Scale_sig( dct_exc_tmp, 240, 1 ); // Q_exc
            Scale_sig( exc2, 240, 1 );        // Q_exc
        }
        edct_16fx( dct_exc_tmp, exc2, L_frame, 5, element_mode );
    }

+42 −18
Original line number Diff line number Diff line
@@ -1332,6 +1332,21 @@ void highband_exc_dct_in_ivas_fx(
        }
    }


#ifdef REMOVE_EVS_DUPLICATES
    IF( EQ_16( element_mode, EVS_MONO ) )
    {
        Comp_and_apply_gain_fx( exc_diffQ, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 0, Qexc_diffQ, *Q_exc );

        IF( exc_wo_nf != NULL )
        {
            Comp_and_apply_gain_fx( exc_wo_nf, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 1, Qexc_diffQ, *Q_exc );
            Vr_add( exc_dct_in, exc_wo_nf, exc_wo_nf, L_frame );
        }
    }
    ELSE
    {
#endif
        Word16 Q_tmp = *Q_exc;
        move16();
        Word16 Q_old = *Q_exc;
@@ -1358,6 +1373,10 @@ void highband_exc_dct_in_ivas_fx(
        {
            Scale_sig( exc_dct_in, L_frame, sub( *Q_exc, Q_old ) );
        }
#ifdef REMOVE_EVS_DUPLICATES
    }
#endif

    /*--------------------------------------------------------------------------------------*
     * add the correction layer to the LF bins,
     * and add the quantized pulses or the noise for the higher part of the spectrum
@@ -1397,7 +1416,12 @@ void highband_exc_dct_in_ivas_fx(
            Q_hb_exc = 0;
            move16();
            envelop_modify_fx( exc_diffQ, seed_tcx, last_bin, Ener_per_bd_iQ, *Q_exc, &Q_hb_exc );
#ifdef REMOVE_EVS_DUPLICATES
            test();
            IF( GT_16( *Q_exc, Q_hb_exc ) && GT_16( element_mode, EVS_MONO ) )
#else
            IF( GT_16( *Q_exc, Q_hb_exc ) )
#endif
            {
                Scale_sig( exc_wo_nf, L_frame, sub( Q_hb_exc, *Q_exc ) );
                *Q_exc = Q_hb_exc;
Loading