Commit 210d6205 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'main' into 1101-IVAS-SPAR-DEC-UPMIXER-SF

parents ad619d99 d57385c1
Loading
Loading
Loading
Loading
Loading
+58 −54
Original line number Diff line number Diff line
@@ -211,17 +211,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-main-short:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main
@@ -383,6 +372,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
@@ -430,7 +420,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
@@ -450,7 +443,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;
@@ -727,39 +720,41 @@ build-codec-linux-debugging-make:
# ---------------------------------------------------------------

### 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:
@@ -805,8 +800,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
@@ -818,8 +812,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
@@ -831,8 +824,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
@@ -845,6 +837,8 @@ ivas-pytest-compare_to_ref-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
@@ -854,6 +848,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
@@ -863,6 +859,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
@@ -929,6 +927,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
@@ -938,6 +938,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
@@ -947,6 +949,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;
}
+3 −3
Original line number Diff line number Diff line
@@ -636,9 +636,9 @@ void computeDirectionVectors_fixed(
#ifdef NONBE_IMPROVE_DIRAC_INTENSITY_PREC
        IF( i_e_band != NULL )
        {
            e_x = sub( i_e_band[i - enc_param_start_band], norm_x );
            e_y = sub( i_e_band[i - enc_param_start_band], norm_y );
            e_z = sub( i_e_band[i - enc_param_start_band], norm_z );
            e_x = sub( Q31, add( i_e_band[i - enc_param_start_band], norm_x ) );
            e_y = sub( Q31, add( i_e_band[i - enc_param_start_band], norm_y ) );
            e_z = sub( Q31, add( i_e_band[i - enc_param_start_band], norm_z ) );
        }
        ELSE
        {
+5 −1
Original line number Diff line number Diff line
@@ -560,7 +560,11 @@ void ivas_fb_mixer_pcm_ingest_fx(
        move16();

        ivas_mdft_fx( ppOut_pcm[fb_cfg->remix_order[i]], hFbMixer->ppFilterbank_inFR_re_fx[fb_cfg->remix_order[i]], hFbMixer->ppFilterbank_inFR_im_fx[fb_cfg->remix_order[i]], shl( frame_len, 1 ), frame_len );
        hFbMixer->q_ppFilterbank_inFR[fb_cfg->remix_order[i]] = q_ppOut_pcm[fb_cfg->remix_order[i]];
        q_shift = L_norm_arr( hFbMixer->ppFilterbank_inFR_re_fx[fb_cfg->remix_order[i]], frame_len );
        q_shift = s_min( q_shift, L_norm_arr( hFbMixer->ppFilterbank_inFR_im_fx[fb_cfg->remix_order[i]], frame_len ) );
        scale_sig32( hFbMixer->ppFilterbank_inFR_re_fx[fb_cfg->remix_order[i]], frame_len, q_shift );
        scale_sig32( hFbMixer->ppFilterbank_inFR_im_fx[fb_cfg->remix_order[i]], frame_len, q_shift );
        hFbMixer->q_ppFilterbank_inFR[fb_cfg->remix_order[i]] = add( q_shift, q_ppOut_pcm[fb_cfg->remix_order[i]] );
        move16();
    }

+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                                      */
Loading