Commit ac3a345f authored by eichenseer's avatar eichenseer
Browse files

Merge branch 'main' into 549-paramism-output-too-quiet

parents efe550d9 ebe50d64
Loading
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -69,7 +69,9 @@ stages:
  # compare to last target branch commit before pipeline was created
  - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H)


.check-for-testvectors: &check-for-testvectors
  # check if the testvector files specified in scripts/config/ci_linux*.json are present
  - python3 -m pytest tests/ci/test_vectors_available.py

.merge-request-comparison-setup-codec:
  &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons
@@ -660,30 +662,35 @@ clang-format-check:
    expose_as: 'formatting patch'

# check for crashes if first received frame on decoder side is an SID
.check-first-frame-is-sid:
check-first-frame-is-sid:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  tags:
    - ivas-linux
  stage: test
  needs: ["build-codec-linux-cmake"]
  # needs: ["build-codec-linux-cmake"]
  script:
    - *print-common-info
    - *update-ltv-repo
    - *check-for-testvectors
    - cmake .
    - make -j

    # TODO: for some MASA modes, we currently do not have testvectors that actually trigger DTX
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -v MASA)
    - echo $modes
    - scripts/runIvasCodec.py -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 500
    # SBA is run separately to use shorter part of file
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep -v MASA | grep -v SBA)
    - scripts/runIvasCodec.py -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 500 -U 0:20 || exit_code_no_sba=$?
    - modes=$(scripts/runIvasCodec.py -l | grep dtx | grep SBA)
    - scripts/runIvasCodec.py -p scripts/config/ci_linux_sidstart_test.json -m $modes -s --bs_length 500 -U 70:80 || exit_code_sba=$?
    - if [ $exit_code_no_sba != 0 || $exit_code_sba != 0]; then exit 1; fi
  artifacts:
    paths:
      - out/logs
    when: on_failure
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart"
    expose_as: "logs-sidstart"
    expire_in: "5 days"

# ---------------------------------------------------------------
# Test jobs for main branch
+3 −0
Original line number Diff line number Diff line
@@ -160,6 +160,9 @@
#define IGF_TUNING_96                                   /* FhG: Issue 546: slight tuning of IGF config used in 96 kbps stereo, 128 kbps SBA and others */
#define FIX_549_DMX_GAIN                                /* FhG: issue 549: ParamISM output too quiet */

#define FIX_522_ISM_FIRST_SID                           /* VA: fix ISM decoder crash if first received frame is an SID */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+31 −0
Original line number Diff line number Diff line
@@ -282,6 +282,37 @@ ivas_error ivas_dec_setup(
                st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate;
            }
        }

#ifdef FIX_522_ISM_FIRST_SID
        if ( st_ivas->ini_frame == 0 && st_ivas->ivas_format == ISM_FORMAT )
        {
            /* read the number of objects */
            st_ivas->nchan_transport = 1;
            nchan_ism = 1;
            k = (int16_t) ( ( ivas_total_brate / FRAMES_PER_SEC ) - 1 ) - SID_FORMAT_NBITS;
            while ( st_ivas->bit_stream[k] && nchan_ism < MAX_NUM_OBJECTS )
            {
                nchan_ism++;
                k--;
            }
            k--;

            st_ivas->nchan_ism = nchan_ism;

            /* read ism_mode */
            if ( nchan_ism > 2 )
            {
                k -= nchan_ism; /* SID metadata flags */
                idx = st_ivas->bit_stream[k];
                st_ivas->ism_mode = (ISM_MODE) ( idx + 1 );
            }

            if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
#endif
    }

    /*-------------------------------------------------------------------*
+1 −9
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ static ivas_error ivas_ism_bitrate_switching(
    RENDERER_TYPE renderer_type_old;

    error = IVAS_ERR_OK;

    nCPE_old = st_ivas->nCPE;
    nSCE_old = st_ivas->nSCE;

@@ -205,12 +204,7 @@ static ivas_error ivas_ism_bitrate_switching(
            ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );

            /* Open Crend Binaural renderer */
            if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ),
                                                st_ivas->intern_config,
                                                st_ivas->hOutSetup.output_config,
                                                st_ivas->hRenderConfig,
                                                st_ivas->hSetOfHRTF,
                                                st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -364,10 +358,8 @@ ivas_error ivas_ism_dec_config(
    int16_t nchan_transport_old;

    error = IVAS_ERR_OK;

    ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;


    /* Assumes that num of input objects are constant */
    nchan_transport_old = st_ivas->nchan_ism;

+17 −13
Original line number Diff line number Diff line
@@ -634,6 +634,10 @@ ivas_error ivas_ism_metadata_dec_create(

        st_ivas->hIsmMetaData[ch]->last_true_azimuth = 0;
        st_ivas->hIsmMetaData[ch]->last_true_elevation = 0;
#ifdef FIX_522_ISM_FIRST_SID
        st_ivas->hIsmMetaData[ch]->last_azimuth = 0;
        st_ivas->hIsmMetaData[ch]->last_elevation = 0;
#endif

        ivas_ism_reset_metadata( st_ivas->hIsmMetaData[ch] );
    }
Loading