Commit 887e6526 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'main' into 568-crash-ism-bitrate-switching

parents 32dd529b a804dc7d
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -282,10 +282,10 @@ build-codec-sanitizers-linux:
    - *print-common-info
    - bash ci/build_codec_sanitizers_linux.sh

.build-codec-windows-cmake:
build-codec-windows-cmake:
  extends:
    - .build-job-windows-with-check-for-warnings
    - .rules-basis
    - .rules-main-push
  script:
    - *print-common-info-windows
    - $winoutdata = $null
@@ -295,10 +295,10 @@ build-codec-sanitizers-linux:
    - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression
    - ("exit $LASTEXITCODE") | Invoke-Expression

.build-codec-windows-msbuild:
build-codec-windows-msbuild:
  extends:
    - .build-job-windows-with-check-for-warnings
    - .rules-basis
    - .rules-main-push
  script:
    - *print-common-info-windows
    - $winoutdata = $null
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@
#define FIX_557_CRASH_IN_ISM_DTX                        /* VA issue 557: fix crash in 1ISM 48 kbps DTX */
#define FIX_563_PARAMMC_LIMITER                         /* FhG: issue 563: fix ILD limiter when coming from silence w/o transient set             */

#define FIX_560_VAD_FLAG                                /* Eri: Issue 560 - VAD flag issue for unified stereo */

#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 */
+8 −0
Original line number Diff line number Diff line
@@ -163,7 +163,9 @@ ivas_error pre_proc_front_ivas(
    float temp1F_icatdmResampBuf[L_FILT_MAX]; /* temp buffers for ICA TDM resamplers */
    int16_t old_pitch1;                       /* previous frame OL pitch[1] @12.8 kHz */
    int16_t LR_localVAD;
#ifndef FIX_560_VAD_FLAG
    int16_t LR_vad_flag;
#endif
    ivas_error error;

    push_wmops( "pre_proc_front" );
@@ -180,7 +182,9 @@ ivas_error pre_proc_front_ivas(
    res_cod_SNR_M = tmpF;

    LR_localVAD = 0;
#ifndef FIX_560_VAD_FLAG
    LR_vad_flag = 0;
#endif

    if ( hSCE != NULL )
    {
@@ -208,7 +212,9 @@ ivas_error pre_proc_front_ivas(
        {
            /* Combine localVAD and vad_flag from LR processing */
            LR_localVAD = hCPE->hCoreCoder[0]->localVAD || hCPE->hCoreCoder[1]->localVAD;
#ifndef FIX_560_VAD_FLAG
            LR_vad_flag = hCPE->hFrontVad[0]->hVAD->vad_flag || hCPE->hFrontVad[1]->hVAD->vad_flag;
#endif
        }

        if ( hCPE->hStereoTD != NULL )
@@ -462,8 +468,10 @@ ivas_error pre_proc_front_ivas(
        /* Add down mix stereo activity to LR vad_flag_dtx */
        *vad_flag_dtx = *vad_flag_dtx || st->vad_flag;

#ifndef FIX_560_VAD_FLAG
        /* Combine the LR VAD flag and stereo downmix VAD flag */
        st->vad_flag = ( LR_vad_flag || st->vad_flag );
#endif

        /* Determine hangover flag status based on LR localVAD and downmix localVAD */
        *vad_hover_flag = *vad_flag_dtx && !( LR_localVAD || st->localVAD );
+126 −97

File changed.

Preview size limit exceeded, changes collapsed.

+38 −5
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ Execute tests specified via a parameter file.
import os
import errno
import platform
import filecmp
from subprocess import run
import pytest
from cmp_pcm import cmp_pcm
@@ -268,7 +269,7 @@ def test_param_file_tests(
    # -> construct output filename
    output_file = f"{testv_base}_{tag_str}.dec.wav"

    decode(
    stdout = decode(
        dut_decoder_frontend,
        ref_decoder_path,
        reference_path,
@@ -282,12 +283,38 @@ def test_param_file_tests(
        tracefile_dec,
    )

    # get metadata file paths from decoder stdout
    md_out_files = list()
    for line in stdout.split("\n"):
        line_strip = line.strip()
        if line_strip.startswith("Output metadata file"):
            line_split = line_strip.split()
            md_file = os.path.basename(line_split[-1])
            md_out_files.append(md_file)

    if update_ref in [0, 2]:
        dut_file = f"{dut_base_path}/param_file/dec/{output_file}"
        ref_file = f"{reference_path}/param_file/dec/{output_file}"
        dut_output_file = f"{dut_base_path}/param_file/dec/{output_file}"
        ref_output_file = f"{reference_path}/param_file/dec/{output_file}"
        fs = int(sampling_rate) * 1000
        cmp_result, reason = cmp_pcm(dut_file, ref_file, output_config, fs)
        assert cmp_result == 0, reason
        output_differs, reason = cmp_pcm(dut_output_file, ref_output_file, output_config, fs)

        metadata_differs = False
        for md_file in md_out_files:
            print(md_file)
            dut_metadata_file = f"{dut_base_path}/param_file/dec/{md_file}"
            ref_metadata_file = f"{reference_path}/param_file/dec/{md_file}"
            metadata_differs = not filecmp.cmp(dut_metadata_file, ref_metadata_file)

        if output_differs or metadata_differs:
            msg = "Difference between ref and dut in "
            if output_differs and metadata_differs:
                msg += "output and metadata"
            elif output_differs:
                msg += "output only"
            elif metadata_differs:
                msg += "metadata only"

            assert False, msg

        # remove DUT output files when test result is OK (to save disk space)
        if not keep_files:
@@ -450,6 +477,8 @@ def decode(
            add_option_list=add_option_list,
        )

        stdout = ref_decoder.stdout

    if update_ref in [0, 2]:
        check_and_makedir(dut_out_dir)
        add_option_list = dec_opts_list
@@ -466,3 +495,7 @@ def decode(
            dut_out_file,
            add_option_list=add_option_list,
        )

        stdout = decoder_frontend.stdout

    return stdout