Commit 3c0ddb63 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into 783-ivas_spar_com-c-contains-also-other-than-spar-functions
parents a3e81dbe fdd55e9a
Loading
Loading
Loading
Loading
Loading
+60 −4
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ codec-smoke-test:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  timeout: "15 minutes"
  timeout: "17 minutes"
  stage: test
  needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"]
  script:
@@ -732,7 +732,7 @@ ivas-pytest-on-merge-request:
    - non_be_flag=$(grep -c --ignore-case "\[non[ -]*be\]" tmp.txt) || true
    - ref_using_main=$(grep -c --ignore-case "\[ref[ -]*using[ -]*main\]" tmp.txt) || true

    ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there
    ### If ref_using_main is not set, checkout the source branch to use scripts and input from there
    - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi

    ### prepare pytest
@@ -767,6 +767,62 @@ ivas-pytest-on-merge-request:
      junit:
        - report-junit.xml


# Check interop IVAS_cod_test -> IVAS_dec_ref
ivas-interop-on-merge-request:
  extends:
    - .test-job-linux
    - .rules-merge-request
  stage: test
  needs: ["build-codec-linux-cmake"]
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *get-commits-behind-count
    - *check-commits-behind-count-in-compare-jobs
    - *merge-request-comparison-setup-codec
    # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense
    - git checkout $source_branch_commit_sha

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    # write to temporary file as workaround for failures observed with piping echo
    - echo $CI_MERGE_REQUEST_TITLE > tmp.txt
    - non_interop_flag=$(grep -c --ignore-case "\[non[ -]*io\]" tmp.txt) || true

    ### prepare pytest
    # create short test vectors
    - python3 tests/create_short_testvectors.py

    # Run reference creation, using source branch encoder and main decoder (see .merge-request-comparison-setup-codec)
    - exit_code=0
    - exit_code2=0
    # set timeout for individual testcase runs to 60 seconds
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code=$?
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report2.html --self-contained-html --junit-xml=report2-junit.xml --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code2=$?
    - zero_failures=$(cat report-junit.xml report2-junit.xml | grep -c 'failures="0"') || true

    - if [ $zero_failures != 2 ] && [ $non_interop_flag == 0 ]; then echo "Non-interop cases without non-interop flag encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $zero_failures != 2 ] && [ $non_interop_flag == 1 ]; then echo "Non-interop cases with non-interop flag encountered"; exit $EXIT_CODE_NON_BE; fi
    - exit 0

  allow_failure:
    exit_codes:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
      - report.html
      - report2-junit.xml
      - report2.html
    expose_as: "interop test results"
    reports:
      junit:
        - report*-junit.xml

evs-pytest-on-merge-request:
  extends:
    - .test-job-linux
@@ -1420,7 +1476,7 @@ coverage-test-on-main-scheduled:
  rules:
    # only run in scheduled pipeline that passes this env vars
    - if: $COVERAGE_TEST
  timeout: 2 hours
  timeout: 4 hours
  script:
    - *print-common-info
    - *update-ltv-repo
+12 −0
Original line number Diff line number Diff line
@@ -180,7 +180,11 @@ $(LIB_LIBREND): $(OBJS_LIBREND)
	$(QUIET_AR)$(AR) rcs $@ $^

$(LIB_LC3PLUS): $(OBJS_LC3PLUS)
ifeq "$(INCLUDE_SPLIT)" "1"
	$(QUIET_AR)$(AR) rcs $@ $^
else
	
endif

$(LIB_LIBUTIL): $(OBJS_LIBUTIL)
	$(QUIET_AR)$(AR) rcs $@ $^
@@ -189,10 +193,18 @@ $(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(L
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC) -L. -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC)

$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS)
ifeq "$(INCLUDE_SPLIT)" "1"
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasdec -livascom -livasutil -livasdebug -llc3plus $(LDLIBS) -o $(CLI_APIDEC)
else
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasdec -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIDEC)
endif

$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LIBDEC) $(LIB_LC3PLUS)
ifeq "$(INCLUDE_SPLIT)" "1"
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -livasdec -livasutil -livasdebug -livascom -llc3plus $(LDLIBS) -o $(CLI_APIREND)
else
	$(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -livasdec -livasutil -livasdebug -livascom $(LDLIBS) -o $(CLI_APIREND)
endif

libs: $(LIB_LIBENC) $(LIB_LIBDEBUG) $(LIB_LIBCOM) $(LIB_LIBDEC) $(LIB_LIBREND) $(LIB_LC3PLUS) $(LIB_LIBUTIL)

+32 −9
Original line number Diff line number Diff line
@@ -1003,14 +1003,6 @@ int main(
#endif
    const int16_t frameSize_smpls = (int16_t) ( ( args.framing_5ms ? 5 : 20 ) * args.sampleRate / 1000 );

    IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 };
    IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 };
    IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 };
    IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 };
#ifdef SPLIT_REND_WITH_HEAD_ROT
    IVAS_REND_InputId splitBinIds[RENDERER_MAX_BIN_INPUTS] = { 0 };
#endif

    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, ( args.framing_5ms ) ? 1 : 4 ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) );
@@ -1157,6 +1149,37 @@ int main(
        }
    }

    IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS];
    IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS];
    IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS];
    IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS];
#ifdef SPLIT_REND_WITH_HEAD_ROT
    IVAS_REND_InputId splitBinIds[RENDERER_MAX_BIN_INPUTS];
#endif

    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; i++ )
    {
        mcIds[i] = 0u;
    }
    for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; i++ )
    {
        ismIds[i] = 0u;
    }
    for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; i++ )
    {
        sbaIds[i] = 0u;
    }
    for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; i++ )
    {
        masaIds[i] = 0u;
    }
#ifdef SPLIT_REND_WITH_HEAD_ROT
    for ( i = 0; i < RENDERER_MAX_BIN_INPUTS; i++ )
    {
        splitBinIds[i] = 0u;
    }
#endif

    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
    {
        if ( ( error = IVAS_REND_AddInput( hIvasRend, args.inConfig.multiChannelBuses[i].audioConfig, &mcIds[i] ) ) != IVAS_ERR_OK )
@@ -3281,7 +3304,6 @@ static void parseObjectPosition(
    int16_t read_values;
    float meta_prm[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f };


    readNextMetadataChunk( line, "," );
    *positionDuration = (uint16_t) strtol( line, &endptr, 10 );
    readNextMetadataChunk( line, "\n" );
@@ -3300,6 +3322,7 @@ static void parseObjectPosition(
    position->yaw = meta_prm[5];
    position->pitch = meta_prm[6];
    position->non_diegetic_flag = (int16_t) meta_prm[7];

    return;
}

+5 −5
Original line number Diff line number Diff line
@@ -3244,7 +3244,7 @@ static void DoRTFT600(
)
{
    float scratch[1200], cmplx[1200];
    int16_t factors[3] = { 25, 8, 3 };
    const int16_t factors[3] = { 25, 8, 3 };

    fftf_interleave( x, y, cmplx, 600 );
    pfaDFT( cmplx, 600, scratch, 3, factors );
@@ -3259,7 +3259,7 @@ static void DoRTFT400(
)
{
    float scratch[800], cmplx[800];
    int16_t factors[2] = { 25, 16 };
    const int16_t factors[2] = { 25, 16 };

    fftf_interleave( x, y, cmplx, 400 );
    pfaDFT( cmplx, 400, scratch, 2, factors );
@@ -3275,7 +3275,7 @@ static void DoRTFT240(
)
{
    float scratch[480], cmplx[480];
    int16_t factors[3] = { 16, 5, 3 };
    const int16_t factors[3] = { 16, 5, 3 };

    fftf_interleave( x, y, cmplx, 240 );
    pfaDFT( cmplx, 240, scratch, 3, factors );
@@ -3290,7 +3290,7 @@ static void DoRTFT200(
)
{
    float scratch[400], cmplx[400];
    int16_t factors[2] = { 25, 8 };
    const int16_t factors[2] = { 25, 8 };

    fftf_interleave( x, y, cmplx, 200 );
    pfaDFT( cmplx, 200, scratch, 2, factors );
@@ -3305,7 +3305,7 @@ static void DoRTFT100(
)
{
    float scratch[200], cmplx[200];
    int16_t factors[2] = { 25, 4 };
    const int16_t factors[2] = { 25, 4 };

    fftf_interleave( x, y, cmplx, 100 );
    pfaDFT( cmplx, 100, scratch, 2, factors );
+4 −8
Original line number Diff line number Diff line
@@ -1131,13 +1131,9 @@ PvqEntry mpvq_encode_vec(
)
{
    PvqEntry result;
    uint32_t h_mem[1 + KMAX_NON_DIRECT + 1]; /* allocate max offset memory  for dim 6    */
    /* OPT: actually only 1+k_val_in+1 needed ) */
    uint32_t h_mem[1 + KMAX_NON_DIRECT + 1]; /* allocate max offset memory  for dim 6    */ /* OPT: actually only 1+k_val_in+1 needed ) */
    uint32_t lead_sign_ind;

    VEC2INDFUNCM vec2mind_f[1 + N_OPT] = { NULL, vec2mind_one, vec2mind_two, vec2mind_three, vec2mind_four, vec2mind_five };
    /* VEC2INDFUNCM can be a static global  */

    const VEC2INDFUNCM vec2mind_f[1 + N_OPT] = { NULL, vec2mind_one, vec2mind_two, vec2mind_three, vec2mind_four, vec2mind_five }; /* VEC2INDFUNCM can be a static global  */

    result.k_val = k_val_local;
    result.dim = dim_in;
@@ -1202,8 +1198,7 @@ void mpvq_decode_vec(
)
{
    int16_t i, leading_sign;
    IND2VECFUNCM mind2vec_f[N_OPT + 1] = { NULL, mind2vec_one, mind2vec_two, mind2vec_three, mind2vec_four, mind2vec_five };
    /*IND2VECFUNCM vector can be static global  */
    const IND2VECFUNCM mind2vec_f[N_OPT + 1] = { NULL, mind2vec_one, mind2vec_two, mind2vec_three, mind2vec_four, mind2vec_five }; /*IND2VECFUNCM vector can be static global  */

    for ( i = 0; i < entry->dim; i++ )
    {
@@ -1229,6 +1224,7 @@ void mpvq_decode_vec(
            ( mind2vec_f[entry->dim] )( entry->k_val, leading_sign, entry->index, vec_out );
        }
    }

    return;
}

Loading