Commit 7206ede3 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into 1139-fix-param-rev-coloration-short-t60

parents 354d307b 86d5aa2f
Loading
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
@@ -24,11 +24,14 @@ variables:
      - 'ivas-conformance'
      - 'ivas-conformance-linux'
      - 'check-float-reference'
      - 'check-clipping'
      - 'test-branch-vs-input-passthrough'

  GIT_CLEAN_FLAGS: -ffdxq
  TESTCASE_TIMEOUT_STV_SANITIZERS: 180
  TESTCASE_TIMEOUT_LTV_SANITIZERS: 1200
  BASOP_REFERENCE_BRANCH: "ivas-float-update"
  SCALE_FACTOR: "3.162"


default:
@@ -70,6 +73,9 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      variables:
        IVAS_PIPELINE_NAME: 'check-float-reference: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'check-clipping'
      variables:
        IVAS_PIPELINE_NAME: 'Check core input clipping: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough'
      variables:
        IVAS_PIPELINE_NAME: 'Pass-through comparison vs input: $CI_COMMIT_BRANCH'
@@ -125,6 +131,11 @@ stages:
# automatically disable #DEBUGGING macro in options.h using /**/-comment
  - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h

.enable-debugging-macro: &enable-debugging-macro
# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment
  - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h
  - sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h

.merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec 
  ### build test binaries, initial clean for paranoia reasons
  - *disable-debugging-macro
@@ -268,6 +279,7 @@ stages:
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'check-clipping'
    - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough'
      when: never
    - when: on_success
@@ -1644,6 +1656,36 @@ test-long-self-test:
      junit:
        - report-junit-ltv.xml

check-clipping:
  tags:
    - ivas-linux
  stage: test
  timeout: "30 minutes"
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'check-clipping'
  allow_failure:
    exit_codes:
      - 123
  script:
    - *print-common-info
    - *enable-debugging-macro
    - make -j
    - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger.
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 scripts/parse_xml_report.py report-junit.xml report.csv --clipping
  artifacts:
    name: "check-clipping--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 2 weeks
    paths:
      - report-junit.xml
      - report.html
      - report.csv
    expose_as: "check-clipping results"
    reports:
      junit:
        - report-junit.xml

test-branch-vs-input-passthrough:
  tags:
    - ivas-linux
@@ -1679,6 +1721,7 @@ test-branch-vs-input-passthrough:
      junit:
        - report-junit.xml


# ---------------------------------------------------------------
# Scheduled jobs on main
# ---------------------------------------------------------------
+8 −0
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ int main(
#ifdef DEBUG_SBA
    int16_t numTransportChannels = 1;
#endif
    int32_t noClipping;
    float maxOverload, minOverload;
#endif

#ifdef DEBUGGING
@@ -792,6 +794,12 @@ int main(
    }

#ifdef DEBUGGING
    if ( ( noClipping = IVAS_ENC_GetNoCLipping( hIvasEnc, &maxOverload, &minOverload ) ) > 0 )
    {
        fprintf( stdout, "Core input overload detected: %d samples!!!\n", noClipping );
        fprintf( stdout, "Max overload value: %f \n", maxOverload );
        fprintf( stdout, "Min overload value: %f \n\n", minOverload );
    }
    print_snr();
#endif
    /*------------------------------------------------------------------------------------------*
+11 −0
Original line number Diff line number Diff line
@@ -222,6 +222,17 @@ void mvs2s(
    const int16_t n    /* i  : vector size                                     */
);

#ifdef DEBUGGING
/*! r: number of overload samples */
uint32_t check_clipping(
    const float x[],    /* i  : input vector                                   */
    const int16_t n,    /* i  : vector size                                    */
    float *maxOverload, /* i/o: max overload value                             */
    float *minOverload  /* i/o: max overload value                             */
);

#endif
/*! r: number of clipped samples */
uint32_t mvr2s(
    const float x[], /* i  : input vector                                    */
    int16_t y[],     /* o  : output vector                                   */
+40 −0
Original line number Diff line number Diff line
@@ -373,6 +373,46 @@ void mvs2s(
    return;
}

#ifdef DEBUGGING
/*! r: number of overload samples */
uint32_t check_clipping(
    const float x[],    /* i  : input vector  */
    const int16_t n,    /* i  : vector size   */
    float *maxOverload, /* i/o: max overload value */
    float *minOverload  /* i/o: max overload value */
)
{
    int16_t i;
    float temp;
    uint32_t noClipping = 0;

    for ( i = 0; i < n; i++ )
    {
        temp = x[i];

        if ( temp >= ( MAX16B_FLT + 0.5f ) )
        {
            noClipping++;
            if ( temp > *maxOverload )
            {
                *maxOverload = temp;
            }
        }
        else if ( temp <= ( MIN16B_FLT - 0.5f ) )
        {
            noClipping++;
            if ( temp < *minOverload )
            {
                *minOverload = temp;
            }
        }
    }

    return noClipping;
}

#endif
/*! r: number of clipped samples */
uint32_t mvr2s(
    const float x[], /* i  : input vector  */
    int16_t y[],     /* o  : output vector */
+4 −0
Original line number Diff line number Diff line
@@ -471,6 +471,10 @@ ivas_error ivas_cpe_enc(

    for ( n = 0; n < n_CoreChannels; n++ )
    {
#ifdef DEBUGGING
        st_ivas->noClipping += check_clipping( hCPE->hCoreCoder[n]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload );

#endif
        error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n],
                                     &ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], &vad_hover_flag[n], &attack_flag[n],
                                     realBuffer[n], imagBuffer[n], old_wsp[n], pitch_fr[n], voicing_fr[n], &loc_harm[n], &cor_map_sum[n], &vad_flag_dtx[n], enerBuffer[n],
Loading