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

Merge branch 'main' into 34-bug-in-masa-format-ext-output-spherical-indexing

parents 45a70d21 d12242a3
Loading
Loading
Loading
Loading
Loading
+46 −9
Original line number Diff line number Diff line
@@ -31,6 +31,14 @@ stages:
  tags:
    - ivas-linux

.build-job-linux:
  extends: .test-job
  stage: build
  timeout: "2 minutes"
  tags:
    - ivas-linux


# template for test jobs on linux that need the TESTV_DIR
.test-job-linux-needs-testv-dir:
  extends: .test-job-linux
@@ -40,7 +48,7 @@ stages:

# template for build jobs to include the check for warnings
.build-job-with-check-for-warnings:
  extends: .test-job-linux
  extends: .build-job-linux
  stage: build
  allow_failure:
    exit_codes:
@@ -87,7 +95,6 @@ build-codec-linux-cmake:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
  script:
    - mkdir build
    - cd build
@@ -98,19 +105,17 @@ build-codec-linux-cmake:
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-codec-instrumented-linux:
  extends: .test-job-linux
  extends: .build-job-linux
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
  script:
    - bash ci/build_codec_instrumented_linux.sh

# make sure that the codec builds with msan, asan and usan
build-codec-sanitizers-linux:
  extends: .test-job-linux
  extends: .build-job-linux
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
  script:
    - bash ci/build_codec_sanitizers_linux.sh

@@ -119,8 +124,7 @@ build-codec-sanitizers-linux:
codec-smoke-test:
  extends: .test-job-linux-needs-testv-dir
  # temporarily restrict this job to the only runner which (so far) seems to runit without problems
  tags:
    - test-fhg-linux-runner1
  timeout: "5 minutes"
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: test
@@ -135,6 +139,36 @@ codec-smoke-test:
      - out/logs


# code selftest testvectors with memory-sanitizer binaries
msan-on-merge-request-linux:
  extends: .test-job-linux
  stage: test
  needs: [ "build-codec-sanitizers-linux" ]
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make clean
    - make -j CLANG=1
    - python3 scripts/self_test.py --create | tee test_output.txt
    - run_errors=$(cat test_output.txt | grep -ic "run errors") || true
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang memory-sanitizer"; exit 1; fi


# code selftest testvectors with address-sanitizer binaries
asan-on-merge-request-linux:
  extends: .test-job-linux
  stage: test
  needs: [ "build-codec-sanitizers-linux" ]
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make clean
    - make -j CLANG=2
    - python3 scripts/self_test.py --create | tee test_output.txt
    - run_errors=$(cat test_output.txt | grep -ic "run errors") || true
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang address-sanitizer"; exit 1; fi


# compare bit exactness between target and source branch
self-test-on-merge-request:
  extends: .test-job-linux
@@ -142,6 +176,7 @@ self-test-on-merge-request:
  needs: [ "build-codec-linux-cmake", "codec-smoke-test" ]
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  timeout: "10 minutes"
  script:
    ### build test binaries, initial clean for paranoia reasons
    - make clean
@@ -205,7 +240,7 @@ self-test-on-merge-request:
    - exit_code=0
    - python3 ./scripts/ivas_pytests/self_test_b.py --encref IVAS_cod_ref --decref IVAS_dec_ref --encdut IVAS_cod_test --decdut IVAS_dec_test || exit_code=$?
    - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures and non-BE flag not present"; exit $EXIT_CODE_FAIL; fi
    - zero_errors=$(cat report-junit.xml | grep -c 'testsuite errors="0"') || true
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true
    - if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
    - if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi;
    # return exit code from selftest if everything went well with the pytest run
@@ -214,10 +249,12 @@ self-test-on-merge-request:
    exit_codes:
      - 123
  artifacts:
    when: always
    paths:
      - test_output.txt
      - scripts/test/logs
      - scripts/ref/logs
      - report-junit.xml
    reports:
      junit: report-junit.xml

+4 −5
Original line number Diff line number Diff line
@@ -148,15 +148,14 @@
/*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/            /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */
/*#define FIX_I1_113*/                                  /* under review : MCT bit distribution optimization for SBA high bitrates*/

#define FIX_34                                          /* Nokia: Fix bug in MASA format EXT output spherical indexing */

#define SIMPLIFY_SBA_RENDERING_LOGIC                    /* SBA rendering maintenance related to ticket #45 */
#define SBA_CLEANING                                    /* SBA maintenance related to ticket #45 */ 

#define REFACTOR_REVERB_INIT_ADD_CFG_CHECKS             /* Simplify and improve reverb initialization + add range checks on config parameter values */

#define DIRAC_DRCT_GAIN_TUNING


#define REFACTOR_REVERB_INIT_ADD_CFG_CHECKS             /* Simplify and improve reverb initialization + add range checks on config parameter values */
#define FIX_34                                          /* Nokia: Fix bug in MASA format EXT output spherical indexing */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+5 −0
Original line number Diff line number Diff line
@@ -729,8 +729,13 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd(
            g1 = 0.3679f + onset_filter[l] * ( 0.1175f - 0.3679f );
            g2 = ( 1.f - g1 ) * *( p_gains_dir );
            g2 += g1 * ( *( p_cy_cross_dir_smooth++ ) );
#ifdef DIRAC_DRCT_GAIN_TUNING
            g2 = max( g2, 0.85f );
            g2 = min( g2, 1.15f );
#else
            g2 = max( g2, 0.5f );
            g2 = min( g2, 2.f );
#endif
            *( p_gains_dir++ ) = g2;
        }
    }
+25 −24
Original line number Diff line number Diff line
@@ -1578,8 +1578,7 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector):
                            executor.submit(self.ivas_enc_thread, mode, config)
                        )
                while run_dec:

                    self.lock.acquire()
                    with self.lock:
                        # check if all enc tasks are done, either regularily or with exceptions
                        try:
                            finished_enc_tasks = concurrent.futures.wait(
@@ -1591,21 +1590,23 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector):
                            # not all done yet, continue...
                            pass

                    self.lock.release()

                    self.dec_queue["condition"].acquire()
                    if not self.dec_queue["dec_entries"]:
                    with self.dec_queue["condition"]:
                        dec_queue_empty = len(self.dec_queue["dec_entries"]) == 0
                        all_encoded = self.dec_queue["all_encoded"]
                        if all_encoded:
                        all_modes_done = self.stats["num_modes"] == self.stats["num_modes_finished"]

                        if dec_queue_empty and all_encoded and all_modes_done:
                            self.dec_queue["condition"].notify()
                            break
                        self.dec_queue["condition"].wait(10)
                        else:
                            self.dec_queue["condition"].wait(1)

                    while self.dec_queue["dec_entries"] != []:
                        # can not reuse dec_queue_empty here, since there might be new items after waiting
                        while len(self.dec_queue["dec_entries"]) != 0:
                            config = self.dec_queue["dec_entries"].pop(0)
                            tasks_dec.append(executor.submit(self.ivas_dec_thread, config))

                        self.dec_queue["condition"].notify()
                    self.dec_queue["condition"].release()

        self.show_final_stats()