Commit 72f620cb authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into scripts-updates-to-basop-ci-branch

parents 93533091 a33e5c64
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1235,15 +1235,11 @@ int main(
        masaIds[i] = 0u;
    }

#ifdef FIX_1377_HANDLE_ERROR_CODE
    if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
    }
#else
    IVAS_REND_SetObjectIDs( hIvasRend );
#endif

    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
    {
@@ -2617,14 +2613,10 @@ static CmdlnArgs defaultArgs(
    args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID;
    args.outConfig.outSetupCustom.num_spk = 0;
    args.outConfig.outSetupCustom.num_lfe = 0;
#ifdef FIX_HRTF_LEFTOVERS
    for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i )
    {
        args.inConfig.ambisonicsBuses[i].audioConfig = IVAS_AUDIO_CONFIG_INVALID;
    }
#else
    args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID;
#endif

    for ( i = 0; i < RENDERER_MAX_ISM_INPUTS + RENDERER_MAX_MASA_INPUTS; ++i )
    {
+19 −2
Original line number Diff line number Diff line
import numpy as np
from scipy.spatial.transform import Rotation


FRAMES_PER_SEC = 50
MAGIC_VAL_TO_SIGNAL_EULER_ANGLES = -3


def random_trajectory(duration_sec):
    n_frames = int(FRAMES_PER_SEC * duration_sec)
    trj = np.random.random((n_frames, 4))
    trj[:, 0] = -3
    trj[:, 0] = MAGIC_VAL_TO_SIGNAL_EULER_ANGLES
    trj[:, 1] *= 180
    trj[:, 2] *= 90
    trj[:, 3] *= 180
@@ -17,9 +19,24 @@ def random_trajectory(duration_sec):
def constant_trajectory(duration_sec, yaw=0, pitch=0, roll=0):
    n_frames = int(FRAMES_PER_SEC * duration_sec)
    trj = np.empty((n_frames, 4))
    trj[:, 0] = -3
    trj[:, 0] = MAGIC_VAL_TO_SIGNAL_EULER_ANGLES
    trj[:, 1] = yaw
    trj[:, 2] = pitch
    trj[:, 3] = roll
    return trj


def random_trajectory_quat(duration_sec):
    n_frames = int(FRAMES_PER_SEC * duration_sec)
    trj = Rotation.random(n_frames).as_quat()
    return trj


def constant_trajectory_quat(duration_sec, w=1, x=0, y=0, z=0):
    n_frames = int(FRAMES_PER_SEC * duration_sec)
    trj = np.empty((n_frames, 4))
    trj[:, 0] = w
    trj[:, 1] = x
    trj[:, 2] = y
    trj[:, 3] = z
    return trj
+46 −37
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import argparse
import pathlib
import subprocess
import sys
import os
import numpy as np
import json

@@ -43,7 +44,7 @@ from collect_artifacts import (
    find_failed_files_for_sanitizer_test,
)
from combine_genpatt_and_jbm_profile import combine_error_profiles
from create_trajectories import random_trajectory
from create_trajectories import random_trajectory, random_trajectory_quat


SCRIPT_DIR = pathlib.Path("./scripts").resolve()
@@ -75,12 +76,17 @@ ARGS_FOR_OC = {
    "BINAURAL_ROOM_REVERB": BINAURAL_OUT_ARGS,
}

SEED_FOR_RANDOM = int(os.environ.get("CI_JOB_ID", 0))


def main(args):
    in_format = args.in_format
    out_formats = args.out_formats
    tests = args.tests
    run_fec = not args.skip_fec
    seed = SEED_FOR_RANDOM if args.inject_seed is None else args.inject_seed

    np.random.seed(seed)

    assert all([t in SUPPORTED_TESTS for t in tests])

@@ -92,7 +98,6 @@ def main(args):


def get_modes(in_format: str) -> list:

    in_format_for_script = in_format
    if in_format in MC_MODES:
        in_format_for_script = "MC"
@@ -134,7 +139,6 @@ def assemble_oc_dict(out_formats: list):


def get_md_file_command(in_format: str) -> list:

    cmd = list()
    if "ISM" in in_format:
        cmd.append("--ism_metadata_files")
@@ -145,8 +149,7 @@ def get_md_file_command(in_format: str) -> list:
    return cmd


def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True):

def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool):
    modes = get_modes(in_format)
    if len(modes) == 0:
        return 0
@@ -156,10 +159,10 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr

    # create random trajectory files
    if "BINAURAL" in oc_str:
        trajectory_files = [HEAD_TRAJ_FILE, EXOF_TRAJ_FILE]
        for tf in trajectory_files:
        traj = random_trajectory(int(DURATION))
            np.savetxt(tf, traj, fmt="%.2f", delimiter=",")
        np.savetxt(HEAD_TRAJ_FILE, traj, fmt="%.2f", delimiter=",")
        traj_exof = random_trajectory_quat(int(DURATION))
        np.savetxt(EXOF_TRAJ_FILE, traj_exof, fmt="%.2f", delimiter=",")

    ### always run encoder and decoder with no frameloss
    cmd_no_fec = [
@@ -187,7 +190,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr
    # resue decoder part of StereDmxEVS mode (it is basically a duplicate of "normal" mono run)
    if in_format == "StereoDmxEVS":
        panning = np.random.randint(-90, 91)
        cmd_no_fec += [f'-D=-non_diegetic_pan {panning}']
        cmd_no_fec += [f"-D=-non_diegetic_pan {panning}"]

    print(
        "======== Script command line WITHOUT plc: ========\n{}".format(
@@ -277,5 +280,11 @@ if __name__ == "__main__":
    parser.add_argument("out_formats", type=str, nargs="+")
    parser.add_argument("--tests", type=str, nargs="+", default=["CLANG1", "CLANG2"])
    parser.add_argument("--skip_fec", action="store_true")
    parser.add_argument(
        "--inject_seed",
        type=int,
        default=None,
        help="Value to use for seeding random generators",
    )

    sys.exit(main(parser.parse_args()))
+0 −2
Original line number Diff line number Diff line
@@ -229,9 +229,7 @@ typedef enum
/* format signaling in SID frames */
#define SID_FORMAT_NBITS                        3                           /* Bit 0 | Bit 1 | Bit 2 */
                                                                            /*-------|-------|------ */
#ifdef FIX_1384_MSAN_ivas_spar_dec_open
#define SID_FORMAT_NONE                         (-0x1)                      /*    n/a|    n/a|    n/a*/
#endif
#define SID_DFT_STEREO                          0x0                         /*      0|      0|     0 */
#define SID_MDCT_STEREO                         0x1                         /*      1|      0|     0 */
#define SID_ISM                                 0x2                         /*      0|      1|     0 */
+0 −11
Original line number Diff line number Diff line
@@ -168,15 +168,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_1119_SPLIT_RENDERING_VOIP                   /* FhG: Add split rendering support to decoder in VoIP mode */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define FIX_1377_HANDLE_ERROR_CODE                      /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */
#define FIX_HRTF_LEFTOVERS                              /* VA: HRTF updates - bring float main in line with BASOP main */
#define FIX_1384_MSAN_ivas_spar_dec_open                /* VA: issue 1386: fix use-of-uninitialized value in ivas_spar_dec_open() */
#define FIX_1384_MSAN_stereo_tcx_core_enc               /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */
#define FIX_1388_MSAN_ivas_init_decoder                 /* VA: issue 1388: fix use-of-uninitialized value in ivas_init_decoder() */
#define FIX_1383_HEAD_TRACK_SANITIZER                   /* Nok: issue 1383: Fix head tracking struc values reading in renderer */
#define FIX_1385_INIT_IGF_STOP_FREQ                     /* FhG: Initialize infoIGFStopFreq in init_igf_dec() */
#define FIX_1387_INIT_PRM_SQQ                           /* FhG: initialize pointer prm_sqQ, which might be uninitialized in case of bfi == 1 */
#define FIX_1349_TNS_CRASH                              /* FhG: Fix crash in TNS entropy coding, in case order of joint TNS coding is reduced to 0 */


/* #################### End BE switches ################################## */
@@ -188,8 +179,6 @@

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_1328_FIX_NON_LINEARITY                    /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0  */
#define NONBE_1344_REND_MASA_LOW_FS                     /* Nokia: Issue 1344: Fix sanitizer errors when using IVAS_rend to render MASA with lower sampling rates */
#define NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES             /* Nokia: Fix for issues 1399: obj edit broken with MC/SBA output in VOIP, and 1400: negative energy estimate used for gaining. */

/* ##################### End NON-BE switches ########################### */
Loading