Commit 2f98b8b1 authored by malenov's avatar malenov
Browse files

merge main to branch

parents a1b1ee6e 2add32b3
Loading
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -1012,11 +1012,13 @@ voip-be-on-merge-request:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  stage: test
  needs: ["build-codec-linux-make", "codec-smoke-test"]
  needs: ["build-codec-linux-make"]
  timeout: "10 minutes"
  script:
    - *print-common-info
    - bash ci/ivas_voip_be_test.sh
    - make clean
    - make -j
    - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py

clang-format-check:
  extends:
@@ -2205,7 +2207,7 @@ coverage-test-on-main-scheduled:
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_ltv.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/ivas_voip_be_test.sh coverage
    - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py
    - lcov -c -d obj -o coverage.info
    # remove apps and lib_util files from coverage
    - lcov -r coverage.info "*apps*" -o coverage.info
@@ -2289,8 +2291,8 @@ complexity-stereo-in-stereo-out:
    - *complexity-measurements-setup
    - in_format=stereo
    - out_format=stereo
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - ret_val=$?
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

@@ -2307,8 +2309,8 @@ complexity-ism-in-binaural-out:
    - *complexity-measurements-setup
    - in_format=ISM
    - out_format=BINAURAL
    - bash ci/complexity_measurements/getWmops.sh "ISM+1 ISM+2 ISM+3 ISM+4" "$out_format"
    - ret_val=$?
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "ISM+1 ISM+2 ISM+3 ISM+4" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

@@ -2325,8 +2327,8 @@ complexity-sba-hoa3-in-hoa3-out:
    - *complexity-measurements-setup
    - in_format=HOA3
    - out_format=HOA3
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - ret_val=$?
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

@@ -2343,8 +2345,8 @@ complexity-mc-in-7_1_4-out:
    - *complexity-measurements-setup
    - in_format=MC
    - out_format=7_1_4
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - ret_val=$?
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

@@ -2361,8 +2363,8 @@ complexity-masa-in-7_1_4-out:
    - *complexity-measurements-setup
    - in_format=MASA
    - out_format=7_1_4
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - ret_val=$?
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

@@ -2379,8 +2381,8 @@ complexity-StereoDmxEVS-stereo-in-mono-out:
    - *complexity-measurements-setup
    - in_format=StereoDmxEVS
    - out_format=mono
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format"
    - ret_val=$?
    - ret_val=0
    - bash ci/complexity_measurements/getWmops.sh "$in_format" "$out_format" || ret_val=$?
    - *complexity-measurements-prepare-artifacts
    - exit $ret_val

+48 −0
Original line number Diff line number Diff line
@@ -128,7 +128,11 @@ typedef struct
    bool customLsOutputEnabled;
    char *customLsSetupFilename;
    int16_t orientation_tracking;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    bool non_diegetic_pan_enabled;
#else
    int16_t Opt_non_diegetic_pan;
#endif
    float non_diegetic_pan_gain;
    bool renderConfigEnabled;
    char *renderConfigFilename;
@@ -148,7 +152,11 @@ typedef struct
#endif
#endif
    AcousticEnvironmentSequence aeSequence;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    bool dpidEnabled;
#else
    int16_t Opt_dpid_on;
#endif
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];

} DecArguments;
@@ -407,8 +415,12 @@ int main(
    if ( arg.renderConfigEnabled )
    {
        /* sanity check */
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false )
#else
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM &&
             arg.Opt_non_diegetic_pan == 0 )
#endif
        {
            fprintf( stderr, "\nError: Renderer configuration file cannot be used in this output configuration.\n\n" );
            goto cleanup;
@@ -427,8 +439,14 @@ int main(

    asked_frame_size = arg.renderFramesize;
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain,
                                       arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain,
                                       arg.Opt_dpid_on, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -594,8 +612,12 @@ int main(

        /* sanity check */
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false )
#else
             arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM &&
             arg.Opt_non_diegetic_pan == 0 )
#endif
        {
            fprintf( stderr, "\nExternal Renderer Config is supported only when binaural output configurations is used as output OR when Split rendering mode is enabled. Exiting. \n" );
            goto cleanup;
@@ -1066,12 +1088,20 @@ static bool parseCmdlIVAS_dec(

    arg->renderConfigEnabled = false;
    arg->renderConfigFilename = NULL;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    arg->dpidEnabled = false;
#else
    arg->Opt_dpid_on = 0;
#endif

    arg->outputMdFilename = NULL;

    arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
    arg->non_diegetic_pan_enabled = false;
#else
    arg->Opt_non_diegetic_pan = 0;
#endif
    arg->non_diegetic_pan_gain = 0.f;
    arg->tsmEnabled = false;
    arg->renderFramesize = IVAS_RENDER_FRAMESIZE_20MS;
@@ -1410,7 +1440,11 @@ static bool parseCmdlIVAS_dec(
        else if ( strcmp( argv_to_upper, "-NON_DIEGETIC_PAN" ) == 0 )
        {
            i++;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
            arg->non_diegetic_pan_enabled = true;
#else
            arg->Opt_non_diegetic_pan = 1;
#endif
            strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 );
            argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0';
            to_upper( argv_to_upper );
@@ -1507,7 +1541,11 @@ static bool parseCmdlIVAS_dec(
        {
            int16_t id, tmp;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
            arg->dpidEnabled = true;
#else
            arg->Opt_dpid_on = 1;
#endif
            ++i;
            tmp = 0;
            while ( is_number( argv[i + tmp] ) && tmp < IVAS_MAX_NUM_OBJECTS )
@@ -1587,7 +1625,12 @@ static bool parseCmdlIVAS_dec(
            arg->customLsSetupFilename = argv[i];
        }
        i++;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
        if ( arg->non_diegetic_pan_enabled && arg->outputConfig != IVAS_AUDIO_CONFIG_STEREO )
#else
        if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputConfig != IVAS_AUDIO_CONFIG_STEREO ) )
#endif
        {
            fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" );
            usage_dec();
@@ -1605,7 +1648,12 @@ static bool parseCmdlIVAS_dec(
    {
        arg->outputConfig = IVAS_AUDIO_CONFIG_MONO;
        arg->decMode = IVAS_DEC_MODE_EVS;

#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
        if ( arg->non_diegetic_pan_enabled )
#else
        if ( ( arg->Opt_non_diegetic_pan ) )
#endif
        {
            arg->outputConfig = IVAS_AUDIO_CONFIG_STEREO;
        }
+19 −6
Original line number Diff line number Diff line
@@ -92,11 +92,12 @@ ARROW_DOWN = '<span class="arrowdown">&#11010;</span>'

# expected columns. actual columns are filtered from the incoming data later, this
# is mainly for controlling the order in the output table
COLUMNS = ["testcase", "Result", "MLD", "MAXIMUM ABS DIFF"]
COLUMNS = ["testcase", "Result", "MLD", "MAXIMUM ABS DIFF", "MIN_SSNR"]
COLUMNS_GLOBAL = COLUMNS[:1]
COLUMNS_DIFFERENTIAL = COLUMNS[1:]
COLUMNS_DIFFERENTIAL_NOT_MLD = COLUMNS_DIFFERENTIAL[2:]


def create_subpage(
    html_out,
    csv_out,
@@ -111,11 +112,18 @@ def create_subpage(
    )
    write_out_csv(merged_reports, merged_reports[0].keys(), csv_out)

    table_header_a = "".join([TH_TMPL_GLOBAL.format(c) for c in COLUMNS_GLOBAL] + [TH_TMPL_DIFFERENTIAL.format(c) for c in COLUMNS_DIFFERENTIAL])
    table_header_a = "".join(
        [TH_TMPL_GLOBAL.format(c) for c in COLUMNS_GLOBAL]
        + [TH_TMPL_DIFFERENTIAL.format(c) for c in COLUMNS_DIFFERENTIAL]
    )
    table_header_b = list()
    for c in COLUMNS_DIFFERENTIAL:
        table_header_b.append(TH_TMPL_SECOND_ROW.format(f"Previous Run<br>ID: {id_previous}"))
        table_header_b.append(TH_TMPL_SECOND_ROW.format(f"Current Run<br>ID: {id_current}"))
        table_header_b.append(
            TH_TMPL_SECOND_ROW.format(f"Previous Run<br>ID: {id_previous}")
        )
        table_header_b.append(
            TH_TMPL_SECOND_ROW.format(f"Current Run<br>ID: {id_current}")
        )
    table_header_b = "".join(table_header_b)
    table_body = "\n".join(
        tr_from_row(row, id_current, id_previous) for row in merged_reports
@@ -241,8 +249,13 @@ def merge_and_cleanup_mld_reports(

        return diff

    other_col_pairs = [(f"{col}-{id_previous}", f"{col}-{id_current}") for col in COLUMNS_DIFFERENTIAL_NOT_MLD]
    merged = sorted(merged, key=partial(sort_func, other_col_pairs=other_col_pairs), reverse=True)
    other_col_pairs = [
        (f"{col}-{id_previous}", f"{col}-{id_current}")
        for col in COLUMNS_DIFFERENTIAL_NOT_MLD
    ]
    merged = sorted(
        merged, key=partial(sort_func, other_col_pairs=other_col_pairs), reverse=True
    )

    # remove the unecessary whole path from the testcase names
    for row in merged:
+48 −0
Original line number Diff line number Diff line
import argparse
import csv
import sys


THRESH = 0.01
COLS = [
    [3, 5, 7, 9], # wmops_all
    [3,5,7,8,10,12,13,15,17], # ram_all
    [3,5,7,9,11,13,15,17,19], # rom_all
]


def main(args):
    linewise_logfiles = [args.wmops_logfile, args.ram_logfile, args.rom_logfile]
    changes_found_linewise = any([check_linewise_logfile(f, c) for f, c in zip(linewise_logfiles, COLS)])

    if changes_found_linewise:
        print("Global max of WMOPS, RAM or ROM changed")

    return int(changes_found_linewise)


def check_linewise_logfile(filepath, cols):
    with open(filepath) as f:
        contents = [line for line in csv.reader(f, delimiter=" ")]

    curr = contents[-1]
    prev = contents[-2]

    change_ratios = [abs(float(curr[i]) / float(prev[i]) - 1) > THRESH for i in cols]
    changes_found = any(change_ratios)

    if changes_found:
        print("Previous log line:", prev)
        print("Current log line:", curr)

    return changes_found


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("wmops_logfile")
    parser.add_argument("ram_logfile")
    parser.add_argument("rom_logfile")
    args = parser.parse_args()

    sys.exit(main(args))
+6 −1
Original line number Diff line number Diff line
@@ -86,4 +86,9 @@ ${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameF
# generate java script from database
tcsh ${scriptDir}/genWebpageData_Rom.csh ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/graphs_rom_flc.js Graphs_ROM

python3 ${scriptDir}/check_for_changes.py ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt
if [ "$?" != "0" ]; then
    ret_val=1
fi

exit $ret_val
Loading