Commit ace39775 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge branch 'main' into shared/external-renderer-masa

Includes some minor fixes during merge conflict resolution.
parents cfa535ba 68a8bf3a
Loading
Loading
Loading
Loading
Loading
+233 −69
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ variables:
  EXIT_CODE_NON_BE: 123
  EXIT_CODE_FAIL: 1


# This sets when pipelines are created. Jobs have more specific rules to restrict them.
workflow:
  rules:
@@ -44,8 +45,21 @@ stages:
.get-previous-merge-commit-sha: &get-previous-merge-commit-sha
  - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H)

.merge_request_comparison_setup:
  &merge_request_comparison_setup ### build test binaries, initial clean for paranoia reasons
.mr-fetch-target-branch: &mr-fetch-target-branch
  # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching
  # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later
  - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true
  # needed when depth is lower than the number of commits in the branch
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME

.mr-get-target-commit: &mr-get-target-commit
  # 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)



.merge-request-comparison-setup-codec:
  &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons
  - make clean
  - mkdir build
  - cd build
@@ -61,14 +75,9 @@ stages:
  - source_branch_commit_sha=$(git rev-parse HEAD)

  ### checkout version to compare against
  # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching
  # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later
  - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true
  # needed when depth is lower than the number of commits in the branch
  - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
  - *mr-fetch-target-branch

  ### 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)
  - *mr-get-target-commit
  - git checkout $target_commit

  ### build reference binaries
@@ -128,6 +137,7 @@ stages:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH


# templates to define stages and platforms
.test-job-linux:
  tags:
@@ -139,6 +149,7 @@ stages:
  tags:
    - ivas-linux


# template for test jobs on linux that need the TESTV_DIR
.test-job-linux-needs-testv-dir:
  extends: .test-job-linux
@@ -154,6 +165,7 @@ stages:
    exit_codes:
      - 123


# ---------------------------------------------------------------
# Validation jobs
# ---------------------------------------------------------------
@@ -172,6 +184,7 @@ check-if-branch-is-up-to-date-with-main:
    - echo $commits_behind_count
    - if [ $commits_behind_count -eq 0 ]; then exit 0; else exit 1; fi;


# ---------------------------------------------------------------
# Build jobs
# ---------------------------------------------------------------
@@ -316,7 +329,16 @@ external-renderer-make-pytest:
    - make -j IVAS_rend
    - make -j unittests
    - make -j --directory scripts/td_object_renderer/object_renderer_standalone
    - python3 -m pytest -q --log-level ERROR -n auto -rA tests/renderer/test_renderer.py
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer make pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake + asan
external-renderer-cmake-asan-pytest:
@@ -329,7 +351,16 @@ external-renderer-cmake-asan-pytest:
    - python3 ci/disable_ram_counting.py
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=asan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n auto -rA tests/renderer/test_renderer.py
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake asan pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake + msan
external-renderer-cmake-msan-pytest:
@@ -342,10 +373,20 @@ external-renderer-cmake-msan-pytest:
    - python3 ci/disable_ram_counting.py
    - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=msan  -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n auto -rA tests/renderer/test_renderer.py
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake msan pytest results"
    reports:
      junit:
        - report-junit.xml

# test external renderer executable with cmake vs decoder renderer
external-renderer-cmake-vs-decoder-pytest:
# TODO @tmu @knj @sgi -> converted to script, decide whether to re-enable later
.external-renderer-cmake-vs-decoder-pytest:
  extends:
    - .test-job-linux
    - .rules-merge-request
@@ -354,7 +395,69 @@ external-renderer-cmake-vs-decoder-pytest:
  script:
    - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -DDEC_TO_REND_FLOAT_DUMP=true
    - cmake --build cmake-build -- -j
    - python3 -m pytest -q --log-level ERROR -n 1 -rA tests/renderer/test_renderer_vs_decoder.py
    - python3 -m pytest -q --log-level ERROR -n 1 -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_vs_decoder.py
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "external renderer cmake vs decoder results"
    reports:
      junit:
        - report-junit.xml

# compare external renderer bitexactness between target and source branch
external-renderer-pytest-on-merge-request:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-make"]
  # TODO: set reasonable timeout, will most likely take less
  timeout: "20 minutes"
  stage: compare
  script:
    - *print-common-info

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend(erer)*[ -]*non[ -]*be\]") || true
    # TODO: needs splitting the test between reference and cut generation
    #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

    # store the current commit hash
    - source_branch_commit_sha=$(git rev-parse HEAD)

    - *mr-fetch-target-branch
    - *mr-get-target-commit
    - git checkout $target_commit

    # build reference binaries
    - make -j IVAS_rend
    - mv IVAS_rend IVAS_rend_ref

    # back to source branch
    - git checkout $source_branch_commit_sha
    - make clean
    - make -j IVAS_rend

    # run test
    - exit_code=0
    - python3 -m pytest -q --log-level ERROR -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check

  allow_failure:
    exit_codes:
      - 123
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results"
    when: always
    paths:
      - report-junit.xml
    expose_as: "pytest external renderer results"
    reports:
      junit:
        - report-junit.xml

# compare bit exactness between target and source branch
ivas-pytest-on-merge-request:
@@ -366,7 +469,7 @@ ivas-pytest-on-merge-request:
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *merge_request_comparison_setup
    - *merge-request-comparison-setup-codec

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true
@@ -414,7 +517,7 @@ evs-pytest-on-merge-request:
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *merge_request_comparison_setup
    - *merge-request-comparison-setup-codec
    
    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true
@@ -450,6 +553,50 @@ evs-pytest-on-merge-request:
      junit:
        - report-junit-evs.xml

clang-format-check:
  extends:
    - .test-job-linux
    - .rules-merge-request
  variables:
    ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix"
  stage: validate
  needs: []
  timeout: "5 minutes"
  script:
    # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there
    - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch
    - >
      INSTRUCTIONS_GITLAB="To fix formatting issues:\n
      - download the diff patch available as artifact of this job\n
      - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n
      - run: git apply $PATCH_FILE_NAME\n
      - commit new changes"
    - >
      INSTRUCTIONS_README="To fix formatting issues:\n
      - place the patch file in the root directory of your local IVAS repo\n
      - run: git apply $PATCH_FILE_NAME\n
      - commit new changes"
    
    - scripts/check-format.sh -af -p 8 || format_problems=$?
    - if [ $format_problems == 0 ] ; then exit 0; fi

    - mkdir tmp-formatting-fix
    - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME"

    # Print instructions to job output
    - echo -e "$INSTRUCTIONS_GITLAB"

    # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface)
    - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt"

    - exit $format_problems
  artifacts:
    paths:
      - tmp-formatting-fix/
    when: on_failure
    name: "$ARTIFACT_BASE_NAME"
    expose_as: 'formatting patch'

# ---------------------------------------------------------------
# Test jobs for main branch
# ---------------------------------------------------------------
@@ -570,7 +717,6 @@ codec-comparison-on-main-push:
  stage: test
  tags:
    - sanitizer_test_main
  timeout: "2 hours"
  artifacts:
    name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA"
    when: always
@@ -579,150 +725,168 @@ codec-comparison-on-main-push:
      # second wildcard is necessary to get encoder and no-PLC run logs
      - "CLANG*/logs*"

### --- sanitizer schedule A ---

.sanitizer-test-schedule-A:
  extends:
    - .sanitizer-test-template
  timeout: 2 hours 30 minutes


sanitizer-test-mono:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS

sanitizer-test-stereo:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 1 hour
      start_in: 2 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS

sanitizer-test-stereodmxevs:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 2 hours
      start_in: 5 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS

sanitizer-test-ism1:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 3 hours
      start_in: 7 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism2:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 4 hours
      start_in: 10 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism3:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 6 hours
      start_in: 12 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-ism4:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 8 hours
      start_in: 15 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

sanitizer-test-mc-5_1:
  extends: .sanitizer-test-template
sanitizer-test-masa:
  extends: .sanitizer-test-schedule-A
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_A
      when: delayed
      start_in: 10 hours
      start_in: 17 hours 30 minutes
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS

### --- sanitizer schedule B ---

.sanitizer-test-schedule-B:
  extends:
    - .sanitizer-test-template
  timeout: 3 hours

sanitizer-test-mc-5_1:
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $SANITIZER_SCHEDULE_B
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-5_1_2:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 12 hours
      start_in: 3 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-5_1_4:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 14 hours
      start_in: 6 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-7_1:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 16 hours
      start_in: 9 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-mc-7_1_4:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-B
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_B
      when: delayed
      start_in: 18 hours
      start_in: 12 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-masa:
  extends: .sanitizer-test-template
  rules:
    - if: $IS_SANITIZER_TEST_RUN
      when: delayed
      start_in: 20 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS
### --- sanitizer schedule C ---

.sanitizer-test-schedule-C:
  extends:
    - .sanitizer-test-template
  timeout: 6 hours

sanitizer-test-sba:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-C
  rules:
    - if: $IS_SANITIZER_TEST_RUN
      when: delayed
      start_in: 22 hours
    - if: $SANITIZER_SCHEDULE_C
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS

sanitizer-test-planarsba:
  extends: .sanitizer-test-template
  extends: .sanitizer-test-schedule-C
  rules:
    - if: $IS_SANITIZER_TEST_RUN
    - if: $SANITIZER_SCHEDULE_C
      when: delayed
      start_in: 24 hours
      start_in: 6 hours
  script:
    - *update-ltv-repo
    - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS
+1 −0
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@
    <ClCompile Include="..\lib_rend\lib_rend.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_rend\ivas_lib_rend_internal.h" />
    <ClInclude Include="..\lib_rend\ivas_rom_binauralRenderer.h" />
    <ClInclude Include="..\lib_rend\ivas_rom_binaural_crend_head.h" />
    <ClInclude Include="..\lib_rend\ivas_rom_rend.h" />
+29 −33
Original line number Diff line number Diff line
@@ -105,20 +105,22 @@ typedef struct
    bool hrtfReaderEnabled;
    char *hrtfFileName;
    IVAS_DEC_INPUT_FORMAT inputFormat;
#ifdef DEBUGGING
    bool forceSubframeBinauralization;
    IVAS_DEC_FORCED_REND_MODE forcedRendMode;
#endif
    bool customLsOutputEnabled;
    char *customLsSetupFilename;
    int16_t orientation_tracking;
    float no_diegetic_pan;
    bool renderConfigEnabled;
    char *renderConfigFilename;

#ifdef DEBUGGING
    bool forceSubframeBinauralization;
    IVAS_DEC_FORCED_REND_MODE forcedRendMode;
#ifdef DEBUG_FOA_AGC
    FILE *agcBitstream; /* temporary */
#endif

#endif

} DecArguments;


@@ -128,12 +130,10 @@ typedef struct

static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
#ifdef DEBUGGING
static int16_t app_own_random( int16_t *seed );
#endif
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec );
#ifdef DEBUGGING
static int16_t app_own_random( int16_t *seed );
static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar );
#endif

@@ -582,10 +582,10 @@ cleanup:
        printf( "\n" );
    }

#ifdef DEBUGGING
#ifdef DEBUG_SBA_AUDIO_DUMP
    ivas_close_sba_decoder_debug_files( arg.output_Fs, numOutChannels, numTransportChannels, pca_ingest_channels );
#endif
#ifdef DEBUGGING
    dbgclose();
#endif

@@ -689,6 +689,9 @@ static bool parseCmdlIVAS_dec(

    arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED;
    arg->forceSubframeBinauralization = false;
#ifdef DEBUG_FOA_AGC
    arg->agcBitstream = NULL;
#endif
#endif
    arg->output_Fs = 48000;
    arg->outputFormat = IVAS_DEC_OUTPUT_MONO;
@@ -720,9 +723,6 @@ static bool parseCmdlIVAS_dec(

    arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192;
    arg->no_diegetic_pan = 0.f;
#ifdef DEBUG_FOA_AGC
    arg->agcBitstream = NULL;
#endif

    /*-----------------------------------------------------------------*
     * Initialization
@@ -791,21 +791,6 @@ static bool parseCmdlIVAS_dec(
            arg->jbmOffsetFilename = argv[i];
            i++;
        }
#ifdef DEBUGGING
        else if ( strcmp( argv_to_upper, "-FEC" ) == 0 )
        {
            ftmp = 0.0f;
            if ( sscanf( argv[i + 1], "%f", &ftmp ) != 1 )
            {
                arg->FEPatterFileName = argv[i + 1];
            }
            else
            {
                arg->FER = ftmp;
            }
            i += 2;
        }
#endif
        else if ( strcmp( argv_to_upper, "-Q" ) == 0 )
        {
            arg->quietModeEnabled = true;
@@ -827,6 +812,19 @@ static bool parseCmdlIVAS_dec(
            }
        }
#ifdef DEBUGGING
        else if ( strcmp( argv_to_upper, "-FEC" ) == 0 )
        {
            ftmp = 0.0f;
            if ( sscanf( argv[i + 1], "%f", &ftmp ) != 1 )
            {
                arg->FEPatterFileName = argv[i + 1];
            }
            else
            {
                arg->FER = ftmp;
            }
            i += 2;
        }
        else if ( strcmp( argv_to_upper, "-FORCE" ) == 0 )
        {
            i++;
@@ -837,6 +835,11 @@ static bool parseCmdlIVAS_dec(
                i++;
            }
        }
        else if ( strcmp( argv_to_upper, "-FORCE_SUBFRAME_BIN" ) == 0 ) /* Force binauralization to subframe (5 ms) resolution */
        {
            arg->forceSubframeBinauralization = true;
            i++;
        }
#ifdef DEBUG_MODE_INFO
#ifdef DEBUG_MODE_INFO_TWEAK
        /*-----------------------------------------------------------------*
@@ -948,13 +951,6 @@ static bool parseCmdlIVAS_dec(
            }
            i++;
        }
#ifdef DEBUGGING
        else if ( strcmp( argv_to_upper, "-FORCE_SUBFRAME_BIN" ) == 0 ) /* Force binauralization to subframe (5 ms) resolution */
        {
            arg->forceSubframeBinauralization = true;
            i++;
        }
#endif

        /*-----------------------------------------------------------------*
         * Option not recognized
+77 −90

File changed.

Preview size limit exceeded, changes collapsed.

+262 −143

File changed.

Preview size limit exceeded, changes collapsed.

Loading